Deep links: show current-view Copy link in page headers #878

Open
opened 2026-10-02 17:30:32 +00:00 by kayg · 4 comments
Owner

Evidence

Calendar's current-view Copy link is placed in overflow at apps/web/src/routes/calendar/[view]/[date]/+page.svelte:312-337. The same pattern appears in Photos (apps/web/src/lib/photos/PhotosView.svelte:161-207), Tags (apps/web/src/routes/tag/[tag]/+page.svelte:30-42), and Money month and register views (apps/web/src/routes/money/[budget]/[month]/+page.svelte:159-179, apps/web/src/routes/money/[budget]/accounts/[[account]]/+page.svelte:210-233). FilesBrowser also states that view Copy link stays behind ⋯ (apps/web/src/lib/files/FilesBrowser.svelte:1336-1354). Notes has the same overflow-only view action.

Rule

CLAUDE.md, Deep links, requires Copy link access from the header as well as the relevant menus and touch action. DESIGN §33 defines links that restore each view. The route inventory in docs/deep-links.md also lists header Copy link for Calendar views.

Expected behavior

Show a direct, accessible Copy link control in the header for each current view. It copies the full stable URL and preserves the active view state. Keep the existing menu action available.

Test idea

For Calendar, Files, Photos, Notes, Tags and Money, use the header action with pointer, keyboard and touch. Verify the copied URL opens the same view and that the control has the accessible name “Copy link to …”. Include the applicable phone, tablet and desktop widths.

## Evidence Calendar's current-view Copy link is placed in overflow at `apps/web/src/routes/calendar/[view]/[date]/+page.svelte:312-337`. The same pattern appears in Photos (`apps/web/src/lib/photos/PhotosView.svelte:161-207`), Tags (`apps/web/src/routes/tag/[tag]/+page.svelte:30-42`), and Money month and register views (`apps/web/src/routes/money/[budget]/[month]/+page.svelte:159-179`, `apps/web/src/routes/money/[budget]/accounts/[[account]]/+page.svelte:210-233`). FilesBrowser also states that view Copy link stays behind `⋯` (`apps/web/src/lib/files/FilesBrowser.svelte:1336-1354`). Notes has the same overflow-only view action. ## Rule CLAUDE.md, Deep links, requires Copy link access from the header as well as the relevant menus and touch action. DESIGN §33 defines links that restore each view. The route inventory in `docs/deep-links.md` also lists header Copy link for Calendar views. ## Expected behavior Show a direct, accessible Copy link control in the header for each current view. It copies the full stable URL and preserves the active view state. Keep the existing menu action available. ## Test idea For Calendar, Files, Photos, Notes, Tags and Money, use the header action with pointer, keyboard and touch. Verify the copied URL opens the same view and that the control has the accessible name “Copy link to …”. Include the applicable phone, tablet and desktop widths.
Author
Owner

Coordination note: #581 defines the shared action registry and says the top-row ⋯ contains view actions. CLAUDE.md, Deep links, separately requires a header Copy link button. This issue covers the missing direct current-view action so it can be coordinated with #581's action-surface work.

Coordination note: #581 defines the shared action registry and says the top-row `⋯` contains view actions. CLAUDE.md, Deep links, separately requires a header Copy link button. This issue covers the missing direct current-view action so it can be coordinated with #581's action-surface work.
Author
Owner

Starting #878 on branch job/deeplinks-fix, based at 440e19dce23040ac8ebaae88f0469b6535b1afcb. I have read the repository contract, DESIGN §33, the #861 audit and the related deep-link issues. I will add direct header Copy link controls for the scoped Calendar, Files, Photos, Notes, Tags and Money views, reusing existing link builders and copy UI.

Starting #878 on branch `job/deeplinks-fix`, based at `440e19dce23040ac8ebaae88f0469b6535b1afcb`. I have read the repository contract, DESIGN §33, the #861 audit and the related deep-link issues. I will add direct header Copy link controls for the scoped Calendar, Files, Photos, Notes, Tags and Money views, reusing existing link builders and copy UI.
Author
Owner

Finding from the #878 E2E: selecting an undated Task from Calendar Day info closed the Inspector, and fine-pointer input did not open its preview because there was no grid hover target. The Task preview and its Copy link were then inaccessible from that list action. Fixed by opening the preview from the surviving Day info anchor on fine pointers while preserving touch double-tap behavior. The focused deep-link E2E now passes this flow.

Finding from the #878 E2E: selecting an undated Task from Calendar Day info closed the Inspector, and fine-pointer input did not open its preview because there was no grid hover target. The Task preview and its Copy link were then inaccessible from that list action. Fixed by opening the preview from the surviving Day info anchor on fine pointers while preserving touch double-tap behavior. The focused deep-link E2E now passes this flow.
Author
Owner

Completed Forgejo #878 on job/deeplinks-fix.
Head: 62c08b45d9bee013d949ab9bee8c31283fe60937.

