Share-created toast leaks the backend path (/home/…) from the share dialog #192

Closed
opened 2026-08-11 01:23:24 +00:00 by Cordy · 0 comments
Owner

Split out from #175 item 3 (items 1, 2, 4 shipped in v0.6.4–v0.6.6; this cosmetic one remained). Verified live on the dogfood via the browser against web/static/index.html:

  • quickLink (per-row copy-link): say(tf("shareCreated", { path: it.name })) — shows the leaf name. Fine.
  • openShareDialog (the Share dialog): say(tf("shareCreated", { path: shareItem.path })) — shows shareItem.path, which is the backend path (/home/folder 1). The user lives in a virtual namespace where that item is Personal/folder 1, so the toast contradicts the product's own path model.

There is no backend→virtual path helper in the frontend (only the navPersonal i18n label), so the display path is built from nav context, not from .path.

Fix

Make the share-created toast never show the backend /home/… path. Simplest and consistent with quickLink: use the item name

say(tf("shareCreated", { path: shareItem.path }));   // ->  { path: shareItem.name }

(Optionally show the full virtual path Personal/folder 1 via a small displayPath() helper that maps /home/…Personal/… and /spaces/<s>/…<s>/…, but the leaf name already resolves the leak and matches the quick-link toast.)

The Shares-view revoke flow also interpolates the backend path: revokeShareConfirm and revokedShare use s.path. Those show a share's stored backend path in the Shares list — arguably acceptable there, but worth a consistency pass later.

Batched into v0.6.8.

Split out from #175 item 3 (items 1, 2, 4 shipped in v0.6.4–v0.6.6; this cosmetic one remained). Verified live on the dogfood via the browser against `web/static/index.html`: - **`quickLink`** (per-row copy-link): `say(tf("shareCreated", { path: it.name }))` — shows the leaf name. Fine. - **`openShareDialog`** (the Share dialog): `say(tf("shareCreated", { path: shareItem.path }))` — shows `shareItem.path`, which is the **backend** path (`/home/folder 1`). The user lives in a virtual namespace where that item is `Personal/folder 1`, so the toast contradicts the product's own path model. There is no backend→virtual path helper in the frontend (only the `navPersonal` i18n label), so the display path is built from nav context, not from `.path`. ## Fix Make the share-created toast never show the backend `/home/…` path. Simplest and consistent with `quickLink`: use the item **name** — ``` say(tf("shareCreated", { path: shareItem.path })); // -> { path: shareItem.name } ``` (Optionally show the full virtual path `Personal/folder 1` via a small `displayPath()` helper that maps `/home/…` → `Personal/…` and `/spaces/<s>/…` → `<s>/…`, but the leaf name already resolves the leak and matches the quick-link toast.) ## Related (same class, out of scope here unless trivial) The Shares-view revoke flow also interpolates the backend path: `revokeShareConfirm` and `revokedShare` use `s.path`. Those show a share's stored backend path in the Shares list — arguably acceptable there, but worth a consistency pass later. Batched into v0.6.8.
Cordy closed this issue 2026-08-11 01:38:48 +00:00
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: Cordy/Cairn#192
No description provided.