Repository navigation
Description
Overview
Follow-up to #2005 / #2011. That PR fixed the stale cached title in BaseNodeViewer's header, but deliberately scoped itself there per the issue's Non-Goals. The same root cause is still live on several other surfaces, so the user-visible bug is only partially resolved: for the node that reproduced #2005, the viewer header is now correct while the tab title still shows /.
Root cause (unchanged from #2005)
sharedNodeStore's cached title is only refreshed by a backend round-trip, while optimistic content updates patch content and spread title forward untouched. Any surface preferring title || content therefore surfaces a title computed for an earlier, possibly differently-typed state — e.g. strip_markdown("/") captured while a node was still text, before conversion to task.
#2011 fixed this for the viewer header by preferring .title only for genuinely titleTemplate-driven schemas, where title is property-computed and legitimately distinct from content.
Affected call sites
packages/desktop-app/src/lib/plugins/plugin-registry.ts:469—getNodeTitle()returnsnode.title || node.content. This is the highest-impact one: it backscomputeTabTitle(utils/tab-title.ts:33), so tab titles show the stale value.packages/desktop-app/src/lib/components/query/list-view.svelte:35packages/desktop-app/src/lib/components/query/kanban-view.svelte:90packages/desktop-app/src/lib/components/query/table-row.svelte:91packages/desktop-app/src/lib/stores/collections.svelte.ts:445
Each should be reviewed individually — some may legitimately want the computed title.
Suggested approach
computeHeaderDisplayValue (design/components/node-type-predicates.ts) already encodes the correct rule: prefer title only when the type is genuinely template-driven, otherwise content is the source of truth. The main design question is how these call sites determine "is this type template-driven", since they lack the viewer's SchemaFormLoader. pluginRegistry.findSlashCommand(nodeType)?.hasTitleTemplate — already used by node-row.svelte:129 for exactly this — looks like the natural handle.
Worth considering whether the shared rule belongs in one helper all these surfaces call, rather than being re-derived per site.
Related
Note that hasTitleTemplate on the frontend is custom-schema-scoped, while the backend's compute_title() applies a title_template to any schema carrying one, core or not. These agree only because no core type ships a template today (documented at schema-form-loader.svelte.ts's hasTitleTemplate getter in #2011). Any fix here should keep that assumption in one place rather than spreading it further.
Acceptance Criteria
- Tab title for a node whose title went stale shows current content, not the stale cached value
- Query list/kanban/table views show current content for non-template types
- No regression for
titleTemplate-driven types on any of these surfaces — computed title still displays - The title-vs-content rule is not duplicated per call site
- No new test failures (
bun run test:all)
Activity
malibio commentedon Aug 7, 2026
Baseline (worktree issue-2012-title-vs-content): Frontend: 191 test files passed, 4447 tests passed.
Fix stale cached title on tab titles, query views, and collections (#…
mstomar125 commentedon Aug 20, 2026
Fixed in #2179 (merged cd08ec7).
Extended #2011's title-vs-content rule to the five other call sites named here:
plugin-registry.ts'sgetNodeTitle(backs tab titles viacomputeTabTitle) — the highest-impact one, since tab titles were showing the stale valuelist-view.svelte,kanban-view.svelte,table-row.svelte(both thecontentcolumn and the row tooltip)collections.svelte.ts'sselectedCollectionMembersConsolidated the rule into one shared helper,
resolveTitleOrContent(lib/utils/node-display-title.ts), rather than re-deriving it per site: prefertitleonly when the schema is genuinely title_template-driven,contentotherwise.computeHeaderDisplayValue(the #2011 header fix) now delegates to it too instead of duplicating the logic.PluginRegistrygainedresolveDisplayTitle(node), which applies that rule usingfindSlashCommand(nodeType)?.hasTitleTemplateas the template signal (the same flagnode-row.sveltealready used for this). The four row-based surfaces (list/kanban/table/collections) callresolveDisplayTitlerather thangetNodeTitle, deliberately skipping a plugin'sgetTitleoverride (e.g. date's "Today"/"Tomorrow" formatting) — those surfaces show plain node text, not a tab-specific title.An adversarial review caught two real follow-up issues, both fixed before merge:
collections.svelte.tswas runningstripMarkdownover the resolved value unconditionally (would have mangled a template-computed title containing_/*/backtick), and the "unresolved title" guard used ASCII-only\w(misclassified a fully-resolved non-Latin-script title, e.g. CJK/Arabic, as unresolved) —resolveDisplayTitlenow takes an optionalformatContentcallback applied only to content-sourced values, and the guard uses a Unicode-aware[\p{L}\p{N}]test.Added regression tests reproducing the exact stale-title scenario across all fixed surfaces, plus unit coverage for the shared helper and both review fixes. Full frontend suite green (226 files / 4767 tests) and the pre-push gate (frontend + Rust + e2e + Tauri-seam integration) passed.
malibio commentedon Sep 4, 2026
Disregard the assignment/status churn on this issue today — I picked it up from a stale local checkout without noticing it had already been closed by #2179 (merged 2026-08-20). No branch was pushed and no PR opened; the local worktree has been discarded. Unassigning and reverting status to Done.