Built

  • Added PageChrome.copyLink and rendered it through the shared CopyLink segment in the mode header. Calendar, Files, Shared, Recent, Trash, Photos, All notes, Tags, Money month and Money register now expose a direct header action. Existing menu actions remain available, and view URLs use the existing stable route builders.
  • Extended the production-build E2E to copy each header URL and open it in a fresh page. The 11 header views were captured at 390, 820 and 1440 px in both themes with macOS platform emulation.
  • Fixed the Calendar Day info undated Task row: fine-pointer selection now opens the preview from the surviving Inspector anchor after Day info closes. Touch keeps the existing selection behavior.
  • Extended the shared header benchmark profile with Copy link click-to-clipboard latency, CPU and RSS for average and burst paths. The profile is syntax-checked but not measured in this non-performance issue; the current baseline has no Copy link interaction metric.

Files

packages/ui/src/components/ModeHeader.svelte, packages/ui/src/components/pageChrome.ts, apps/web/src/lib/files/FilesBrowser.svelte, apps/web/src/lib/files/RecentView.svelte, apps/web/src/lib/files/TrashView.svelte, apps/web/src/lib/photos/PhotosView.svelte, apps/web/src/routes/calendar/[view]/[date]/+page.svelte, apps/web/src/routes/money/[budget]/[month]/+page.svelte, apps/web/src/routes/money/[budget]/accounts/[[account]]/+page.svelte, apps/web/src/routes/notes/+page.svelte, apps/web/src/routes/tag/[tag]/+page.svelte, apps/web/e2e/deeplinks.mjs, bench/header-path-menu-526.mjs.

Screenshots

Each archive contains 43 PNGs. Together they include the 66 dedicated header-control captures plus 20 base-view captures.

UX gaps closed

  • Every #878 view header has the shared, accessible Copy link action and retains the menu copy action.
  • The Day info Task row now opens its preview for fine-pointer users.

UX gaps left

  • The E2E activates the native Copy link button with Enter, pointer and touch. It does not separately assert Space-key activation; the button uses standard native button semantics.
  • Issues #879, #880, #882 and #884 are separate audit items and are outside #878.

Decisions

  • DESIGN §33 does not define a general current-view Copy link shortcut. I did not add a new global shortcut; the control uses the shared CopyLink tooltip and native button keyboard behavior.
  • DESIGN §34 does not state how a Day info Task selection should open its preview. The E2E showed that the Inspector closed before the fine-pointer preview could open, so it now anchors the preview to the surviving Day info element. Touch retains select() behavior.
  • No Rust source changed. Rust clippy/test package gates were not run. The full web test suite and adversarial matrices remain for the merge round. The performance profile was not measured because the verification policy limits measurements to performance issues.

Gate output

cargo fmt --check produced no output and exited 0.

cd apps/web && bun run check output:

$ node scripts/check-user-storage.mjs && node scripts/check-type-tokens.mjs && node scripts/check-motion-tokens.mjs && svelte-kit sync && svelte-check --tsconfig ./tsconfig.json
User browser caches use userStorage; only documented device/public-link exceptions remain.
Text sizes and UI shape values use shared role tokens.
UI transitions and animation options use shared motion tokens or documented exceptions.
Loading svelte-check in workspace: /home/kayg/Developer/calternal-wt/deeplinks-fix/apps/web
Getting Svelte diagnostics...

svelte-check found 0 errors and 0 warnings

bunx vitest run src/lib/modeHeader.svelte.test.ts src/lib/calendar/ItemPreview.svelte.test.ts --maxWorkers=2 output:

 RUN  v5.0.1 /home/kayg/Developer/calternal-wt/deeplinks-fix/apps/web

 Test Files  2 passed (2)
      Tests  24 passed (24)
   Start at  02:23:02
   Duration  17.96s (transform 66%, environment 14%, tests 10%, import 5%, setup 5%)

Focused deep-link E2E output (pass lines):

PASS calendar view link and Copy link
PASS log entry link, and the old link follows the entry to its new day
PASS task links (dated, undated, missing)
PASS event link selects the event
PASS note heading link survives a retitle and a move
PASS file, folder, photo and share links survive rename and move
PASS Files, Recent and Trash header links restore their views
PASS Photos header link restores the Videos view
PASS tag link (and the old /tags/ form)
PASS Money month and register header links restore their views
PASS search query and saved search links
PASS settings group, admin alias and notifications links
PASS note list rows and sidebar tag menu
CSP REPORTS deeplinks: 0 across 129 pages
deep links e2e: all passed

cargo clean output:

Removed 7237 files, 4.6GiB total

The full web suite and tests/adversarial/run.sh remain for the combined-branch merge round.

