Skip to content

fix(viewer): show what the server calls the file, not its filename - #12

Merged
skjnldsv merged 2 commits into
mainfrom
fix/displayname-in-titles
Sep 9, 2026
Merged

fix(viewer): show what the server calls the file, not its filename#12
skjnldsv merged 2 commits into
mainfrom
fix/displayname-in-titles

Conversation

@skjnldsv

@skjnldsv skjnldsv commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

The modal title, the document title, the comparison header, the image alt text and the editor label all read basename. A node can carry a display name that differs from it, and then all of those show the wrong thing.

The case that brought this up: the versions sidebar in the server opens a file version, which is served under its version id — 1737542400 — while the sidebar shows it as the date it was taken. Ported to the new API that title becomes the number.

Node.displayname falls back to basename, so nothing changes for a node without one. Renaming keeps reading basename, which is what it edits.

Stacked on #11, which main needs first.

👾 This pull request was assisted by Claude Code, commits carry an Assisted-by trailer.

Registering the built-in handlers on import made the entry call into
lib/models, which imports registerHandler back from the entry. Entering
the graph through a model rather than through the entry then reached the
entry mid-evaluation and called a handler module that had not run yet:

    Cannot access '__vite_ssr_import_2__' before initialization

The registry, the file actions and IHandler move to lib/handlers.ts,
which the models import instead. The entry keeps its exports and is now
only what it does on import: offer this copy, hold the service, register
the defaults.

Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
The modal title, the document title, the comparison header, the image
alt text and the editor label all read the basename. A node can carry a
display name that differs from it — a file version is served under its
version id and reads as the date it was taken — and then every one of
those showed a number.

Node.displayname falls back to the basename, so nothing changes for a
node without one. Renaming still works on the basename, which is what
it edits.

Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
@skjnldsv skjnldsv added status: review Waiting for reviews type: bug 🐛 Something isn't working AI assisted labels Sep 9, 2026
@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.74172% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.37%. Comparing base (37e69a1) to head (4884f1e).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
lib/handlers.ts 88.97% 14 Missing and 1 partial ⚠️
lib/views/Viewer.vue 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #12      +/-   ##
==========================================
+ Coverage   72.03%   72.37%   +0.34%     
==========================================
  Files          33       34       +1     
  Lines        2285     2299      +14     
  Branches      377      380       +3     
==========================================
+ Hits         1646     1664      +18     
+ Misses        633      629       -4     
  Partials        6        6              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@skjnldsv
skjnldsv merged commit 4884f1e into main Sep 9, 2026
18 checks passed
@skjnldsv
skjnldsv deleted the fix/displayname-in-titles branch September 9, 2026 09:49
@skjnldsv skjnldsv mentioned this pull request Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI assisted status: review Waiting for reviews type: bug 🐛 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant