Redesign phase 2: nav groups, Ebony theme, status chips, files API shared/hold (#311) #313

Merged
Cordy merged 7 commits from feat/redesign-phase2 into main 2026-08-26 06:59:27 +00:00
Owner

Second pass on the file-browser redesign (#311), covering the two PR1 gaps the operator flagged plus PR2/PR3.

Frontend (web/static/index.html)

  • Nav group labels — adds the Shared and This instance sub-headers (.navgrp) the mockup shows; each label auto-hides when all of its items are hidden.
  • Ebony theme — new black theme value end-to-end: option in the Appearance dialog, applyPrefs() promoted from binary light/dark to tri-state (system→light/dark, plus explicit black), new-token palette + per-accent overrides (handoff values), and an old-token fallback block so admin/preview/dialog surfaces stay dark under Ebony.
  • Status chips (PR3) — the name line now renders a Shared chip and an On hold chip, driven by the new API fields below. Owner column stays hidden (no backing data — see below).

Backend (PR2)

  • GET /api/v1/files items now carry shared and hold (omitempty). New internal/api/listmeta.go:
    • shared — the caller has an active (non-expired) public link on the path.
    • hold — a legal hold covers the path or an ancestor.
    • Both share and hold state live in backend-path space, so each item is resolved via the scope driver's pure Resolve before matching (cheap, no I/O). Best-effort: a disabled subsystem or an unresolvable path just yields no flag; listing never fails on a badge.
  • Deliberately not added: owner (storage.FileInfo has no uploader), lock (the only lock is the instance boot-guard, not per-file), itemCount (would be an N+1 on the main-screen hot path). Inventing owner/lock data would be misleading in a product with real legal-hold semantics.

Gate

Applied via anchored splices (assert count==1 each). go vet ./... clean, go test ./internal/api/... green (new applyFlags unit tests), go build ./cmd/cairnd OK, node --check on the app scripts OK.

Visual confirmation (Ebony, chips, nav labels) is left for the operator — Cairn's in-memory sessions require a fresh login after deploy, which the agent cannot do.

Second pass on the file-browser redesign (#311), covering the two PR1 gaps the operator flagged plus PR2/PR3. ## Frontend (web/static/index.html) - **Nav group labels** — adds the `Shared` and `This instance` sub-headers (`.navgrp`) the mockup shows; each label auto-hides when all of its items are hidden. - **Ebony theme** — new `black` theme value end-to-end: option in the Appearance dialog, `applyPrefs()` promoted from binary light/dark to tri-state (system→light/dark, plus explicit black), new-token palette + per-accent overrides (handoff values), and an old-token fallback block so admin/preview/dialog surfaces stay dark under Ebony. - **Status chips (PR3)** — the name line now renders a `Shared` chip and an `On hold` chip, driven by the new API fields below. Owner column stays hidden (no backing data — see below). ## Backend (PR2) - `GET /api/v1/files` items now carry `shared` and `hold` (omitempty). New `internal/api/listmeta.go`: - `shared` — the caller has an active (non-expired) public link on the path. - `hold` — a legal hold covers the path or an ancestor. - Both share and hold state live in **backend-path** space, so each item is resolved via the scope driver's pure `Resolve` before matching (cheap, no I/O). Best-effort: a disabled subsystem or an unresolvable path just yields no flag; listing never fails on a badge. - **Deliberately not added:** `owner` (storage.FileInfo has no uploader), `lock` (the only lock is the instance boot-guard, not per-file), `itemCount` (would be an N+1 on the main-screen hot path). Inventing owner/lock data would be misleading in a product with real legal-hold semantics. ## Gate Applied via anchored splices (assert count==1 each). `go vet ./...` clean, `go test ./internal/api/...` green (new `applyFlags` unit tests), `go build ./cmd/cairnd` OK, `node --check` on the app scripts OK. Visual confirmation (Ebony, chips, nav labels) is left for the operator — Cairn's in-memory sessions require a fresh login after deploy, which the agent cannot do.
Cordy merged commit b7bcdd9801 into main 2026-08-26 06:59:27 +00:00
Sign in to join this conversation.
No reviewers
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#313
No description provided.