Completed Forgejo #878 on `job/deeplinks-fix`. Head: `62c08b45d9bee013d949ab9bee8c31283fe60937`. ## Built - Added `PageChrome.copyLink` and rendered it through the shared `CopyLink` segment in the mode header. Calendar, Files, Shared, Recent, Trash, Photos, All notes, Tags, Money month and Money register now expose a direct header action. Existing menu actions remain available, and view URLs use the existing stable route builders. - Extended the production-build E2E to copy each header URL and open it in a fresh page. The 11 header views were captured at 390, 820 and 1440 px in both themes with macOS platform emulation. - Fixed the Calendar Day info undated Task row: fine-pointer selection now opens the preview from the surviving Inspector anchor after Day info closes. Touch keeps the existing selection behavior. - Extended the shared header benchmark profile with Copy link click-to-clipboard latency, CPU and RSS for average and burst paths. The profile is syntax-checked but not measured in this non-performance issue; the current baseline has no Copy link interaction metric. ## Files `packages/ui/src/components/ModeHeader.svelte`, `packages/ui/src/components/pageChrome.ts`, `apps/web/src/lib/files/FilesBrowser.svelte`, `apps/web/src/lib/files/RecentView.svelte`, `apps/web/src/lib/files/TrashView.svelte`, `apps/web/src/lib/photos/PhotosView.svelte`, `apps/web/src/routes/calendar/[view]/[date]/+page.svelte`, `apps/web/src/routes/money/[budget]/[month]/+page.svelte`, `apps/web/src/routes/money/[budget]/accounts/[[account]]/+page.svelte`, `apps/web/src/routes/notes/+page.svelte`, `apps/web/src/routes/tag/[tag]/+page.svelte`, `apps/web/e2e/deeplinks.mjs`, `bench/header-path-menu-526.mjs`. ## Screenshots Each archive contains 43 PNGs. Together they include the 66 dedicated header-control captures plus 20 base-view captures. - [Paper white / light screenshots](https://git.kayg.org/attachments/24bb47d6-b450-4b8b-8e68-509909820d33) - [Tokyo night / dark screenshots](https://git.kayg.org/attachments/c562c241-8aa7-4035-ba35-74e0d39d7eb5) ## UX gaps closed - Every #878 view header has the shared, accessible Copy link action and retains the menu copy action. - The Day info Task row now opens its preview for fine-pointer users. ## UX gaps left - The E2E activates the native Copy link button with Enter, pointer and touch. It does not separately assert Space-key activation; the button uses standard native button semantics. - Issues #879, #880, #882 and #884 are separate audit items and are outside #878. ## Decisions - DESIGN §33 does not define a general current-view Copy link shortcut. I did not add a new global shortcut; the control uses the shared CopyLink tooltip and native button keyboard behavior. - DESIGN §34 does not state how a Day info Task selection should open its preview. The E2E showed that the Inspector closed before the fine-pointer preview could open, so it now anchors the preview to the surviving Day info element. Touch retains `select()` behavior. - No Rust source changed. Rust clippy/test package gates were not run. The full web test suite and adversarial matrices remain for the merge round. The performance profile was not measured because the verification policy limits measurements to performance issues. ## Gate output `cargo fmt --check` produced no output and exited 0. `cd apps/web && bun run check` output: ```text $ node scripts/check-user-storage.mjs && node scripts/check-type-tokens.mjs && node scripts/check-motion-tokens.mjs && svelte-kit sync && svelte-check --tsconfig ./tsconfig.json User browser caches use userStorage; only documented device/public-link exceptions remain. Text sizes and UI shape values use shared role tokens. UI transitions and animation options use shared motion tokens or documented exceptions. Loading svelte-check in workspace: /home/kayg/Developer/calternal-wt/deeplinks-fix/apps/web Getting Svelte diagnostics... svelte-check found 0 errors and 0 warnings ``` `bunx vitest run src/lib/modeHeader.svelte.test.ts src/lib/calendar/ItemPreview.svelte.test.ts --maxWorkers=2` output: ```text RUN v5.0.1 /home/kayg/Developer/calternal-wt/deeplinks-fix/apps/web Test Files 2 passed (2) Tests 24 passed (24) Start at 02:23:02 Duration 17.96s (transform 66%, environment 14%, tests 10%, import 5%, setup 5%) ``` Focused deep-link E2E output (pass lines): ```text PASS calendar view link and Copy link PASS log entry link, and the old link follows the entry to its new day PASS task links (dated, undated, missing) PASS event link selects the event PASS note heading link survives a retitle and a move PASS file, folder, photo and share links survive rename and move PASS Files, Recent and Trash header links restore their views PASS Photos header link restores the Videos view PASS tag link (and the old /tags/ form) PASS Money month and register header links restore their views PASS search query and saved search links PASS settings group, admin alias and notifications links PASS note list rows and sidebar tag menu CSP REPORTS deeplinks: 0 across 129 pages deep links e2e: all passed ``` `cargo clean` output: ```text Removed 7237 files, 4.6GiB total ``` The full web suite and `tests/adversarial/run.sh` remain for the combined-branch merge round.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#878
No description provided.