Add Project Home, Auth Bridge, shared auth token, and Tier-1 polish

Project Home (DESIGN-REVIEW §B2): the project is promoted from a 280px
sidebar card to a first-class main-area view. ProjectCard.tsx (1,257
lines) is replaced by a select-only ProjectRow plus tabs for Overview,
Sessions, Automation, Config and Files. The PortMappings, FileManager
and ContainerProgress modals are absorbed rather than reimplemented.
Config gains a Saved/Saving/Failed indicator — save-on-blur failures
previously reached only console.error.

Tier-1 polish (DESIGN-REVIEW §A): new elevation, muted-accent, disabled
and focus-ring tokens; a global :focus-visible ring with every
focus:outline-none removed; filled buttons moved to --accent-emphasis
and white-on-success toggles retired, fixing three WCAG AA failures
(2.1:1, 2.5:1, 2.4:1); a shared Modal primitive with role="dialog",
focus trap and restore, adopted by all remaining modals; status
indicators that carry a glyph and word rather than colour alone.

Ctrl+Shift+W closes a tab, deliberately not Ctrl+W — that is readline's
kill-word, used constantly in the terminal this app is built around.

Auth Bridge: a general loopback-callback bridge so browser logins run
inside a container (aws sso login, Concourse fly login, claude login)
can complete against the host browser. Listeners are discovered from
/proc/net/tcp{,6} — ss/netstat/lsof are absent from the image — bound on
host 127.0.0.1 only, and tunnelled in over the Docker API via socat,
which keeps working on Docker Desktop where container IPs are not
routable. Falls back to [::1] because Node resolves localhost to IPv6
first, so claude login often binds ::1 alone. Opt-in per project.

This extracts create_attached_exec() and moves the existing terminal
session path onto it, so there is one attached-exec implementation
rather than two.

Shared auth token: `claude setup-token` is run in a container, the token
is stored in the OS keychain and injected as CLAUDE_CODE_OAUTH_TOKEN
into Anthropic-backend projects. Contrary to the initial design note,
setup-token uses an Anthropic-hosted redirect and blocks on a stdin
paste prompt rather than a loopback callback, so a stdin command is
required for the flow to complete.

The token is never logged, never returned to the frontend, and is
redacted from the streamed output with a stateful matcher that withholds
any tail that could still grow into a secret. Change detection uses a
random rotation id rather than a hash, since a hash in a docker-inspect
readable label would be an offline verification oracle.

Frontend 33 -> 51 tests; Rust 34 tests. Both builds clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-09 11:35:42 -07:00
co-authored by Claude Opus 5
parent f68d10d5c2
commit 01a2f6aec8
83 changed files with 8042 additions and 3064 deletions
+44 -2
View File
@@ -4,17 +4,59 @@
--bg-primary: #0d1117;
--bg-secondary: #161b22;
--bg-tertiary: #21262d;
/* Elevation: modals/menus sit above --bg-secondary surfaces. */
--bg-overlay: #1c2128;
--shadow-overlay: 0 16px 48px rgba(1, 4, 9, 0.85);
--border-color: #30363d;
--text-primary: #e6edf3;
--text-secondary: #8b949e;
/* Dedicated disabled ink — `opacity-50` on --text-secondary drops to ~2.4:1. */
--text-disabled: #6e7681;
/* --accent is the foreground/link accent (fails AA behind white text);
--accent-emphasis is the fill for buttons carrying white text (~4.7:1). */
--accent: #58a6ff;
--accent-hover: #79c0ff;
--accent-emphasis: #1f6feb;
--accent-emphasis-hover: #388bfd;
--success: #3fb950;
--success-emphasis: #238636;
--warning: #d29922;
--warning-emphasis: #9e6a03;
--error: #f85149;
--error-emphasis: #b62324;
/* Muted tints, replacing hand-rolled `bg-yellow-500/20` style leaks. */
--accent-muted: rgba(56, 139, 253, 0.15);
--success-muted: rgba(63, 185, 80, 0.15);
--warning-muted: rgba(210, 153, 34, 0.15);
--error-muted: rgba(248, 81, 73, 0.12);
--focus-ring: #58a6ff;
/* Two radii only: controls and panels. */
--radius-control: 6px;
--radius-panel: 8px;
color-scheme: dark;
}
/* One visible focus indicator for every interactive element. Components must
not strip this with `focus:outline-none`. */
:focus-visible {
outline: 2px solid var(--focus-ring);
outline-offset: 1px;
border-radius: 2px;
}
/* Still-unknown states pulse; failed states are painted, not animated. */
@keyframes status-pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.3; }
}
.animate-status-pulse { animation: status-pulse 1.4s ease-in-out infinite; }
@keyframes toast-in {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
.animate-toast-in { animation: toast-in 0.18s ease-out; }
html, body, #root {
height: 100%;
@@ -131,7 +173,7 @@ body {
.help-content .help-inline-code {
background: var(--bg-tertiary);
border: 1px solid var(--border-color);
border-radius: 3px;
border-radius: var(--radius-control);
padding: 0.125rem 0.375rem;
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
font-size: 0.75rem;
@@ -165,7 +207,7 @@ body {
background: var(--bg-primary);
margin: 0.5rem 0;
padding: 0.5rem 0.75rem;
border-radius: 0 4px 4px 0;
border-radius: 0 var(--radius-control) var(--radius-control) 0;
color: var(--text-secondary);
font-size: 0.75rem;
}