Skip to content

PR 5b: Browser chrome — Properties↔Cart rail, delete-409 dialog, Appears in N Views - #427

Draft
allison-truhlar wants to merge 9 commits into
ngviews-05a-cart-pipelinefrom
ngviews-05b-browser-chrome
Draft

PR 5b: Browser chrome — Properties↔Cart rail, delete-409 dialog, Appears in N Views#427
allison-truhlar wants to merge 9 commits into
ngviews-05a-cart-pipelinefrom
ngviews-05b-browser-chrome

Conversation

@allison-truhlar

Copy link
Copy Markdown
Collaborator

PR 5b — Browser chrome for Neuroglancer Views

Stacked on #426 (ngviews-05a-cart-pipeline). Read-only scope. Adds the Browse-side chrome for the Views feature — no backend changes (the 409 delete guard and the /views endpoint already shipped in PR 2).

Built via subagent-driven-development from docs/superpowers/plans/2026-08-07-ngviews-05b-browser-chrome.md — 7 tasks, each with a spec+quality review gate, plus a whole-branch final review and one polish fix wave. Full frontend suite 360 passing; node-check at the stack's known 5-error baseline (pre-existing, untouched files).

Part 1 — Right-edge Properties↔Cart rail + cart drawer

  • useLayoutPrefs gains an ephemeral propertiesDrawerMode: 'properties' | 'cart' + selectDrawerModereuses the existing "properties" panel id, so layoutConstants/layout-persistence keys are untouched (no new panel-combination keys).
  • New BrowseRightRail (Browse-only, always-visible right strip): Properties ⓘ + Cart 🛒 with a live count badge (useCartCount), aria-pressed on each.
  • PropertiesDrawer renders a cart body (<CartList/> + "Open full Layer Cart" → /ngviews?tab=cart) when in cart mode, outside the file-selection gate.
  • <CartList/> extracted from NGViews so the /ngviews tab and the drawer share one implementation; NGViews reads ?tab=cart.

Part 2 — Data Link delete: dependent-Views confirmation

  • useDeleteProxiedPathMutation now preserves the backend 409 {detail:{message,dependent_views}} body via a manual status branch (not sendRequestAndThrowForNotOk, which drops it), throwing a typed DependentViewsError; adds a confirm? payload → ?confirm=true.
  • handleDeleteDataLink(proxiedPath, confirm?) re-throws the typed error; the shared DataLinkDialog delete branch shows a confirm sub-view listing the caller's own dependent Views and re-issues the delete with confirm=true. Fixed once in the shared path → covers both delete entry points (Properties drawer + Data Links table).

Part 3 — Properties "Appears in N Views"

  • New useViewsForDataLinkQuery hook (mirrors fetchViews; GET /api/proxied-path/{sharing_key}/views, 404 → []).
  • New AppearsInViews section in the Properties Overview tab, shown only when the selected file has a Data Link.

Deferred (tracked)

  • "Dot on ⓘ" when a file is selected behind the open cart (design §7) — needs cross-panel selection wiring.
  • Making the "Appears in N Views" names navigable — waits for PR 6's embedded viewer.

Stack

01→02→03→04(#425)→05a(#426)→**05b**→06(embedded-readonly).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant