"My shares" headings show the full internal path, not the basename (#529 2/3 follow-up) #590

Closed
opened 2026-09-18 00:48:40 +00:00 by Cordy · 1 comment
Owner

Found in the v0.6.213 live pass. Small, but it is a mismatch with the shipped PR's own stated behaviour.

What happens

Shares → My shares, with one grant on the folder moverini, renders the group heading as:

/home/nikola-test/moverini
  nikola-test2   Person   Can view   revoke

The heading is the full owner-qualified backend path.

What was specified

PR #583 says of pure:share-groups:

each group carries the basename for its heading

and share-groups.test.js has a passing case named "each group carries the basename for its heading". So either the pure function returns the basename and the view ignores it, or the view is handed the wrong field — worth checking which before editing, since the test is green and should stay meaningful.

The adjacent tab gets it right: Shared with me renders moverini with shared by nikola-test underneath, which is the intended treatment.

Why it is worth fixing rather than leaving

/home/nikola-test/ is the owner's own home prefix. On the My shares tab the viewer is the owner, so every heading repeats the same meaningless prefix, and a deep path pushes the part the user actually recognises off to the right. It also leaks the internal /home/<user>/ layout into a user-facing surface for no purpose — the same reasoning that made vpath server-supplied in #582 rather than rebuilt client-side.

Keep the full path available somewhere (title attribute, or the row's own detail) — two files with the same basename in different folders must still be distinguishable. The heading is the only thing changing.

Reproduce

  1. Share anything with anyone.
  2. Shares → My shares.
Found in the v0.6.213 live pass. Small, but it is a mismatch with the shipped PR's own stated behaviour. ## What happens Shares → **My shares**, with one grant on the folder `moverini`, renders the group heading as: ``` /home/nikola-test/moverini nikola-test2 Person Can view revoke ``` The heading is the full owner-qualified backend path. ## What was specified PR #583 says of `pure:share-groups`: > each group carries the basename for its heading and `share-groups.test.js` has a passing case named *"each group carries the basename for its heading"*. So either the pure function returns the basename and the view ignores it, or the view is handed the wrong field — worth checking which before editing, since the test is green and should stay meaningful. The adjacent tab gets it right: **Shared with me** renders `moverini` with `shared by nikola-test` underneath, which is the intended treatment. ## Why it is worth fixing rather than leaving `/home/nikola-test/` is the owner's own home prefix. On the **My shares** tab the viewer *is* the owner, so every heading repeats the same meaningless prefix, and a deep path pushes the part the user actually recognises off to the right. It also leaks the internal `/home/<user>/` layout into a user-facing surface for no purpose — the same reasoning that made `vpath` server-supplied in #582 rather than rebuilt client-side. Keep the full path available somewhere (title attribute, or the row's own detail) — two files with the same basename in different folders must still be distinguishable. The heading is the only thing changing. ## Reproduce 1. Share anything with anyone. 2. Shares → My shares.
Author
Owner

Fixed in #592, shipped as v0.6.214, live on both dogfoods.

As the issue suspected: the pure function was right and the view ignored it — groupShares() carried both path and name, and sharesRenderMine() rendered g.path. The heading is now g.name with the full path kept as the heading's title, so two files sharing a basename in different folders stay distinguishable on hover.

web/test/shares-view.test.js now covers the wiring: it renders sharesRenderMine against a fake DOM and asserts the heading text, the title, and the two-folders-one-basename case. Red witnessed on the old rendering before the fix.

**Fixed in #592, shipped as v0.6.214, live on both dogfoods.** As the issue suspected: the pure function was right and the view ignored it — `groupShares()` carried both `path` and `name`, and `sharesRenderMine()` rendered `g.path`. The heading is now `g.name` with the full path kept as the heading's `title`, so two files sharing a basename in different folders stay distinguishable on hover. `web/test/shares-view.test.js` now covers the wiring: it renders `sharesRenderMine` against a fake DOM and asserts the heading text, the title, and the two-folders-one-basename case. Red witnessed on the old rendering before the fix.
Cordy closed this issue 2026-09-18 02:01:41 +00:00
Sign in to join this conversation.
No labels
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: Cordy/Cairn#590
No description provided.