feat(ui): improve readability and fix workspace regressions
Separate interface typography from document text and enlarge controls across the workspace and public reader. Keep tree menus within the viewport and make constrained dialogs scrollable. Preserve nested image references, escape moved link paths, synchronize note creation and daily-note opening, and hydrate shared headings. Add regression coverage for settings and workspace behavior.
This commit is contained in:
1 parent
4d1339851b
commit
a716794e41
31 files changed
+556
-246
No files matched your search
@@ -205,3 +205,22 @@ func TestMetadataTracksChangesAndRebuild(t *testing.T) {
|
||||
t.Fatalf("索引恢复错误:%+v %v", notes, err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRebuildsLinkedImageMetadataFromOldIndex(t *testing.T) {
|
||||
f := newFixture(t)
|
||||
f.write("a.md", "[](https://example.com)")
|
||||
f.sync()
|
||||
// 模拟旧版索引漏记图片引用;笔记正文和 rev 均不改变。
|
||||
if _, err := f.idx.db.Exec(`UPDATE docs SET metadata = ?`, `{"title":"a","tags":[],"links":[],"assets":[],"warnings":[]}`); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if _, err := f.idx.db.Exec(`PRAGMA user_version = 2`); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
f.reopen()
|
||||
f.sync()
|
||||
notes, ready, err := f.idx.Metadata()
|
||||
if err != nil || !ready || len(notes) != 1 || len(notes[0].Assets) != 1 || notes[0].Assets[0].Target != "assets/used.png" {
|
||||
t.Fatalf("旧索引未重新提取图片引用:%+v %v", notes, err)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user