From 0f5298d6ddb2d813e8febe7bdaed3529b99910de Mon Sep 17 00:00:00 2001 From: Blake Bauman Date: Sat, 14 Nov 2026 15:54:06 -0700 Subject: [PATCH 1/3] refactor(web): rename browser app and organize source modules Rename apps/chat-ui to apps/web and @felix/chat-ui to @felix/web. Update workspace scripts, CI, tooling, docs, and the terminal secrets lookup. Group app setup, API code, styles, and feature logic into dedicated folders. Keep the deployed Cloudflare Worker name. Validation: web production build and 1,676 tests pass; Tailwind, API drift, protocol parity, payload shapes, palette, and bundle budget checks pass. --- .claude/README.md | 4 +- .claude/agents/code-quality-reviewer.md | 4 +- .claude/agents/code-reviewer.md | 2 +- .claude/agents/dx-engineer.md | 2 +- .claude/agents/felix-docs-writer.md | 2 +- .claude/agents/python-harness-engineer.md | 4 +- .claude/agents/refactor-engineer.md | 4 +- .claude/agents/security-reviewer.md | 2 +- .claude/agents/test-engineer.md | 6 +- .claude/agents/ui-engineer.md | 16 ++--- .claude/agents/workers-engineer.md | 6 +- .claude/hooks/failure-hint.sh | 2 +- .claude/hooks/impact-reminder.sh | 14 ++-- .claude/hooks/session-start.sh | 2 +- .claude/hooks/stop-gate.sh | 2 +- .claude/rules/docs-terminology.md | 2 +- .claude/rules/protocol-parity.md | 14 ++-- .claude/settings.json | 12 ++-- .claude/skills/add-ui-primitive/SKILL.md | 6 +- .claude/skills/api-contract-change/SKILL.md | 12 ++-- .../references/wire-protocol.md | 4 +- .claude/skills/branch-pr-workflow/SKILL.md | 2 +- .../code-quality/references/dimensions.md | 10 +-- .claude/skills/deploy-runbook/SKILL.md | 8 +-- .claude/skills/preflight/SKILL.md | 10 +-- .claude/skills/python-harness/SKILL.md | 4 +- .../threat-review/references/checklist.md | 8 +-- .claude/skills/toolkit-authoring/SKILL.md | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/deploy.yml | 6 +- .gitignore | 4 +- .../2026-08-23T22-38-55Z__apps-chat-ui-src.md | 4 +- ...rc-components-chat-multimodal-input-tsx.md | 2 +- ...-src-components-inspector-inspector-tsx.md | 12 ++-- ...i-src-main-tsx-toaster-toast-call-sites.md | 2 +- ...i-src-main-tsx-toaster-toast-call-sites.md | 2 +- .../2026-09-26T14-01-32Z__apps-chat-ui-src.md | 2 +- .../2026-09-26T16-06-16Z__apps-chat-ui-src.md | 2 +- .../2026-09-27T14-05-51Z__apps-chat-ui-src.md | 2 +- .impeccable/design.json | 2 +- CLAUDE.md | 64 +++++++++--------- DESIGN.md | 4 +- README.md | 8 +-- SECURITY.md | 4 +- apps/docs/.impeccable/design.json | 2 +- apps/docs/.impeccable/surfaces/src.md | 2 +- apps/docs/DESIGN.md | 2 +- apps/docs/astro.config.mjs | 2 +- apps/docs/scripts/fetch-api-spec.mjs | 2 +- apps/docs/src/components/RouteIndex.astro | 2 +- .../src/content/guide/getting-started.mdx | 2 +- apps/docs/src/content/guide/terminal.mdx | 2 +- apps/tui/CLAUDE.md | 2 +- apps/tui/README.md | 2 +- apps/tui/src/config.ts | 8 +-- apps/{chat-ui => web}/.dev.vars.example | 2 +- apps/{chat-ui => web}/.gitignore | 0 .../.impeccable/surfaces/src-app-tsx.md | 6 +- apps/{chat-ui => web}/CLAUDE.md | 48 ++++++------- apps/{chat-ui => web}/README.md | 40 ++++++++--- apps/{chat-ui => web}/components.json | 2 +- apps/{chat-ui => web}/harness-openapi.json | 0 apps/{chat-ui => web}/index.html | 2 +- apps/{chat-ui => web}/package.json | 2 +- apps/{chat-ui => web}/public/_headers | 0 .../public/apple-touch-icon.png | Bin apps/{chat-ui => web}/public/favicon.ico | Bin apps/{chat-ui => web}/public/favicon.svg | 0 apps/{chat-ui => web}/public/icon-192.png | Bin apps/{chat-ui => web}/public/icon-512.png | Bin .../public/icon-maskable-512.png | Bin apps/{chat-ui => web}/public/site.webmanifest | 0 apps/{chat-ui => web}/public/sw.js | 0 .../src/api.ts => web/src/api/client.ts} | 4 +- apps/{chat-ui/src => web/src/api}/types.ts | 0 .../src => web/src/app}/app-shell.tsx | 56 +++++++-------- .../src/App.tsx => web/src/app/app.tsx} | 6 +- .../src => web/src/app}/shell-context.ts | 4 +- .../src/components/account-chip.tsx | 8 +-- .../src/components/agent-select.tsx | 2 +- .../src/components/agent/agent-sheet.tsx | 6 +- .../src/components/ai-elements/context.tsx | 0 .../src/components/ai-elements/controls.tsx | 0 .../src/components/ai-elements/file-tree.tsx | 0 .../components/ai-elements/prompt-input.tsx | 2 +- .../src/components/app-sidebar.tsx | 8 +-- .../components/approval/approval-decision.tsx | 0 .../src/components/attention-line.tsx | 8 +-- .../src/components/auth/auth-card.tsx | 0 .../src/components/auth/auth-layout.tsx | 0 .../src/components/auth/github-sign-in.tsx | 2 +- .../src/components/auth/google-sign-in.tsx | 0 .../src/components/auth/last-used-badge.tsx | 0 .../src/components/brand-mark.tsx | 0 .../src/components/chat/approval-banner.tsx | 2 +- .../src/components/chat/context-meter.tsx | 2 +- .../src/components/chat/conversation.tsx | 4 +- .../src/components/chat/denial-context.ts | 4 +- .../src/components/chat/denials-sync.tsx | 6 +- .../src/components/chat/greeting.tsx | 10 +-- .../src/components/chat/icons.tsx | 0 .../src/components/chat/install-hint.tsx | 0 .../src/components/chat/message-actions.tsx | 0 .../src/components/chat/message.tsx | 6 +- .../src/components/chat/multimodal-input.tsx | 4 +- .../src/components/chat/plan-card.tsx | 0 .../src/components/chat/push-hint.tsx | 0 .../src/components/chat/queued-messages.tsx | 0 .../src/components/chat/rate-turn.tsx | 2 +- .../src/components/chat/reasoning.tsx | 0 .../components/chat/reply-changes-line.tsx | 0 .../src/components/chat/response.tsx | 4 +- .../components/chat/rewind-files-dialog.tsx | 0 .../src/components/chat/run-status.tsx | 2 +- .../src/components/chat/side-answer.tsx | 2 +- .../src/components/chat/slash-commands.tsx | 0 .../src/components/chat/stack-trace.tsx | 0 .../src/components/chat/start-from-item.tsx | 4 +- .../src/components/chat/starter-prompts.tsx | 2 +- .../src/components/chat/subagent-calls.tsx | 2 +- .../src/components/chat/thread-list.tsx | 10 +-- .../src/components/chat/tool-run.tsx | 4 +- .../src/components/chat/tool-sources.tsx | 0 .../src/components/chat/tool-table.tsx | 0 .../src/components/chat/tool.tsx | 10 +-- .../src/components/chat/turn-checkpoint.tsx | 0 .../src/components/chat/turn-debug.tsx | 2 +- .../src/components/chat/ui-prompt-banner.tsx | 2 +- .../src/components/chat/watching-banner.tsx | 0 .../src/components/confirm-button.tsx | 0 .../src/components/cut-id.tsx | 0 .../src/components/error-boundary.tsx | 0 .../src/components/error-notice.tsx | 0 .../src/components/eval/eval-sheet.tsx | 4 +- apps/{chat-ui => web}/src/components/gate.tsx | 8 +-- .../src/components/harness-health-line.tsx | 2 +- .../components/harness/activity-ledger.tsx | 12 ++-- .../src/components/harness/activity.tsx | 6 +- .../components/harness/agent-heartbeat.tsx | 6 +- .../src/components/harness/agent-skills.tsx | 6 +- .../src/components/harness/connections.tsx | 4 +- .../src/components/harness/documents.tsx | 6 +- .../src/components/harness/github.tsx | 8 +-- .../src/components/harness/harness-agent.tsx | 2 +- .../src/components/harness/memory.tsx | 6 +- .../src/components/harness/panel.tsx | 0 .../src/components/harness/skills.tsx | 0 .../src/components/highlighted-code.tsx | 0 .../components/inspector/debug-section.tsx | 4 +- .../src/components/inspector/inspector.tsx | 8 +-- .../src/components/inspector/plan-editor.tsx | 2 +- .../src/components/inspector/primitives.tsx | 4 +- .../src/components/jobs/job-create-form.tsx | 6 +- .../src/components/jobs/job-details.tsx | 4 +- .../src/components/jobs/jobs-sheet.tsx | 14 ++-- .../src/components/jobs/repeat-job-dialog.tsx | 4 +- .../components/manifests/manifests-sheet.tsx | 4 +- .../src/components/needs-you-band.tsx | 10 +-- .../src/components/pane/edit-notice.ts | 2 +- .../src/components/pane/file-actions.tsx | 0 .../src/components/pane/file-view.tsx | 14 ++-- .../src/components/pane/files-view.tsx | 14 ++-- .../src/components/pane/pane-divider.tsx | 0 .../src/components/pane/pane-parts.tsx | 0 .../src/components/pane/pane-zone.tsx | 2 +- .../src/components/pane/save-to-workspace.tsx | 4 +- .../src/components/pane/side-pane.tsx | 4 +- .../src/components/pane/use-pane-layout.ts | 0 .../src/components/rail-presence.tsx | 0 .../src/components/skills/asset-preview.tsx | 0 .../src/components/skills/bundle-changes.tsx | 0 .../src/components/skills/bundle-compare.ts | 0 .../src/components/skills/bundle-paths.ts | 0 .../src/components/skills/code-editor.tsx | 0 .../src/components/skills/diff-view.tsx | 2 +- .../src/components/skills/edit-panel.tsx | 2 +- .../src/components/skills/evals-panel.tsx | 0 .../src/components/skills/feedback-panel.tsx | 0 .../src/components/skills/file-tree.tsx | 0 .../components/skills/frontmatter-card.tsx | 0 .../components/skills/frontmatter-form.tsx | 0 .../components/skills/frontmatter-lines.ts | 0 .../src/components/skills/gate-line.tsx | 0 .../src/components/skills/highlight.ts | 0 .../src/components/skills/library-list.tsx | 0 .../components/skills/open-skill-editor.ts | 4 +- .../src/components/skills/policy-form.tsx | 0 .../src/components/skills/preview-pane.tsx | 0 .../src/components/skills/promote-button.tsx | 0 .../src/components/skills/queries.ts | 2 +- .../src/components/skills/query-root.tsx | 2 +- .../src/components/skills/refusal.tsx | 0 .../src/components/skills/review-panel.tsx | 0 .../src/components/skills/review-queue.tsx | 0 .../src/components/skills/save-dialog.tsx | 0 .../src/components/skills/score-readout.tsx | 0 .../skills/skill-bundle-browser.tsx | 0 .../components/skills/skill-bundle-editor.tsx | 0 .../src/components/skills/skill-import.tsx | 4 +- .../src/components/skills/skill-library.tsx | 4 +- .../src/components/skills/skill-markdown.tsx | 0 .../src/components/skills/skill-page.tsx | 0 .../src/components/skills/skill-pane-view.tsx | 2 +- .../components/skills/skill-proposal-card.tsx | 2 +- .../src/components/skills/skill-status.tsx | 0 .../src/components/skills/skill-tabs.ts | 0 .../src/components/skills/skills-address.ts | 0 .../src/components/skills/use-skill-bundle.ts | 0 .../src/components/skills/use-skill-editor.ts | 4 +- .../components/skills/validation-panel.tsx | 0 .../src/components/skills/version-actions.tsx | 0 .../src/components/skills/version-diff.tsx | 0 .../src/components/skills/version-picker.tsx | 0 .../src/components/skills/versions-panel.tsx | 0 .../src/components/theme-provider.tsx | 0 .../src/components/thread-title.tsx | 2 +- .../src/components/toaster.tsx | 0 .../src/components/why-disabled.tsx | 0 .../src/components/workflows/authorship.tsx | 0 .../src/components/workflows/run-now-form.tsx | 4 +- .../src/components/workflows/step-node.tsx | 4 +- .../components/workflows/step-transcript.tsx | 4 +- .../workflows/use-workflow-draft.ts | 6 +- .../components/workflows/use-workflow-run.ts | 4 +- .../components/workflows/workflow-canvas.tsx | 6 +- .../components/workflows/workflow-editor.tsx | 8 +-- .../workflows/workflow-inspector.tsx | 6 +- .../components/workflows/workflows-page.tsx | 12 ++-- .../src/components/workspace/changes-list.tsx | 4 +- .../components/workspace/file-row-menu.tsx | 0 .../components/workspace/folder-action.tsx | 10 +-- .../components/workspace/harness-files.tsx | 8 +-- .../src/components/workspace/repo-files.tsx | 4 +- .../src/components/workspace/thread-repo.tsx | 8 +-- .../workspace/workspace-section.tsx | 10 +-- .../src/hooks/use-drawable-url.ts | 2 +- .../{chat-ui => web}/src/hooks/use-elapsed.ts | 0 .../src/hooks/use-message-queue.ts | 2 +- .../src/hooks/use-pending-approvals.ts | 6 +- apps/{chat-ui => web}/src/hooks/use-rails.ts | 0 .../src/hooks/use-recent-audit.ts | 8 +-- .../src/hooks/use-shortcuts.ts | 2 +- .../src/hooks/use-speech-recognition.ts | 0 .../src/hooks/use-visual-viewport.ts | 0 .../src/hooks/useMediaQuery.ts | 0 apps/{chat-ui => web}/src/hooks/usePoll.ts | 2 +- .../src/hooks/useSharedPoll.ts | 2 +- .../src/lib => web/src/lib/auth}/auth.ts | 2 +- .../src/lib/auth}/connect-return.ts | 0 .../lib => web/src/lib/auth}/github-login.ts | 2 +- .../src/lib/conversation}/ai-types.ts | 2 +- .../src/lib/conversation}/call-target.ts | 0 .../src/lib/conversation}/continue-run.ts | 2 +- .../src/lib/conversation}/denials.ts | 0 .../src/lib/conversation}/durable-runs.ts | 0 .../src/lib/conversation}/engine-pool.ts | 0 .../src/lib/conversation}/frame-store.ts | 0 .../src/lib/conversation}/image-upload.ts | 2 +- .../lib => web/src/lib/conversation}/leave.ts | 6 +- .../src/lib/conversation}/ledger.ts | 4 +- .../src/lib/conversation}/needs-you.ts | 6 +- .../conversation}/pending-approvals-read.ts | 2 +- .../src/lib/conversation}/presence.ts | 0 .../src/lib/conversation}/resume.ts | 0 .../src/lib/conversation}/session-lease.ts | 0 .../src/lib/conversation}/skill-calls.ts | 0 .../src/lib/conversation}/tab-thread.ts | 0 .../src/lib/conversation}/thread-index.ts | 0 .../src/lib/conversation}/threads.ts | 4 +- .../src/lib/conversation}/tool-run.ts | 0 apps/{chat-ui => web}/src/lib/error-toast.tsx | 0 apps/{chat-ui => web}/src/lib/format.ts | 0 .../src/lib/harness}/audit-outcome.ts | 0 .../lib => web/src/lib/harness}/connection.ts | 0 .../src/lib/harness}/harness-glances.ts | 6 +- .../src/lib/harness}/harness-health.ts | 0 .../src/lib/harness}/identity-state.ts | 0 .../lib => web/src/lib/harness}/job-origin.ts | 2 +- .../src/lib/harness}/job-schedule.ts | 0 .../lib => web/src/lib/harness}/manifests.ts | 0 .../src/lib/harness}/opened-identity.ts | 0 .../src/lib/markdown}/rehype-omitted.ts | 0 .../src/lib/markdown}/reply-plugins.ts | 0 .../src/lib/navigation}/shortcuts.ts | 0 .../src/lib/navigation}/side-pane.ts | 0 .../src/lib/navigation}/view-change.ts | 0 apps/{chat-ui => web}/src/lib/platform.ts | 0 apps/{chat-ui => web}/src/lib/push.ts | 4 +- .../src/lib/service-worker.ts | 0 apps/{chat-ui => web}/src/lib/utils.ts | 0 .../src/lib/workflows}/workflow-draft.ts | 4 +- .../src/lib/workflows}/workflow-layout.ts | 2 +- .../lib => web/src/lib/workspace}/changes.ts | 0 .../lib => web/src/lib/workspace}/cowork.ts | 2 +- .../src/lib => web/src/lib/workspace}/diff.ts | 0 .../src/lib/workspace}/file-preview.ts | 0 .../src/lib/workspace}/file-tree.ts | 0 .../src/lib/workspace}/mount-state.ts | 4 +- .../src/lib/workspace}/save-text.ts | 0 .../src/lib/workspace}/workspace-events.ts | 0 .../src/lib/workspace}/workspace-tools.ts | 2 +- apps/{chat-ui => web}/src/main.tsx | 4 +- .../src/routes/harness-pages.tsx | 2 +- apps/{chat-ui => web}/src/routes/harness.tsx | 14 ++-- .../{chat-ui => web}/src/routes/workbench.tsx | 12 ++-- .../src => web/src/styles}/chat-utilities.css | 0 .../{chat-ui/src => web/src/styles}/index.css | 6 +- .../tests/activity-ledger.test.tsx | 6 +- .../tests/agent-heartbeat.test.tsx | 2 +- .../tests/agent-skills.test.tsx | 6 +- .../tests/agent-work.test.tsx | 4 +- .../tests/ai-elements.test.tsx | 0 .../tests/app-stream.test.tsx | 4 +- .../tests/approval-decision.test.tsx | 0 .../{chat-ui => web}/tests/artifacts.test.tsx | 10 +-- .../tests/attention-line.test.tsx | 2 +- apps/{chat-ui => web}/tests/audit.test.ts | 2 +- .../tests/blocked-route.test.tsx | 4 +- .../tests/code-editor.test.tsx | 0 .../tests/composer-controls.test.tsx | 2 +- apps/{chat-ui => web}/tests/composer.test.tsx | 2 +- .../tests/confirm-button.test.tsx | 0 .../{chat-ui => web}/tests/connection.test.ts | 2 +- .../tests/connections-page.test.tsx | 4 +- .../tests/context-meter.test.tsx | 2 +- .../tests/continue-run.test.tsx | 6 +- .../tests/conversation.test.tsx | 4 +- .../tests/debug-mode.test.tsx | 6 +- .../tests/delete-thread.test.tsx | 4 +- apps/{chat-ui => web}/tests/denials.test.ts | 4 +- .../{chat-ui => web}/tests/diff-view.test.tsx | 2 +- .../{chat-ui => web}/tests/docs-links.test.ts | 0 .../tests/durable-rejoin.test.tsx | 4 +- .../tests/edit-message.test.tsx | 2 +- .../tests/error-notice.test.tsx | 0 .../tests/error-toast.test.tsx | 0 .../tests/eval-run-link.test.tsx | 2 +- .../tests/eval-sheet.test.tsx | 6 +- apps/{chat-ui => web}/tests/file-tree.test.ts | 2 +- .../tests/files-auto-open.test.tsx | 4 +- .../tests/finished-turns-memo.test.tsx | 2 +- .../tests/frame-store.test.ts | 2 +- apps/{chat-ui => web}/tests/gate.test.tsx | 2 +- .../tests/github-app.test.tsx | 2 +- .../tests/github-login.test.tsx | 2 +- .../tests/google-login.test.tsx | 2 +- apps/{chat-ui => web}/tests/greeting.test.tsx | 16 ++--- .../tests/harness-health.test.tsx | 8 +-- .../tests/harness-route.test.tsx | 6 +- .../tests/harness-workspace-pane.test.tsx | 10 +-- apps/{chat-ui => web}/tests/headers.test.ts | 0 .../tests/identity-switch.test.tsx | 16 ++--- .../tests/image-upload.test.tsx | 2 +- .../tests/inspector-run.test.tsx | 2 +- .../tests/install-hint.test.tsx | 0 .../tests/job-schedule.test.ts | 2 +- .../tests/jobs-sheet.test.tsx | 6 +- .../tests/kept-message.test.tsx | 0 .../tests/kept-rows-workbenches.test.tsx | 6 +- apps/{chat-ui => web}/tests/lease-server.ts | 0 .../tests/management-verbs.test.tsx | 24 +++---- .../tests/manifest-save-warnings.test.tsx | 2 +- .../tests/manifest-version-log.test.tsx | 2 +- .../tests/manifests-canary.test.tsx | 2 +- .../tests/manifests-import.test.tsx | 2 +- .../tests/memory-page.test.tsx | 12 ++-- apps/{chat-ui => web}/tests/memory.test.ts | 4 +- .../tests/message-actions.test.tsx | 0 apps/{chat-ui => web}/tests/message.test.tsx | 4 +- .../tests/nav-glances.test.ts | 6 +- apps/{chat-ui => web}/tests/needs-you.test.ts | 4 +- .../tests/one-reply-label.test.tsx | 2 +- .../tests/open-file-pane.test.tsx | 4 +- .../tests/output-styles.test.tsx | 2 +- .../tests/page-empty.test.tsx | 0 .../tests/pending-approvals-read.test.ts | 2 +- .../{chat-ui => web}/tests/plan-card.test.tsx | 2 +- .../tests/plan-editor.test.tsx | 2 +- apps/{chat-ui => web}/tests/plans.test.ts | 2 +- apps/{chat-ui => web}/tests/presence.test.ts | 2 +- apps/{chat-ui => web}/tests/push.test.tsx | 4 +- .../tests/queued-messages.test.tsx | 2 +- .../tests/rail-presence.test.tsx | 0 .../tests/refused-send-cache.test.tsx | 2 +- .../tests/repeat-job.test.tsx | 2 +- .../tests/reply-changes.test.tsx | 8 +-- apps/{chat-ui => web}/tests/resend.test.tsx | 4 +- apps/{chat-ui => web}/tests/response.test.tsx | 10 +-- apps/{chat-ui => web}/tests/resume.test.tsx | 4 +- .../tests/rewind-files.test.tsx | 2 +- apps/{chat-ui => web}/tests/routing.test.tsx | 8 +-- .../tests/run-survives-thread-switch.test.tsx | 12 ++-- .../tests/runnable-commands.test.ts | 0 .../tests/select-family.test.tsx | 0 .../send-keeps-out-of-band-turns.test.tsx | 8 +-- .../tests/session-lease-keeper.test.ts | 2 +- .../tests/session-lease-watch.test.tsx | 4 +- .../tests/session-lease.test.tsx | 2 +- apps/{chat-ui => web}/tests/setup.ts | 8 +-- .../tests/sheets-legibility.test.tsx | 4 +- .../tests/shell-pick.test.tsx | 2 +- .../{chat-ui => web}/tests/shortcuts.test.tsx | 4 +- .../{chat-ui => web}/tests/side-pane.test.tsx | 12 ++-- .../tests/side-question.test.tsx | 2 +- .../tests/skill-admin-personal.test.tsx | 0 .../tests/skill-editor-pane.test.tsx | 2 +- .../tests/skill-editor-pure.test.ts | 0 .../{chat-ui => web}/tests/skill-fixtures.tsx | 4 +- .../tests/skill-import.test.tsx | 0 .../tests/skill-library-actions.test.tsx | 2 +- .../tests/skill-library-list.test.tsx | 0 .../tests/skill-library-page.test.tsx | 0 .../tests/skill-new-form.test.tsx | 0 .../tests/skill-origins.test.tsx | 0 .../tests/skill-personal-library.test.tsx | 0 .../tests/skill-proposal-card.test.tsx | 2 +- .../tests/skill-quality-ui.test.tsx | 2 +- .../tests/skill-save-conflict.test.tsx | 2 +- .../tests/skill-untrusted-content.test.tsx | 0 apps/{chat-ui => web}/tests/sse.test.ts | 2 +- .../tests/stack-trace.test.tsx | 0 .../tests/startup-reads.test.tsx | 4 +- apps/{chat-ui => web}/tests/sw.test.ts | 0 .../tests/theme-provider.test.tsx | 0 .../tests/thread-agent.test.tsx | 4 +- .../tests/thread-list.test.tsx | 4 +- .../tests/thread-title.test.tsx | 4 +- apps/{chat-ui => web}/tests/threads.test.ts | 2 +- .../{chat-ui => web}/tests/tool-card.test.tsx | 2 +- .../tests/tool-images.test.tsx | 2 +- apps/{chat-ui => web}/tests/tool-run.test.tsx | 4 +- .../tests/tool-table.test.tsx | 2 +- .../tests/touch-affordances.test.tsx | 2 +- .../tests/touch-viewport.test.tsx | 0 .../tests/trace-code-block.test.tsx | 0 .../tests/turn-checkpoint.test.tsx | 2 +- .../tests/turn-feedback.test.tsx | 2 +- .../tests/turn-labels.test.tsx | 6 +- .../tests/turns-cache.test.ts | 4 +- .../tests/ui-prompt-banner.test.tsx | 2 +- .../tests/usage-cost.test.tsx | 0 apps/{chat-ui => web}/tests/use-poll.test.tsx | 0 .../{chat-ui => web}/tests/use-rails.test.tsx | 0 .../tests/use-shared-poll.test.tsx | 0 .../tests/use-skill-bundle.test.tsx | 0 .../tests/use-speech-recognition.test.tsx | 0 .../tests/workbench-layout.test.tsx | 6 +- apps/{chat-ui => web}/tests/worker.test.ts | 0 .../tests/workflow-authorship.test.ts | 0 .../tests/workflow-draft.test.ts | 6 +- .../tests/workflow-layout.test.ts | 4 +- .../tests/workflows-page.test.tsx | 28 ++++---- .../tests/workspace-changes.test.tsx | 6 +- .../tests/workspace-header.test.tsx | 16 ++--- apps/{chat-ui => web}/tsconfig.json | 0 apps/{chat-ui => web}/vite.config.ts | 8 +-- apps/{chat-ui => web}/vitest.config.ts | 0 apps/{chat-ui => web}/worker/index.ts | 0 apps/{chat-ui => web}/wrangler.jsonc | 0 biome.json | 4 +- package.json | 12 ++-- packages/design/scripts/sync-brand.ts | 2 +- packages/design/src/mark.ts | 2 +- packages/design/src/tokens.ts | 4 +- packages/felix-client/src/management/index.ts | 2 +- .../felix-client/tests/management.test.ts | 2 +- packages/ui/components.json | 2 +- pnpm-lock.yaml | 2 +- scripts/check-api-drift.mjs | 6 +- scripts/check-bundle-budget.mjs | 8 +-- scripts/check-payload-shapes.mjs | 8 +-- scripts/check-state-palette.mjs | 4 +- scripts/check-tailwind-sources.mjs | 4 +- scripts/sync-harness-contract.mjs | 4 +- tsconfig.json | 4 +- 475 files changed, 813 insertions(+), 789 deletions(-) rename apps/{chat-ui => web}/.dev.vars.example (68%) rename apps/{chat-ui => web}/.gitignore (100%) rename apps/{chat-ui => web}/.impeccable/surfaces/src-app-tsx.md (98%) rename apps/{chat-ui => web}/CLAUDE.md (97%) rename apps/{chat-ui => web}/README.md (86%) rename apps/{chat-ui => web}/components.json (91%) rename apps/{chat-ui => web}/harness-openapi.json (100%) rename apps/{chat-ui => web}/index.html (97%) rename apps/{chat-ui => web}/package.json (98%) rename apps/{chat-ui => web}/public/_headers (100%) rename apps/{chat-ui => web}/public/apple-touch-icon.png (100%) rename apps/{chat-ui => web}/public/favicon.ico (100%) rename apps/{chat-ui => web}/public/favicon.svg (100%) rename apps/{chat-ui => web}/public/icon-192.png (100%) rename apps/{chat-ui => web}/public/icon-512.png (100%) rename apps/{chat-ui => web}/public/icon-maskable-512.png (100%) rename apps/{chat-ui => web}/public/site.webmanifest (100%) rename apps/{chat-ui => web}/public/sw.js (100%) rename apps/{chat-ui/src/api.ts => web/src/api/client.ts} (99%) rename apps/{chat-ui/src => web/src/api}/types.ts (100%) rename apps/{chat-ui/src => web/src/app}/app-shell.tsx (99%) rename apps/{chat-ui/src/App.tsx => web/src/app/app.tsx} (96%) rename apps/{chat-ui/src => web/src/app}/shell-context.ts (99%) rename apps/{chat-ui => web}/src/components/account-chip.tsx (98%) rename apps/{chat-ui => web}/src/components/agent-select.tsx (98%) rename apps/{chat-ui => web}/src/components/agent/agent-sheet.tsx (99%) rename apps/{chat-ui => web}/src/components/ai-elements/context.tsx (100%) rename apps/{chat-ui => web}/src/components/ai-elements/controls.tsx (100%) rename apps/{chat-ui => web}/src/components/ai-elements/file-tree.tsx (100%) rename apps/{chat-ui => web}/src/components/ai-elements/prompt-input.tsx (99%) rename apps/{chat-ui => web}/src/components/app-sidebar.tsx (99%) rename apps/{chat-ui => web}/src/components/approval/approval-decision.tsx (100%) rename apps/{chat-ui => web}/src/components/attention-line.tsx (99%) rename apps/{chat-ui => web}/src/components/auth/auth-card.tsx (100%) rename apps/{chat-ui => web}/src/components/auth/auth-layout.tsx (100%) rename apps/{chat-ui => web}/src/components/auth/github-sign-in.tsx (99%) rename apps/{chat-ui => web}/src/components/auth/google-sign-in.tsx (100%) rename apps/{chat-ui => web}/src/components/auth/last-used-badge.tsx (100%) rename apps/{chat-ui => web}/src/components/brand-mark.tsx (100%) rename apps/{chat-ui => web}/src/components/chat/approval-banner.tsx (97%) rename apps/{chat-ui => web}/src/components/chat/context-meter.tsx (99%) rename apps/{chat-ui => web}/src/components/chat/conversation.tsx (99%) rename apps/{chat-ui => web}/src/components/chat/denial-context.ts (93%) rename apps/{chat-ui => web}/src/components/chat/denials-sync.tsx (95%) rename apps/{chat-ui => web}/src/components/chat/greeting.tsx (96%) rename apps/{chat-ui => web}/src/components/chat/icons.tsx (100%) rename apps/{chat-ui => web}/src/components/chat/install-hint.tsx (100%) rename apps/{chat-ui => web}/src/components/chat/message-actions.tsx (100%) rename apps/{chat-ui => web}/src/components/chat/message.tsx (99%) rename apps/{chat-ui => web}/src/components/chat/multimodal-input.tsx (99%) rename apps/{chat-ui => web}/src/components/chat/plan-card.tsx (100%) rename apps/{chat-ui => web}/src/components/chat/push-hint.tsx (100%) rename apps/{chat-ui => web}/src/components/chat/queued-messages.tsx (100%) rename apps/{chat-ui => web}/src/components/chat/rate-turn.tsx (99%) rename apps/{chat-ui => web}/src/components/chat/reasoning.tsx (100%) rename apps/{chat-ui => web}/src/components/chat/reply-changes-line.tsx (100%) rename apps/{chat-ui => web}/src/components/chat/response.tsx (99%) rename apps/{chat-ui => web}/src/components/chat/rewind-files-dialog.tsx (100%) rename apps/{chat-ui => web}/src/components/chat/run-status.tsx (98%) rename apps/{chat-ui => web}/src/components/chat/side-answer.tsx (97%) rename apps/{chat-ui => web}/src/components/chat/slash-commands.tsx (100%) rename apps/{chat-ui => web}/src/components/chat/stack-trace.tsx (100%) rename apps/{chat-ui => web}/src/components/chat/start-from-item.tsx (98%) rename apps/{chat-ui => web}/src/components/chat/starter-prompts.tsx (98%) rename apps/{chat-ui => web}/src/components/chat/subagent-calls.tsx (98%) rename apps/{chat-ui => web}/src/components/chat/thread-list.tsx (99%) rename apps/{chat-ui => web}/src/components/chat/tool-run.tsx (94%) rename apps/{chat-ui => web}/src/components/chat/tool-sources.tsx (100%) rename apps/{chat-ui => web}/src/components/chat/tool-table.tsx (100%) rename apps/{chat-ui => web}/src/components/chat/tool.tsx (99%) rename apps/{chat-ui => web}/src/components/chat/turn-checkpoint.tsx (100%) rename apps/{chat-ui => web}/src/components/chat/turn-debug.tsx (98%) rename apps/{chat-ui => web}/src/components/chat/ui-prompt-banner.tsx (99%) rename apps/{chat-ui => web}/src/components/chat/watching-banner.tsx (100%) rename apps/{chat-ui => web}/src/components/confirm-button.tsx (100%) rename apps/{chat-ui => web}/src/components/cut-id.tsx (100%) rename apps/{chat-ui => web}/src/components/error-boundary.tsx (100%) rename apps/{chat-ui => web}/src/components/error-notice.tsx (100%) rename apps/{chat-ui => web}/src/components/eval/eval-sheet.tsx (99%) rename apps/{chat-ui => web}/src/components/gate.tsx (98%) rename apps/{chat-ui => web}/src/components/harness-health-line.tsx (98%) rename apps/{chat-ui => web}/src/components/harness/activity-ledger.tsx (99%) rename apps/{chat-ui => web}/src/components/harness/activity.tsx (99%) rename apps/{chat-ui => web}/src/components/harness/agent-heartbeat.tsx (98%) rename apps/{chat-ui => web}/src/components/harness/agent-skills.tsx (98%) rename apps/{chat-ui => web}/src/components/harness/connections.tsx (99%) rename apps/{chat-ui => web}/src/components/harness/documents.tsx (99%) rename apps/{chat-ui => web}/src/components/harness/github.tsx (99%) rename apps/{chat-ui => web}/src/components/harness/harness-agent.tsx (98%) rename apps/{chat-ui => web}/src/components/harness/memory.tsx (99%) rename apps/{chat-ui => web}/src/components/harness/panel.tsx (100%) rename apps/{chat-ui => web}/src/components/harness/skills.tsx (100%) rename apps/{chat-ui => web}/src/components/highlighted-code.tsx (100%) rename apps/{chat-ui => web}/src/components/inspector/debug-section.tsx (99%) rename apps/{chat-ui => web}/src/components/inspector/inspector.tsx (99%) rename apps/{chat-ui => web}/src/components/inspector/plan-editor.tsx (99%) rename apps/{chat-ui => web}/src/components/inspector/primitives.tsx (99%) rename apps/{chat-ui => web}/src/components/jobs/job-create-form.tsx (99%) rename apps/{chat-ui => web}/src/components/jobs/job-details.tsx (99%) rename apps/{chat-ui => web}/src/components/jobs/jobs-sheet.tsx (99%) rename apps/{chat-ui => web}/src/components/jobs/repeat-job-dialog.tsx (96%) rename apps/{chat-ui => web}/src/components/manifests/manifests-sheet.tsx (99%) rename apps/{chat-ui => web}/src/components/needs-you-band.tsx (97%) rename apps/{chat-ui => web}/src/components/pane/edit-notice.ts (97%) rename apps/{chat-ui => web}/src/components/pane/file-actions.tsx (100%) rename apps/{chat-ui => web}/src/components/pane/file-view.tsx (98%) rename apps/{chat-ui => web}/src/components/pane/files-view.tsx (97%) rename apps/{chat-ui => web}/src/components/pane/pane-divider.tsx (100%) rename apps/{chat-ui => web}/src/components/pane/pane-parts.tsx (100%) rename apps/{chat-ui => web}/src/components/pane/pane-zone.tsx (98%) rename apps/{chat-ui => web}/src/components/pane/save-to-workspace.tsx (98%) rename apps/{chat-ui => web}/src/components/pane/side-pane.tsx (99%) rename apps/{chat-ui => web}/src/components/pane/use-pane-layout.ts (100%) rename apps/{chat-ui => web}/src/components/rail-presence.tsx (100%) rename apps/{chat-ui => web}/src/components/skills/asset-preview.tsx (100%) rename apps/{chat-ui => web}/src/components/skills/bundle-changes.tsx (100%) rename apps/{chat-ui => web}/src/components/skills/bundle-compare.ts (100%) rename apps/{chat-ui => web}/src/components/skills/bundle-paths.ts (100%) rename apps/{chat-ui => web}/src/components/skills/code-editor.tsx (100%) rename apps/{chat-ui => web}/src/components/skills/diff-view.tsx (98%) rename apps/{chat-ui => web}/src/components/skills/edit-panel.tsx (99%) rename apps/{chat-ui => web}/src/components/skills/evals-panel.tsx (100%) rename apps/{chat-ui => web}/src/components/skills/feedback-panel.tsx (100%) rename apps/{chat-ui => web}/src/components/skills/file-tree.tsx (100%) rename apps/{chat-ui => web}/src/components/skills/frontmatter-card.tsx (100%) rename apps/{chat-ui => web}/src/components/skills/frontmatter-form.tsx (100%) rename apps/{chat-ui => web}/src/components/skills/frontmatter-lines.ts (100%) rename apps/{chat-ui => web}/src/components/skills/gate-line.tsx (100%) rename apps/{chat-ui => web}/src/components/skills/highlight.ts (100%) rename apps/{chat-ui => web}/src/components/skills/library-list.tsx (100%) rename apps/{chat-ui => web}/src/components/skills/open-skill-editor.ts (92%) rename apps/{chat-ui => web}/src/components/skills/policy-form.tsx (100%) rename apps/{chat-ui => web}/src/components/skills/preview-pane.tsx (100%) rename apps/{chat-ui => web}/src/components/skills/promote-button.tsx (100%) rename apps/{chat-ui => web}/src/components/skills/queries.ts (99%) rename apps/{chat-ui => web}/src/components/skills/query-root.tsx (99%) rename apps/{chat-ui => web}/src/components/skills/refusal.tsx (100%) rename apps/{chat-ui => web}/src/components/skills/review-panel.tsx (100%) rename apps/{chat-ui => web}/src/components/skills/review-queue.tsx (100%) rename apps/{chat-ui => web}/src/components/skills/save-dialog.tsx (100%) rename apps/{chat-ui => web}/src/components/skills/score-readout.tsx (100%) rename apps/{chat-ui => web}/src/components/skills/skill-bundle-browser.tsx (100%) rename apps/{chat-ui => web}/src/components/skills/skill-bundle-editor.tsx (100%) rename apps/{chat-ui => web}/src/components/skills/skill-import.tsx (99%) rename apps/{chat-ui => web}/src/components/skills/skill-library.tsx (99%) rename apps/{chat-ui => web}/src/components/skills/skill-markdown.tsx (100%) rename apps/{chat-ui => web}/src/components/skills/skill-page.tsx (100%) rename apps/{chat-ui => web}/src/components/skills/skill-pane-view.tsx (97%) rename apps/{chat-ui => web}/src/components/skills/skill-proposal-card.tsx (99%) rename apps/{chat-ui => web}/src/components/skills/skill-status.tsx (100%) rename apps/{chat-ui => web}/src/components/skills/skill-tabs.ts (100%) rename apps/{chat-ui => web}/src/components/skills/skills-address.ts (100%) rename apps/{chat-ui => web}/src/components/skills/use-skill-bundle.ts (100%) rename apps/{chat-ui => web}/src/components/skills/use-skill-editor.ts (98%) rename apps/{chat-ui => web}/src/components/skills/validation-panel.tsx (100%) rename apps/{chat-ui => web}/src/components/skills/version-actions.tsx (100%) rename apps/{chat-ui => web}/src/components/skills/version-diff.tsx (100%) rename apps/{chat-ui => web}/src/components/skills/version-picker.tsx (100%) rename apps/{chat-ui => web}/src/components/skills/versions-panel.tsx (100%) rename apps/{chat-ui => web}/src/components/theme-provider.tsx (100%) rename apps/{chat-ui => web}/src/components/thread-title.tsx (99%) rename apps/{chat-ui => web}/src/components/toaster.tsx (100%) rename apps/{chat-ui => web}/src/components/why-disabled.tsx (100%) rename apps/{chat-ui => web}/src/components/workflows/authorship.tsx (100%) rename apps/{chat-ui => web}/src/components/workflows/run-now-form.tsx (98%) rename apps/{chat-ui => web}/src/components/workflows/step-node.tsx (99%) rename apps/{chat-ui => web}/src/components/workflows/step-transcript.tsx (97%) rename apps/{chat-ui => web}/src/components/workflows/use-workflow-draft.ts (98%) rename apps/{chat-ui => web}/src/components/workflows/use-workflow-run.ts (98%) rename apps/{chat-ui => web}/src/components/workflows/workflow-canvas.tsx (99%) rename apps/{chat-ui => web}/src/components/workflows/workflow-editor.tsx (99%) rename apps/{chat-ui => web}/src/components/workflows/workflow-inspector.tsx (99%) rename apps/{chat-ui => web}/src/components/workflows/workflows-page.tsx (99%) rename apps/{chat-ui => web}/src/components/workspace/changes-list.tsx (99%) rename apps/{chat-ui => web}/src/components/workspace/file-row-menu.tsx (100%) rename apps/{chat-ui => web}/src/components/workspace/folder-action.tsx (97%) rename apps/{chat-ui => web}/src/components/workspace/harness-files.tsx (96%) rename apps/{chat-ui => web}/src/components/workspace/repo-files.tsx (97%) rename apps/{chat-ui => web}/src/components/workspace/thread-repo.tsx (98%) rename apps/{chat-ui => web}/src/components/workspace/workspace-section.tsx (96%) rename apps/{chat-ui => web}/src/hooks/use-drawable-url.ts (94%) rename apps/{chat-ui => web}/src/hooks/use-elapsed.ts (100%) rename apps/{chat-ui => web}/src/hooks/use-message-queue.ts (98%) rename apps/{chat-ui => web}/src/hooks/use-pending-approvals.ts (98%) rename apps/{chat-ui => web}/src/hooks/use-rails.ts (100%) rename apps/{chat-ui => web}/src/hooks/use-recent-audit.ts (94%) rename apps/{chat-ui => web}/src/hooks/use-shortcuts.ts (97%) rename apps/{chat-ui => web}/src/hooks/use-speech-recognition.ts (100%) rename apps/{chat-ui => web}/src/hooks/use-visual-viewport.ts (100%) rename apps/{chat-ui => web}/src/hooks/useMediaQuery.ts (100%) rename apps/{chat-ui => web}/src/hooks/usePoll.ts (99%) rename apps/{chat-ui => web}/src/hooks/useSharedPoll.ts (99%) rename apps/{chat-ui/src/lib => web/src/lib/auth}/auth.ts (99%) rename apps/{chat-ui/src/lib => web/src/lib/auth}/connect-return.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/auth}/github-login.ts (99%) rename apps/{chat-ui/src/lib => web/src/lib/conversation}/ai-types.ts (86%) rename apps/{chat-ui/src/lib => web/src/lib/conversation}/call-target.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/conversation}/continue-run.ts (97%) rename apps/{chat-ui/src/lib => web/src/lib/conversation}/denials.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/conversation}/durable-runs.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/conversation}/engine-pool.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/conversation}/frame-store.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/conversation}/image-upload.ts (99%) rename apps/{chat-ui/src/lib => web/src/lib/conversation}/leave.ts (92%) rename apps/{chat-ui/src/lib => web/src/lib/conversation}/ledger.ts (99%) rename apps/{chat-ui/src/lib => web/src/lib/conversation}/needs-you.ts (96%) rename apps/{chat-ui/src/lib => web/src/lib/conversation}/pending-approvals-read.ts (96%) rename apps/{chat-ui/src/lib => web/src/lib/conversation}/presence.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/conversation}/resume.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/conversation}/session-lease.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/conversation}/skill-calls.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/conversation}/tab-thread.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/conversation}/thread-index.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/conversation}/threads.ts (99%) rename apps/{chat-ui/src/lib => web/src/lib/conversation}/tool-run.ts (100%) rename apps/{chat-ui => web}/src/lib/error-toast.tsx (100%) rename apps/{chat-ui => web}/src/lib/format.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/harness}/audit-outcome.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/harness}/connection.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/harness}/harness-glances.ts (99%) rename apps/{chat-ui/src/lib => web/src/lib/harness}/harness-health.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/harness}/identity-state.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/harness}/job-origin.ts (98%) rename apps/{chat-ui/src/lib => web/src/lib/harness}/job-schedule.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/harness}/manifests.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/harness}/opened-identity.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/markdown}/rehype-omitted.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/markdown}/reply-plugins.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/navigation}/shortcuts.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/navigation}/side-pane.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/navigation}/view-change.ts (100%) rename apps/{chat-ui => web}/src/lib/platform.ts (100%) rename apps/{chat-ui => web}/src/lib/push.ts (99%) rename apps/{chat-ui => web}/src/lib/service-worker.ts (100%) rename apps/{chat-ui => web}/src/lib/utils.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/workflows}/workflow-draft.ts (99%) rename apps/{chat-ui/src/lib => web/src/lib/workflows}/workflow-layout.ts (99%) rename apps/{chat-ui/src/lib => web/src/lib/workspace}/changes.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/workspace}/cowork.ts (98%) rename apps/{chat-ui/src/lib => web/src/lib/workspace}/diff.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/workspace}/file-preview.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/workspace}/file-tree.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/workspace}/mount-state.ts (96%) rename apps/{chat-ui/src/lib => web/src/lib/workspace}/save-text.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/workspace}/workspace-events.ts (100%) rename apps/{chat-ui/src/lib => web/src/lib/workspace}/workspace-tools.ts (96%) rename apps/{chat-ui => web}/src/main.tsx (96%) rename apps/{chat-ui => web}/src/routes/harness-pages.tsx (99%) rename apps/{chat-ui => web}/src/routes/harness.tsx (98%) rename apps/{chat-ui => web}/src/routes/workbench.tsx (98%) rename apps/{chat-ui/src => web/src/styles}/chat-utilities.css (100%) rename apps/{chat-ui/src => web/src/styles}/index.css (99%) rename apps/{chat-ui => web}/tests/activity-ledger.test.tsx (99%) rename apps/{chat-ui => web}/tests/agent-heartbeat.test.tsx (99%) rename apps/{chat-ui => web}/tests/agent-skills.test.tsx (96%) rename apps/{chat-ui => web}/tests/agent-work.test.tsx (99%) rename apps/{chat-ui => web}/tests/ai-elements.test.tsx (100%) rename apps/{chat-ui => web}/tests/app-stream.test.tsx (99%) rename apps/{chat-ui => web}/tests/approval-decision.test.tsx (100%) rename apps/{chat-ui => web}/tests/artifacts.test.tsx (95%) rename apps/{chat-ui => web}/tests/attention-line.test.tsx (99%) rename apps/{chat-ui => web}/tests/audit.test.ts (98%) rename apps/{chat-ui => web}/tests/blocked-route.test.tsx (97%) rename apps/{chat-ui => web}/tests/code-editor.test.tsx (100%) rename apps/{chat-ui => web}/tests/composer-controls.test.tsx (99%) rename apps/{chat-ui => web}/tests/composer.test.tsx (99%) rename apps/{chat-ui => web}/tests/confirm-button.test.tsx (100%) rename apps/{chat-ui => web}/tests/connection.test.ts (98%) rename apps/{chat-ui => web}/tests/connections-page.test.tsx (98%) rename apps/{chat-ui => web}/tests/context-meter.test.tsx (98%) rename apps/{chat-ui => web}/tests/continue-run.test.tsx (97%) rename apps/{chat-ui => web}/tests/conversation.test.tsx (97%) rename apps/{chat-ui => web}/tests/debug-mode.test.tsx (98%) rename apps/{chat-ui => web}/tests/delete-thread.test.tsx (98%) rename apps/{chat-ui => web}/tests/denials.test.ts (98%) rename apps/{chat-ui => web}/tests/diff-view.test.tsx (99%) rename apps/{chat-ui => web}/tests/docs-links.test.ts (100%) rename apps/{chat-ui => web}/tests/durable-rejoin.test.tsx (97%) rename apps/{chat-ui => web}/tests/edit-message.test.tsx (99%) rename apps/{chat-ui => web}/tests/error-notice.test.tsx (100%) rename apps/{chat-ui => web}/tests/error-toast.test.tsx (100%) rename apps/{chat-ui => web}/tests/eval-run-link.test.tsx (99%) rename apps/{chat-ui => web}/tests/eval-sheet.test.tsx (99%) rename apps/{chat-ui => web}/tests/file-tree.test.ts (94%) rename apps/{chat-ui => web}/tests/files-auto-open.test.tsx (98%) rename apps/{chat-ui => web}/tests/finished-turns-memo.test.tsx (99%) rename apps/{chat-ui => web}/tests/frame-store.test.ts (98%) rename apps/{chat-ui => web}/tests/gate.test.tsx (99%) rename apps/{chat-ui => web}/tests/github-app.test.tsx (99%) rename apps/{chat-ui => web}/tests/github-login.test.tsx (99%) rename apps/{chat-ui => web}/tests/google-login.test.tsx (99%) rename apps/{chat-ui => web}/tests/greeting.test.tsx (96%) rename apps/{chat-ui => web}/tests/harness-health.test.tsx (98%) rename apps/{chat-ui => web}/tests/harness-route.test.tsx (99%) rename apps/{chat-ui => web}/tests/harness-workspace-pane.test.tsx (98%) rename apps/{chat-ui => web}/tests/headers.test.ts (100%) rename apps/{chat-ui => web}/tests/identity-switch.test.tsx (96%) rename apps/{chat-ui => web}/tests/image-upload.test.tsx (99%) rename apps/{chat-ui => web}/tests/inspector-run.test.tsx (99%) rename apps/{chat-ui => web}/tests/install-hint.test.tsx (100%) rename apps/{chat-ui => web}/tests/job-schedule.test.ts (99%) rename apps/{chat-ui => web}/tests/jobs-sheet.test.tsx (99%) rename apps/{chat-ui => web}/tests/kept-message.test.tsx (100%) rename apps/{chat-ui => web}/tests/kept-rows-workbenches.test.tsx (97%) rename apps/{chat-ui => web}/tests/lease-server.ts (100%) rename apps/{chat-ui => web}/tests/management-verbs.test.tsx (91%) rename apps/{chat-ui => web}/tests/manifest-save-warnings.test.tsx (99%) rename apps/{chat-ui => web}/tests/manifest-version-log.test.tsx (98%) rename apps/{chat-ui => web}/tests/manifests-canary.test.tsx (98%) rename apps/{chat-ui => web}/tests/manifests-import.test.tsx (99%) rename apps/{chat-ui => web}/tests/memory-page.test.tsx (98%) rename apps/{chat-ui => web}/tests/memory.test.ts (98%) rename apps/{chat-ui => web}/tests/message-actions.test.tsx (100%) rename apps/{chat-ui => web}/tests/message.test.tsx (99%) rename apps/{chat-ui => web}/tests/nav-glances.test.ts (99%) rename apps/{chat-ui => web}/tests/needs-you.test.ts (97%) rename apps/{chat-ui => web}/tests/one-reply-label.test.tsx (99%) rename apps/{chat-ui => web}/tests/open-file-pane.test.tsx (97%) rename apps/{chat-ui => web}/tests/output-styles.test.tsx (99%) rename apps/{chat-ui => web}/tests/page-empty.test.tsx (100%) rename apps/{chat-ui => web}/tests/pending-approvals-read.test.ts (96%) rename apps/{chat-ui => web}/tests/plan-card.test.tsx (98%) rename apps/{chat-ui => web}/tests/plan-editor.test.tsx (98%) rename apps/{chat-ui => web}/tests/plans.test.ts (98%) rename apps/{chat-ui => web}/tests/presence.test.ts (99%) rename apps/{chat-ui => web}/tests/push.test.tsx (99%) rename apps/{chat-ui => web}/tests/queued-messages.test.tsx (99%) rename apps/{chat-ui => web}/tests/rail-presence.test.tsx (100%) rename apps/{chat-ui => web}/tests/refused-send-cache.test.tsx (98%) rename apps/{chat-ui => web}/tests/repeat-job.test.tsx (99%) rename apps/{chat-ui => web}/tests/reply-changes.test.tsx (97%) rename apps/{chat-ui => web}/tests/resend.test.tsx (99%) rename apps/{chat-ui => web}/tests/response.test.tsx (97%) rename apps/{chat-ui => web}/tests/resume.test.tsx (97%) rename apps/{chat-ui => web}/tests/rewind-files.test.tsx (99%) rename apps/{chat-ui => web}/tests/routing.test.tsx (98%) rename apps/{chat-ui => web}/tests/run-survives-thread-switch.test.tsx (97%) rename apps/{chat-ui => web}/tests/runnable-commands.test.ts (100%) rename apps/{chat-ui => web}/tests/select-family.test.tsx (100%) rename apps/{chat-ui => web}/tests/send-keeps-out-of-band-turns.test.tsx (96%) rename apps/{chat-ui => web}/tests/session-lease-keeper.test.ts (99%) rename apps/{chat-ui => web}/tests/session-lease-watch.test.tsx (99%) rename apps/{chat-ui => web}/tests/session-lease.test.tsx (99%) rename apps/{chat-ui => web}/tests/setup.ts (82%) rename apps/{chat-ui => web}/tests/sheets-legibility.test.tsx (99%) rename apps/{chat-ui => web}/tests/shell-pick.test.tsx (98%) rename apps/{chat-ui => web}/tests/shortcuts.test.tsx (99%) rename apps/{chat-ui => web}/tests/side-pane.test.tsx (98%) rename apps/{chat-ui => web}/tests/side-question.test.tsx (99%) rename apps/{chat-ui => web}/tests/skill-admin-personal.test.tsx (100%) rename apps/{chat-ui => web}/tests/skill-editor-pane.test.tsx (97%) rename apps/{chat-ui => web}/tests/skill-editor-pure.test.ts (100%) rename apps/{chat-ui => web}/tests/skill-fixtures.tsx (98%) rename apps/{chat-ui => web}/tests/skill-import.test.tsx (100%) rename apps/{chat-ui => web}/tests/skill-library-actions.test.tsx (99%) rename apps/{chat-ui => web}/tests/skill-library-list.test.tsx (100%) rename apps/{chat-ui => web}/tests/skill-library-page.test.tsx (100%) rename apps/{chat-ui => web}/tests/skill-new-form.test.tsx (100%) rename apps/{chat-ui => web}/tests/skill-origins.test.tsx (100%) rename apps/{chat-ui => web}/tests/skill-personal-library.test.tsx (100%) rename apps/{chat-ui => web}/tests/skill-proposal-card.test.tsx (99%) rename apps/{chat-ui => web}/tests/skill-quality-ui.test.tsx (99%) rename apps/{chat-ui => web}/tests/skill-save-conflict.test.tsx (99%) rename apps/{chat-ui => web}/tests/skill-untrusted-content.test.tsx (100%) rename apps/{chat-ui => web}/tests/sse.test.ts (84%) rename apps/{chat-ui => web}/tests/stack-trace.test.tsx (100%) rename apps/{chat-ui => web}/tests/startup-reads.test.tsx (97%) rename apps/{chat-ui => web}/tests/sw.test.ts (100%) rename apps/{chat-ui => web}/tests/theme-provider.test.tsx (100%) rename apps/{chat-ui => web}/tests/thread-agent.test.tsx (99%) rename apps/{chat-ui => web}/tests/thread-list.test.tsx (99%) rename apps/{chat-ui => web}/tests/thread-title.test.tsx (99%) rename apps/{chat-ui => web}/tests/threads.test.ts (98%) rename apps/{chat-ui => web}/tests/tool-card.test.tsx (99%) rename apps/{chat-ui => web}/tests/tool-images.test.tsx (97%) rename apps/{chat-ui => web}/tests/tool-run.test.tsx (98%) rename apps/{chat-ui => web}/tests/tool-table.test.tsx (98%) rename apps/{chat-ui => web}/tests/touch-affordances.test.tsx (96%) rename apps/{chat-ui => web}/tests/touch-viewport.test.tsx (100%) rename apps/{chat-ui => web}/tests/trace-code-block.test.tsx (100%) rename apps/{chat-ui => web}/tests/turn-checkpoint.test.tsx (97%) rename apps/{chat-ui => web}/tests/turn-feedback.test.tsx (99%) rename apps/{chat-ui => web}/tests/turn-labels.test.tsx (96%) rename apps/{chat-ui => web}/tests/turns-cache.test.ts (95%) rename apps/{chat-ui => web}/tests/ui-prompt-banner.test.tsx (98%) rename apps/{chat-ui => web}/tests/usage-cost.test.tsx (100%) rename apps/{chat-ui => web}/tests/use-poll.test.tsx (100%) rename apps/{chat-ui => web}/tests/use-rails.test.tsx (100%) rename apps/{chat-ui => web}/tests/use-shared-poll.test.tsx (100%) rename apps/{chat-ui => web}/tests/use-skill-bundle.test.tsx (100%) rename apps/{chat-ui => web}/tests/use-speech-recognition.test.tsx (100%) rename apps/{chat-ui => web}/tests/workbench-layout.test.tsx (99%) rename apps/{chat-ui => web}/tests/worker.test.ts (100%) rename apps/{chat-ui => web}/tests/workflow-authorship.test.ts (100%) rename apps/{chat-ui => web}/tests/workflow-draft.test.ts (97%) rename apps/{chat-ui => web}/tests/workflow-layout.test.ts (98%) rename apps/{chat-ui => web}/tests/workflows-page.test.tsx (97%) rename apps/{chat-ui => web}/tests/workspace-changes.test.tsx (99%) rename apps/{chat-ui => web}/tests/workspace-header.test.tsx (94%) rename apps/{chat-ui => web}/tsconfig.json (100%) rename apps/{chat-ui => web}/vite.config.ts (94%) rename apps/{chat-ui => web}/vitest.config.ts (100%) rename apps/{chat-ui => web}/worker/index.ts (100%) rename apps/{chat-ui => web}/wrangler.jsonc (100%) diff --git a/.claude/README.md b/.claude/README.md index 47408e37..eec92b86 100644 --- a/.claude/README.md +++ b/.claude/README.md @@ -11,7 +11,7 @@ Delegated by description; invoke explicitly by name when you want a specific one | Agent | Use it for | |---|---| | `workers-engineer` | The two proxy Workers, wrangler config, the `/api/*` contract, bindings and secrets | -| `ui-engineer` | React/Vite/Tailwind work in `apps/chat-ui`, streaming UI, `@felix/ui` | +| `ui-engineer` | React/Vite/Tailwind work in `apps/web`, streaming UI, `@felix/ui` | | `python-harness-engineer` | Python work on the harness (felix-run/felix); requires that checkout in scope | | `postgres-engineer` | Harness schema, migrations, indexing, query plans, tenant-scoped access | | `devops-engineer` | CI, turbo/pnpm pipeline, wrangler deploys, secrets, release verification | @@ -78,7 +78,7 @@ Hooks fail open — every script exits 0 unless it is deliberately blocking. Tes JSON before wiring it: ```bash -echo '{"tool_input":{"file_path":"'"$PWD"'/apps/chat-ui/src/api.ts"}}' | .claude/hooks/impact-reminder.sh +echo '{"tool_input":{"file_path":"'"$PWD"'/apps/web/src/api/client.ts"}}' | .claude/hooks/impact-reminder.sh ``` **Editing `settings.json` requires a session restart.** Skills, agents, and rules hot-reload. diff --git a/.claude/agents/code-quality-reviewer.md b/.claude/agents/code-quality-reviewer.md index 163006b3..77bc11fb 100644 --- a/.claude/agents/code-quality-reviewer.md +++ b/.claude/agents/code-quality-reviewer.md @@ -46,7 +46,7 @@ The per-dimension checklist with concrete repo targets is in the `code-quality` ## What is deliberate here — do not report it as a defect -- **The proxy contract is stated twice on purpose** — `apps/chat-ui/worker/index.ts` and the `/api` +- **The proxy contract is stated twice on purpose** — `apps/web/worker/index.ts` and the `/api` rewrite in `vite.config.ts` — because one runs in production and the other only in `vite dev` (`.claude/rules/protocol-parity.md`). Divergence between them is a finding; the duplication is not. - **`@felix/protocol` is hand-mirrored** from the Python harness in a separate repo. It looks @@ -54,7 +54,7 @@ The per-dimension checklist with concrete repo targets is in the `code-quality` - **`packages/ui` and `packages/cowork-client` ship raw `.tsx`/`.ts`** with no build step. The double wiring (exports map + tsconfig paths) is the design, not an oversight. - **`apps/docs/src/styles/theme.css` is generated** from `packages/design/src/tokens.ts`. -- **shadcn primitives** under `packages/ui/src` and `apps/chat-ui/src/components` are vendored +- **shadcn primitives** under `packages/ui/src` and `apps/web/src/components` are vendored upstream code with relaxed lint rules. Do not restyle them to match house conventions. ## Calibration diff --git a/.claude/agents/code-reviewer.md b/.claude/agents/code-reviewer.md index 721fcf23..5eb7f480 100644 --- a/.claude/agents/code-reviewer.md +++ b/.claude/agents/code-reviewer.md @@ -20,7 +20,7 @@ pre-existing code unless the diff makes it newly wrong. ## This repo's real failure modes — check these first -1. **Proxy contract divergence.** `apps/chat-ui/worker/index.ts` and the `/api` rewrite in +1. **Proxy contract divergence.** `apps/web/worker/index.ts` and the `/api` rewrite in `vite.config.ts` are two copies of the same contract. A change in one and not the other makes dev and production behave differently, and nothing reports it. 2. **Silently unhandled SSE events.** `StreamEvent` ends in an open `{ event: string; … }` arm, so a diff --git a/.claude/agents/dx-engineer.md b/.claude/agents/dx-engineer.md index ea79a52e..6adc7312 100644 --- a/.claude/agents/dx-engineer.md +++ b/.claude/agents/dx-engineer.md @@ -29,7 +29,7 @@ spec. - Test coverage reaches the VFS, the SSE reader, the proxy Workers, and a first slice of React (thread store, theme provider, `usePoll`, Gate) under happy-dom. The remaining gap is the **chat surface**: the composer and the inspector panels, which need a live harness or a lot of mocking. -- The proxy contract lives in two places — `apps/chat-ui/worker/index.ts` and the `/api` rewrite in +- The proxy contract lives in two places — `apps/web/worker/index.ts` and the `/api` rewrite in `vite.config.ts` — with no mechanical check that they agree; parity is discipline alone. - "Verified" for app code means type-check + lint + build + a manual run against a live harness. Any proposal to add an application test suite is a real change in scope — raise it, don't sneak diff --git a/.claude/agents/felix-docs-writer.md b/.claude/agents/felix-docs-writer.md index 4f09c480..90b271dd 100644 --- a/.claude/agents/felix-docs-writer.md +++ b/.claude/agents/felix-docs-writer.md @@ -23,7 +23,7 @@ current Python layout** of felix-run/felix. Do not "clean up" a reference to the You may edit files under `apps/docs/src/content/` (MDX), `CLAUDE.md`, and `.claude/skills/*/SKILL.md` / `.claude/agents/*.md` when they describe docs workflow. Never -change runtime behavior in `apps/chat-ui` unless the prompt explicitly asks. Never deploy. +change runtime behavior in `apps/web` unless the prompt explicitly asks. Never deploy. ## Scope of truth diff --git a/.claude/agents/python-harness-engineer.md b/.claude/agents/python-harness-engineer.md index f1146079..67b0e1ed 100644 --- a/.claude/agents/python-harness-engineer.md +++ b/.claude/agents/python-harness-engineer.md @@ -24,7 +24,7 @@ not in `felix-web`. Before doing anything: ## What the web clients depend on -Changes here are load-bearing for `apps/chat-ui`. Treat these as a public contract: +Changes here are load-bearing for `apps/web`. Treat these as a public contract: - **SSE framing on `POST /chat/stream`** — one event per `\n\n`, `data: ` lines, terminated by `data: [DONE]`. Clients decode with a carry buffer; a malformed or unterminated frame hangs the UI. @@ -40,7 +40,7 @@ Changes here are load-bearing for `apps/chat-ui`. Treat these as a public contra payload shape is a breaking change on both clients. Whenever you change one of these, say so explicitly in your output and name the client files that -must change with it (`packages/felix-protocol/src/types.ts`, `apps/chat-ui/src/{api,types}.ts`). +must change with it (`packages/felix-protocol/src/types.ts`, `apps/web/src/{api,types}.ts`). ## Engineering standards diff --git a/.claude/agents/refactor-engineer.md b/.claude/agents/refactor-engineer.md index aea5a662..4cfb2c5b 100644 --- a/.claude/agents/refactor-engineer.md +++ b/.claude/agents/refactor-engineer.md @@ -21,7 +21,7 @@ saying so. ## Invariants you must not break -1. **The proxy contract is stated twice on purpose.** `apps/chat-ui/worker/index.ts` runs in +1. **The proxy contract is stated twice on purpose.** `apps/web/worker/index.ts` runs in production; the `/api` rewrite in `vite.config.ts` runs only in `vite dev`. They cannot be one module (`.claude/rules/protocol-parity.md`). The correct cleanup is the opposite one: make the copies match, in the same PR. @@ -34,7 +34,7 @@ saying so. `packages/design/src/tokens.ts` via `pnpm sync:theme`; `block-generated.sh` will deny the edit. 5. **Shared dependency versions live in `pnpm-workspace.yaml` under `catalog:`.** Fixing drift means replacing a literal version with `"catalog:"`, not bumping it in the manifest. -6. **shadcn primitives are vendored.** Leave `packages/ui/src` and `apps/chat-ui/src/components` +6. **shadcn primitives are vendored.** Leave `packages/ui/src` and `apps/web/src/components` alone unless the finding is about our own code inside them. ## How to work diff --git a/.claude/agents/security-reviewer.md b/.claude/agents/security-reviewer.md index 5084cf8d..a48db6bc 100644 --- a/.claude/agents/security-reviewer.md +++ b/.claude/agents/security-reviewer.md @@ -16,7 +16,7 @@ exploitable in this architecture — describe the attack, not the category. **Browser → proxy Worker → Python harness → model → back out again.** Two of those hops carry attacker-influenceable content, and one carries credentials. -### 1. The proxy Worker (`apps/chat-ui/worker/index.ts`) +### 1. The proxy Worker (`apps/web/worker/index.ts`) - **No credential of its own.** The Worker forwards a browser's bearer untouched and attaches nothing. Any change that makes it add a credential to a request — an injected key, a service diff --git a/.claude/agents/test-engineer.md b/.claude/agents/test-engineer.md index 27783c9b..64684a2f 100644 --- a/.claude/agents/test-engineer.md +++ b/.claude/agents/test-engineer.md @@ -11,7 +11,7 @@ defect, and you say plainly what remains unverified. ## What is covered today, and what is not -Vitest 4, two configs, no root config: `apps/chat-ui/vitest.config.ts` and +Vitest 4, two configs, no root config: `apps/web/vitest.config.ts` and `packages/cowork-client/vitest.config.ts`. `pnpm test` runs both through turbo — deliberately with **no** `dependsOn`, so a failing dependency can never silently skip a package's tests. @@ -29,8 +29,8 @@ Packages with no `test` script at all: `@felix/ui`, `@felix/protocol`, `@felix/d ## Where a test belongs - **A contract that outlives its caller goes in `packages/test-kit/src/`**, exported through the - `exports` map and called from `apps/chat-ui/tests/`. The suites are parameterized on purpose — see - `apps/chat-ui/tests/sse.test.ts`: the suite takes an injected `run`, the caller supplies the + `exports` map and called from `apps/web/tests/`. The suites are parameterized on purpose — see + `apps/web/tests/sse.test.ts`: the suite takes an injected `run`, the caller supplies the implementation. That indirection is what lets the Worker and reader contracts be stated once, independently of who satisfies them. - **A component test** opens with a `/** @vitest-environment happy-dom */` docblock. The configs diff --git a/.claude/agents/ui-engineer.md b/.claude/agents/ui-engineer.md index 8df2f595..c5d35ea9 100644 --- a/.claude/agents/ui-engineer.md +++ b/.claude/agents/ui-engineer.md @@ -1,13 +1,13 @@ --- name: ui-engineer -description: React/Vite/Tailwind engineer for the chat-ui SPA. Use proactively for any component, hook, state, styling, or streaming-UI work under apps/chat-ui/src, and whenever a change touches the SSE event handling in @felix/client's engine or the shared @felix/ui primitives. +description: React/Vite/Tailwind engineer for the chat-ui SPA. Use proactively for any component, hook, state, styling, or streaming-UI work under apps/web/src, and whenever a change touches the SSE event handling in @felix/client's engine or the shared @felix/ui primitives. tools: Read, Grep, Glob, Edit, Write, Bash, WebFetch model: inherit color: cyan --- -You build the browser client in **felix-web**: `apps/chat-ui` — streaming chat, harness inspector, -and the unattended-run surface (background runs, approval polling, `src/lib/presence.ts`). +You build the browser client in **felix-web**: `apps/web` — streaming chat, harness inspector, +and the unattended-run surface (background runs, approval polling, `src/lib/conversation/presence.ts`). Stack: React 18, Vite 8, Tailwind v4 (CSS-first — there is no `tailwind.config`), shadcn/ui via `@felix/ui`, `streamdown` for markdown, `sonner` for toasts, `lucide-react` for icons. @@ -36,7 +36,7 @@ Use the `api-contract-change` skill for the full procedure. - Client state that must survive reload goes in `localStorage` under a `felix.*` key (`felix.threadId`, `felix.manifest`, …). Server state is authoritative: hydrate from `GET /chat/sessions/{id}`; the `localStorage` transcript mirror in - `src/lib/threads.ts` exists only because `GET /chat/history/{id}` rejects anonymous callers. + `src/lib/conversation/threads.ts` exists only because `GET /chat/history/{id}` rejects anonymous callers. - Each tab mints a holder id and takes an exclusive session lease. A 409 means another client drives the thread: the keeper observes (`shared`), the shell goes read-only, and the keeper retries `exclusive` once per renewal tick — never in a tight loop. Driving requests carry the @@ -54,12 +54,12 @@ Gate, the engine at the wire, and `App.tsx` end to end — **not** the composer Never say "tests pass" as if the UI you changed were covered. Verify with: ```bash -pnpm --filter @felix/chat-ui check-types -pnpm --filter @felix/chat-ui lint -pnpm --filter @felix/chat-ui build +pnpm --filter @felix/web check-types +pnpm --filter @felix/web lint +pnpm --filter @felix/web build ``` -For behavior, `pnpm chat:dev` needs the Python harness running on `:8080` +For behavior, `pnpm web:dev` needs the Python harness running on `:8080` (`make up && make migrate` in felix-run/felix). Without it the app loads and every `/api/*` call fails — say so rather than reporting a broken UI as a code bug. diff --git a/.claude/agents/workers-engineer.md b/.claude/agents/workers-engineer.md index f863bb3d..3bdbf9a4 100644 --- a/.claude/agents/workers-engineer.md +++ b/.claude/agents/workers-engineer.md @@ -1,6 +1,6 @@ --- name: workers-engineer -description: Cloudflare Workers specialist for the felix-web proxy Worker and wrangler config. Use proactively whenever apps/chat-ui/worker/index.ts, a wrangler.jsonc, an assets/SPA-fallback question, or the /api/* proxy contract is involved — including header handling, SSE pass-through, bindings, secrets, and routes. +description: Cloudflare Workers specialist for the felix-web proxy Worker and wrangler config. Use proactively whenever apps/web/worker/index.ts, a wrangler.jsonc, an assets/SPA-fallback question, or the /api/* proxy contract is involved — including header handling, SSE pass-through, bindings, secrets, and routes. tools: Read, Grep, Glob, Edit, Write, Bash, WebFetch model: inherit color: orange @@ -36,7 +36,7 @@ client possible at all. Same-origin in, HTTP out. ## Config facts -- `apps/chat-ui/wrangler.jsonc` is **tracked** and is what CI deploys to make.felix.run; it ships a `.dev.vars.example` for `wrangler dev`. Keep +- `apps/web/wrangler.jsonc` is **tracked** and is what CI deploys to make.felix.run; it ships a `.dev.vars.example` for `wrangler dev`. Keep that example in step when you change bindings or vars. `apps/docs/wrangler.jsonc` is tracked because it holds no account or resource ids. - Routes are custom domains: `make.felix.run`, `docs.felix.run`. @@ -46,7 +46,7 @@ client possible at all. Same-origin in, HTTP out. 1. Read the Worker and the `vite.config.ts` dev proxy before editing either. State in your output whether the change applies to one or both, and why. -2. Type-check with `pnpm --filter @felix/chat-ui check-types`, then run `pnpm test`: the suite in +2. Type-check with `pnpm --filter @felix/web check-types`, then run `pnpm test`: the suite in `@felix/test-kit` holds the Worker to the `/api/*` contract — the gate key never going upstream, the body streaming through untouched. It does not cover deployed behavior. 3. For runtime verification, `wrangler dev` in the app directory, against a running harness on diff --git a/.claude/hooks/failure-hint.sh b/.claude/hooks/failure-hint.sh index d4d50516..66a76341 100755 --- a/.claude/hooks/failure-hint.sh +++ b/.claude/hooks/failure-hint.sh @@ -9,6 +9,6 @@ case "$cmd" in *) exit 0;; esac -jq -cn --arg ctx "felix-web failure shortlist: (1) 'Cannot find module @felix/ui/...' or @felix/cowork-client → those packages have NO build step; the export must exist in the package's exports map AND in the tsconfig paths of apps/chat-ui (add-ui-primitive skill). (2) tsc errors on possibly-undefined index access → the workspace tsconfig sets noUncheckedIndexedAccess; handle the undefined rather than adding '!'. (3) tsc noUnusedLocals/noUnusedParameters → chat-ui enables them; delete the unused binding. (4) biome check failures → pnpm format fixes formatting; real lint errors need a code change, not a config change. (5) wrangler 'assets directory does not exist' → run the build first ('*:deploy' scripts already do). (6) wrangler cannot find wrangler.jsonc → run wrangler from the app directory (pnpm --filter @felix/ exec wrangler); both configs are tracked. (7) ECONNREFUSED / 502 on :8080 in dev → the Python harness is not running; 'make up && make migrate' in felix-run/felix. (8) 502 felix_origin_unset → vars.FELIX_ORIGIN missing in wrangler.jsonc. (9) astro 'does not exist in collection docs' or a missing page → prose lives at src/content/ (not src/content/docs/) and new pages must be registered in the sidebar in astro.config.mjs. (10) ERR_PNPM_OUTDATED_LOCKFILE → run pnpm install; never hand-edit the lockfile. (11) 'vitest not found' / 'no test specified' → only apps/chat-ui and packages/cowork-client have a test script and a vitest.config.ts; the other packages have none by design, so scope the run with pnpm --filter rather than adding a config." \ +jq -cn --arg ctx "felix-web failure shortlist: (1) 'Cannot find module @felix/ui/...' or @felix/cowork-client → those packages have NO build step; the export must exist in the package's exports map AND in the tsconfig paths of apps/web (add-ui-primitive skill). (2) tsc errors on possibly-undefined index access → the workspace tsconfig sets noUncheckedIndexedAccess; handle the undefined rather than adding '!'. (3) tsc noUnusedLocals/noUnusedParameters → chat-ui enables them; delete the unused binding. (4) biome check failures → pnpm format fixes formatting; real lint errors need a code change, not a config change. (5) wrangler 'assets directory does not exist' → run the build first ('*:deploy' scripts already do). (6) wrangler cannot find wrangler.jsonc → run wrangler from the app directory (pnpm --filter @felix/ exec wrangler); both configs are tracked. (7) ECONNREFUSED / 502 on :8080 in dev → the Python harness is not running; 'make up && make migrate' in felix-run/felix. (8) 502 felix_origin_unset → vars.FELIX_ORIGIN missing in wrangler.jsonc. (9) astro 'does not exist in collection docs' or a missing page → prose lives at src/content/ (not src/content/docs/) and new pages must be registered in the sidebar in astro.config.mjs. (10) ERR_PNPM_OUTDATED_LOCKFILE → run pnpm install; never hand-edit the lockfile. (11) 'vitest not found' / 'no test specified' → only apps/web and packages/cowork-client have a test script and a vitest.config.ts; the other packages have none by design, so scope the run with pnpm --filter rather than adding a config." \ '{hookSpecificOutput:{hookEventName:"PostToolUseFailure",additionalContext:$ctx}}' exit 0 diff --git a/.claude/hooks/impact-reminder.sh b/.claude/hooks/impact-reminder.sh index 327c6c97..9734bcd7 100755 --- a/.claude/hooks/impact-reminder.sh +++ b/.claude/hooks/impact-reminder.sh @@ -13,20 +13,20 @@ emit() { } case "$rel" in - apps/chat-ui/src/types.ts|apps/chat-ui/src/api.ts) + apps/web/src/api/types.ts|apps/web/src/api/client.ts) emit "Wire contract touched. The shared types live in packages/felix-protocol and the chat half of the HTTP surface in packages/felix-client — check whether the change belongs in one of those rather than here. If you added a StreamEvent arm, add the matching case in packages/felix-client/src/engine.ts — the union's catch-all arm means an unhandled frame type-checks and silently does nothing. See the api-contract-change skill." ;; packages/felix-client/src/engine.ts) emit "The one StreamEvent switch. Every client renders this — chat-ui today, any other surface after it — so a change here is not scoped to one app. A new arm in packages/felix-protocol/src/types.ts needs its case here or the frame silently does nothing; pnpm check-protocol-parity reads THIS file. Frames the run blocks on (tool_request, approval_required, ui_request) must be answered on every path, errors and aborts included." ;; apps/tui/src/workspace.ts) emit "Terminal client tools changed — this is the surface where the MODEL drives the user's REAL filesystem, not a VFS. Re-check resolveWithin against '..', absolute paths, encoded traversal and symlinks (it compares real paths for that reason), and confirm writes still wait on the confirmation prompt. Every path must settle with a RESULT, never a throw or a hang. Consider the threat-review skill." ;; packages/felix-client/src/transport.ts) - emit "Chat routes changed. pnpm check-api-drift reads this file alongside apps/chat-ui/src/api.ts — keep the paths as literals passed to chatFetch/rawFetch (harness-relative, no /api prefix) or the call becomes invisible to the check. Response *shapes* are guarded separately by pnpm check-payload-shapes." ;; - apps/chat-ui/worker/index.ts) - emit "Proxy Worker changed. The dev proxy in apps/chat-ui/vite.config.ts is a second copy of the same /api/* contract (prefix strip + FELIX_ORIGIN) — apply the same change there, or dev and prod diverge silently." ;; - apps/chat-ui/vite.config.ts) - emit "The dev /api proxy mirrors the production Worker (prefix strip + FELIX_ORIGIN). If you changed proxy behavior, apps/chat-ui/worker/index.ts must match, or dev and prod diverge silently." ;; + emit "Chat routes changed. pnpm check-api-drift reads this file alongside apps/web/src/api/client.ts — keep the paths as literals passed to chatFetch/rawFetch (harness-relative, no /api prefix) or the call becomes invisible to the check. Response *shapes* are guarded separately by pnpm check-payload-shapes." ;; + apps/web/worker/index.ts) + emit "Proxy Worker changed. The dev proxy in apps/web/vite.config.ts is a second copy of the same /api/* contract (prefix strip + FELIX_ORIGIN) — apply the same change there, or dev and prod diverge silently." ;; + apps/web/vite.config.ts) + emit "The dev /api proxy mirrors the production Worker (prefix strip + FELIX_ORIGIN). If you changed proxy behavior, apps/web/worker/index.ts must match, or dev and prod diverge silently." ;; packages/ui/src/*) - emit "Shared UI package changed. @felix/ui has NO build step: a new non-flat export needs an entry in packages/ui/package.json exports AND a matching paths entry in apps/chat-ui/tsconfig.json. New dependencies belong in packages/ui/package.json. See the add-ui-primitive skill." ;; + emit "Shared UI package changed. @felix/ui has NO build step: a new non-flat export needs an entry in packages/ui/package.json exports AND a matching paths entry in apps/web/tsconfig.json. New dependencies belong in packages/ui/package.json. See the add-ui-primitive skill." ;; packages/cowork-client/src/*) emit "Client-tool / VFS code changed — this is the surface where the MODEL drives the user's filesystem. Re-check path normalization against '..', absolute paths, and encoded traversal, and confirm destructive operations still require approval. chat-ui binds this package in src/lib/cowork.ts. Consider the threat-review skill." ;; packages/design/src/tokens.ts) diff --git a/.claude/hooks/session-start.sh b/.claude/hooks/session-start.sh index 06f1503c..274d2a8a 100755 --- a/.claude/hooks/session-start.sh +++ b/.claude/hooks/session-start.sh @@ -11,7 +11,7 @@ add() { out="${out}$1 # Is the Python harness up? Everything under /api/* fails in dev without it. if ! (exec 3<>/dev/tcp/127.0.0.1/8080) 2>/dev/null; then - add "- Python Felix harness is NOT listening on :8080, so every /api/* call in chat:dev will fail. Start it in the felix-run/felix repo: make up && make migrate" + add "- Python Felix harness is NOT listening on :8080, so every /api/* call in web:dev will fail. Start it in the felix-run/felix repo: make up && make migrate" fi branch=$(cd "$root" 2>/dev/null && git rev-parse --abbrev-ref HEAD 2>/dev/null) diff --git a/.claude/hooks/stop-gate.sh b/.claude/hooks/stop-gate.sh index 08c6d461..47c84b60 100755 --- a/.claude/hooks/stop-gate.sh +++ b/.claude/hooks/stop-gate.sh @@ -19,7 +19,7 @@ state="${TMPDIR:-/tmp}/felix-web-stop-$sid" # --- 1. docs drift ----------------------------------------------------------- # Surfaces a reader of the docs would notice changing. -surfaces=$(printf '%s\n' "$changed" | grep -E '^(apps/chat-ui/(src/(api|types)\.ts|worker/index\.ts)|apps/chat-ui/wrangler\.example\.jsonc|packages/design/src/tokens\.ts)$') +surfaces=$(printf '%s\n' "$changed" | grep -E '^(apps/web/(src/(api|types)\.ts|worker/index\.ts)|apps/web/wrangler\.example\.jsonc|packages/design/src/tokens\.ts)$') if [ -n "$surfaces" ]; then # Any doc-side change in the same tree counts as "docs were considered". diff --git a/.claude/rules/docs-terminology.md b/.claude/rules/docs-terminology.md index dcf3cb59..014562a2 100644 --- a/.claude/rules/docs-terminology.md +++ b/.claude/rules/docs-terminology.md @@ -15,7 +15,7 @@ context alone. Name them like this: "each Worker polls", "the Worker's `webhook_delivery` cron". - **Cloudflare Worker** is anything deployed to Cloudflare Workers: the workspace gateway (`deploy/cloudflare/workspace-gateway` in the harness checkout) and chat-ui's `/api/*` proxy - (`apps/chat-ui/worker/index.ts`). Always spell it out — "the gateway's Cloudflare Worker", "the + (`apps/web/worker/index.ts`). Always spell it out — "the gateway's Cloudflare Worker", "the chat-ui Cloudflare Worker" — never a bare "Worker", "gateway Worker" or "proxy Worker", since bare "Worker" means the compose service. diff --git a/.claude/rules/protocol-parity.md b/.claude/rules/protocol-parity.md index c02158f3..99ff3fc1 100644 --- a/.claude/rules/protocol-parity.md +++ b/.claude/rules/protocol-parity.md @@ -1,9 +1,9 @@ --- paths: - - "apps/chat-ui/src/api.ts" - - "apps/chat-ui/src/types.ts" - - "apps/chat-ui/src/App.tsx" - - "apps/chat-ui/src/lib/presence.ts" + - "apps/web/src/api/client.ts" + - "apps/web/src/api/types.ts" + - "apps/web/src/app/app.tsx" + - "apps/web/src/lib/conversation/presence.ts" - "packages/felix-client/src/*.ts" - "apps/*/worker/index.ts" - "apps/*/vite.config.ts" @@ -28,8 +28,8 @@ must be listed rather than trusted. ## 1. The `/api/*` proxy contract — two copies -`apps/chat-ui/worker/index.ts` runs in production; the `server.proxy` block in -`apps/chat-ui/vite.config.ts` runs only under `vite dev`. Both strip the `/api` prefix and forward to +`apps/web/worker/index.ts` runs in production; the `server.proxy` block in +`apps/web/vite.config.ts` runs only under `vite dev`. Both strip the `/api` prefix and forward to the harness. They cannot be one module — different runtimes, different config — so if they drift, dev and production behave differently and nothing reports it. @@ -78,7 +78,7 @@ A blocking state is supposed to arrive as an SSE frame, and does not reliably: t announce a gated tool on the stream, and a **durable** run (`POST /chat` → `202 + resume_token`) carries no frames at all — `/chat/runs/{token}` reports only its own status. So the same state is also discovered by the `/approvals` poll — `syncApprovals` in `@felix/client`, driven for as long as -a run is in flight — and announced outside the viewport through chat-ui's `src/lib/presence.ts`. +a run is in flight — and announced outside the viewport through chat-ui's `src/lib/conversation/presence.ts`. Wiring only the frame is the failure this rule exists to prevent: it looks correct in a watched tab and hangs forever in an unwatched one. diff --git a/.claude/settings.json b/.claude/settings.json index 4ed9733e..d62952e9 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -107,17 +107,17 @@ "Bash(pnpm format)", "Bash(pnpm check-types)", "Bash(pnpm test)", - "Bash(pnpm --filter @felix/chat-ui test)", + "Bash(pnpm --filter @felix/web test)", "Bash(pnpm --filter @felix/tui test)", "Bash(pnpm --filter @felix/cowork-client test)", "Bash(pnpm --filter @felix/client test)", "Bash(pnpm --filter @felix/skill-format test)", - "Bash(pnpm chat:build)", + "Bash(pnpm web:build)", "Bash(pnpm docs:build)", - "Bash(pnpm --filter @felix/chat-ui build)", + "Bash(pnpm --filter @felix/web build)", "Bash(pnpm --filter @felix/docs build)", "Bash(pnpm --filter @felix/tui build)", - "Bash(pnpm --filter @felix/chat-ui lint)", + "Bash(pnpm --filter @felix/web lint)", "Bash(pnpm --filter @felix/docs lint)", "Bash(pnpm --filter @felix/tui lint)", "Bash(pnpm --filter @felix/cowork-client lint)", @@ -127,7 +127,7 @@ "Bash(pnpm --filter @felix/skill-format lint)", "Bash(pnpm --filter @felix/test-kit lint)", "Bash(pnpm --filter @felix/ui lint)", - "Bash(pnpm --filter @felix/chat-ui check-types)", + "Bash(pnpm --filter @felix/web check-types)", "Bash(pnpm --filter @felix/docs check-types)", "Bash(pnpm --filter @felix/tui check-types)", "Bash(pnpm --filter @felix/cowork-client check-types)", @@ -151,7 +151,7 @@ "Bash(gh pr checks:*)" ], "ask": [ - "Bash(pnpm chat:deploy)", + "Bash(pnpm web:deploy)", "Bash(pnpm docs:deploy)", "Bash(pnpm --filter * deploy*)", "Bash(pnpm --filter * run deploy*)", diff --git a/.claude/skills/add-ui-primitive/SKILL.md b/.claude/skills/add-ui-primitive/SKILL.md index 3257a48f..b13298bc 100644 --- a/.claude/skills/add-ui-primitive/SKILL.md +++ b/.claude/skills/add-ui-primitive/SKILL.md @@ -18,7 +18,7 @@ app's tsconfig. That means adding a component is three wiring steps, not one. pnpm dlx shadcn@latest add --cwd packages/ui ``` -Config comes from `apps/chat-ui/components.json`: style `new-york`, base color `neutral`, CSS +Config comes from `apps/web/components.json`: style `new-york`, base color `neutral`, CSS variables on, `lucide` icons, `utils` aliased to `@felix/ui/lib/utils`. Files land in `packages/ui/src/`, flat — no `components/ui/` nesting. @@ -41,7 +41,7 @@ top-level `.tsx` — a subdirectory, a `.ts` helper, a hook — needs its own `e ## 3. Check the tsconfig paths -`apps/chat-ui/tsconfig.json` carries: +`apps/web/tsconfig.json` carries: ```json "@felix/ui/*": ["../../packages/ui/src/*"], @@ -70,7 +70,7 @@ Shared versions live in the `catalog:` block of `pnpm-workspace.yaml`, so: ```bash pnpm --filter @felix/ui check-types -pnpm --filter @felix/chat-ui check-types +pnpm --filter @felix/web check-types pnpm lint ``` diff --git a/.claude/skills/api-contract-change/SKILL.md b/.claude/skills/api-contract-change/SKILL.md index bddabfa4..5a7110ff 100644 --- a/.claude/skills/api-contract-change/SKILL.md +++ b/.claude/skills/api-contract-change/SKILL.md @@ -20,8 +20,8 @@ that hides missing handlers. Follow this in order. | `packages/felix-client/src/http.ts` | The credentialed `chatFetch`/`rawFetch` both halves share | | `packages/felix-client/src/transport.ts` | The chat verbs | | `packages/felix-client/src/management/*.ts` | The read-only operator reads — audit, usage, memory, plans, artifacts — types beside their fetcher | -| `apps/chat-ui/src/api.ts` | `apiFetch` + the browser-only **write** surface: eval, manifests, jobs, agent card | -| `apps/chat-ui/src/types.ts` | chat-ui-only: `Turn`, and the write-surface shapes | +| `apps/web/src/api/client.ts` | `apiFetch` + the browser-only **write** surface: eval, manifests, jobs, agent card | +| `apps/web/src/api/types.ts` | chat-ui-only: `Turn`, and the write-surface shapes | Plus the consumer: `packages/felix-client/src/engine.ts`, where the `switch` over `StreamEvent` lives — one switch for every client, and the file `check-protocol-parity` reads. @@ -60,7 +60,7 @@ catalog and the flows each frame belongs to. 3. **Add the client function**, if it is a REST call, in the file that matches who needs it. A route any client would want goes in `packages/felix-client/` — a chat verb in `transport.ts`, an operator read in `management/`, with its row type declared beside it. A browser-only write stays - in `apps/chat-ui/src/api.ts`. Match the house style: go through the area's wrapper (`chatFetch` + in `apps/web/src/api/client.ts`. Match the house style: go through the area's wrapper (`chatFetch` in the package, `apiFetch` in chat-ui — never bare `fetch`), check `res.ok`, throw `` `${route}: ${res.status} ${detail.slice(0, 200)}` `` on failure. That spelling is load-bearing: `describeError` reads the status back out of it with `/:\s*(\d{3})\b/`. @@ -80,17 +80,17 @@ catalog and the flows each frame belongs to. 5. **Decide about the unattended path.** A frame the run blocks on has to reach an operator who is not looking: a durable run carries no frames at all, so anything blocking needs a `/approvals`-style - poll and a `setPresence('blocked')` (`src/lib/presence.ts`), not just a banner. + poll and a `setPresence('blocked')` (`src/lib/conversation/presence.ts`), not just a banner. 6. **Verify.** `pnpm check-types && pnpm lint` proves nothing about the frame itself — trigger it - against a live harness (`pnpm chat:dev`) and confirm the UI reacts. Use the `preflight` skill for + against a live harness (`pnpm web:dev`) and confirm the UI reacts. Use the `preflight` skill for the full loop. For an SSE change run `pnpm check-protocol-parity`, which fails when a `StreamEvent` arm has no handler in either app — the failure mode the open union arm hides. For a REST change also run `pnpm check-api-drift`, which diffs every client call site's path and - verb against `apps/chat-ui/harness-openapi.json`. If the harness gained the route you are calling, + verb against `apps/web/harness-openapi.json`. If the harness gained the route you are calling, refresh that snapshot in the same PR — instructions are in `scripts/check-api-drift.mjs`. 7. **Document it** if the change is user-visible or operator-relevant: `apps/docs/src/content/` diff --git a/.claude/skills/api-contract-change/references/wire-protocol.md b/.claude/skills/api-contract-change/references/wire-protocol.md index bc0a5040..ca5df22e 100644 --- a/.claude/skills/api-contract-change/references/wire-protocol.md +++ b/.claude/skills/api-contract-change/references/wire-protocol.md @@ -2,7 +2,7 @@ Reference for `api-contract-change`. Source of truth is the Python harness ([felix-run/felix](https://github.com/felix-run/felix)); this file records what the browser clients -currently implement, in `apps/chat-ui/src/{api,types}.ts`. +currently implement, in `apps/web/src/{api,types}.ts`. ## Transport @@ -45,7 +45,7 @@ accepted by the compiler and ignored at runtime. - `POST /chat/rewind` — move the active leaf to an earlier event - `POST /chat/abort`, `POST /chat/steer`, `POST /chat/continue`, thinking-level set - `GET /chat/history/{thread_id}` — **rejects anonymous callers**; hence the `localStorage` mirror in - `src/lib/threads.ts` + `src/lib/conversation/threads.ts` **Inspector and management** (tenant-scoped; anonymous callers resolve to tenant `default`) - `GET /v1/models` — manifest list for the switcher diff --git a/.claude/skills/branch-pr-workflow/SKILL.md b/.claude/skills/branch-pr-workflow/SKILL.md index 10a742ff..b0133d27 100644 --- a/.claude/skills/branch-pr-workflow/SKILL.md +++ b/.claude/skills/branch-pr-workflow/SKILL.md @@ -43,7 +43,7 @@ See also [.claude/rules/git-workflow.md](../../rules/git-workflow.md). 2. **Work + verify** on the branch. This monorepo is the chat-ui and docs Workers only — the runtime is [felix-run/felix](https://github.com/felix-run/felix) (Python). Prefer the package - under change: `pnpm --filter @felix/chat-ui …` / `@felix/docs`, or root scripts + under change: `pnpm --filter @felix/web …` / `@felix/docs`, or root scripts when they apply. Docs prose lives in `apps/docs/src/content/` (MDX). Verification is `pnpm check-types`, `pnpm lint`, `pnpm test`, and `pnpm build`, plus a manual run diff --git a/.claude/skills/code-quality/references/dimensions.md b/.claude/skills/code-quality/references/dimensions.md index 5c399fc7..7cec9a40 100644 --- a/.claude/skills/code-quality/references/dimensions.md +++ b/.claude/skills/code-quality/references/dimensions.md @@ -23,12 +23,12 @@ sweep looks in the right place instead of grepping the whole tree. ## 2. Test quality and coverage -- Two configs: `apps/chat-ui/vitest.config.ts` and `packages/cowork-client/vitest.config.ts`. No +- Two configs: `apps/web/vitest.config.ts` and `packages/cowork-client/vitest.config.ts`. No root config, no coverage tool. - Contract-level behavior lives in `packages/test-kit/src/proxy-worker.ts` and - `packages/test-kit/src/sse.ts`, invoked from `apps/chat-ui/tests/`. The suites are parameterized + `packages/test-kit/src/sse.ts`, invoked from `apps/web/tests/`. The suites are parameterized on an injected implementation, which is what lets the contract be stated independently of its - caller — see `apps/chat-ui/tests/sse.test.ts`. + caller — see `apps/web/tests/sse.test.ts`. - Covered today: the VFS, the SSE reader, the proxy Worker, and chat-ui's thread store, theme provider, `usePoll`, presence, Gate, the engine, and `App.tsx`. **Uncovered: the composer, the inspector panels.** @@ -42,7 +42,7 @@ sweep looks in the right place instead of grepping the whole tree. code as a clean bill. - Strictness is not uniform, and code moving between tiers can lose a guarantee: - | Flag | root / `packages/*` | `apps/chat-ui` | + | Flag | root / `packages/*` | `apps/web` | |---|---|---| | `strict` | on | on | | `noUncheckedIndexedAccess` | **on** | **off** | @@ -56,7 +56,7 @@ sweep looks in the right place instead of grepping the whole tree. arm. A new frame type compiles with no handler and silently does nothing, so "the types pass" says nothing about SSE completeness. Cross-check the arms against the `switch` in `@felix/client`. - Widening a shared package's surface is a commitment: the `exports` map **and** the `paths` block - in `apps/chat-ui/tsconfig.json` both have to change. A helper with a single call site does not + in `apps/web/tsconfig.json` both have to change. A helper with a single call site does not belong in a shared package. ## 4. Dependency and bundle hygiene diff --git a/.claude/skills/deploy-runbook/SKILL.md b/.claude/skills/deploy-runbook/SKILL.md index d3f6a67a..fe3a7703 100644 --- a/.claude/skills/deploy-runbook/SKILL.md +++ b/.claude/skills/deploy-runbook/SKILL.md @@ -20,7 +20,7 @@ around it. | App | Script | Route | |---|---|---| -| `@felix/chat-ui` | `pnpm chat:deploy` | `make.felix.run` | +| `@felix/web` | `pnpm web:deploy` | `make.felix.run` | | `@felix/docs` | `pnpm docs:deploy` | `docs.felix.run` | Each `*:deploy` script is `pnpm build && wrangler deploy` inside that package. @@ -55,14 +55,14 @@ harness must have one on before this deploy. A Worker deployed before the shared retired still holds `CHAT_UI_KEY` and `FELIX_API_KEY`; they are ignored — delete them: ```bash -pnpm --filter @felix/chat-ui exec wrangler secret delete CHAT_UI_KEY -pnpm --filter @felix/chat-ui exec wrangler secret delete FELIX_API_KEY +pnpm --filter @felix/web exec wrangler secret delete CHAT_UI_KEY +pnpm --filter @felix/web exec wrangler secret delete FELIX_API_KEY ``` ## 3. Deploy ```bash -pnpm chat:deploy # or docs:deploy +pnpm web:deploy # or docs:deploy ``` ## 4. Verify — actually check, don't assume diff --git a/.claude/skills/preflight/SKILL.md b/.claude/skills/preflight/SKILL.md index c38584ac..9862a2a1 100644 --- a/.claude/skills/preflight/SKILL.md +++ b/.claude/skills/preflight/SKILL.md @@ -48,7 +48,7 @@ scanned. Scope to one package when the change is contained — it is much faster: ```bash -pnpm --filter @felix/chat-ui check-types +pnpm --filter @felix/web check-types pnpm --filter @felix/docs build ``` @@ -61,14 +61,14 @@ These checks pass on code that is still broken. If your change is in one of thes report that it is unverified, or exercise it manually: - **Runtime behavior of anything touching `/api/*`.** Needs the Python harness on `:8080` - (`make up && make migrate` in felix-run/felix), then `pnpm chat:dev`. + (`make up && make migrate` in felix-run/felix), then `pnpm web:dev`. - **A new SSE event with no `switch` case.** `StreamEvent` has an open catch-all arm, so this type-checks and does nothing. Verify by triggering the frame. -- **Dev/prod proxy divergence.** Nothing mechanically checks that `apps/chat-ui/worker/index.ts` - and the `/api` rewrite in `apps/chat-ui/vite.config.ts` still describe the same contract. Read +- **Dev/prod proxy divergence.** Nothing mechanically checks that `apps/web/worker/index.ts` + and the `/api` rewrite in `apps/web/vite.config.ts` still describe the same contract. Read both when you touch either. - **The unattended path.** A background run carries no SSE frames, so a blocking state reaches the - operator only through the `/approvals` poll and `src/lib/presence.ts`. Streaming green says + operator only through the `/approvals` poll and `src/lib/conversation/presence.ts`. Streaming green says nothing about it. - **The Workers themselves.** `vite build` does not exercise `worker/index.ts`. Use `wrangler dev` in the app directory. diff --git a/.claude/skills/python-harness/SKILL.md b/.claude/skills/python-harness/SKILL.md index ca05df24..09e6d45b 100644 --- a/.claude/skills/python-harness/SKILL.md +++ b/.claude/skills/python-harness/SKILL.md @@ -30,7 +30,7 @@ type checker, test layout and runner, line length, Python version. Run the proje do not invent `make test` if the repo doesn't have it. Local dev, as referenced from this repo: `make up && make migrate` brings the harness up on -`:8080`, which is what `pnpm chat:dev` proxies to. +`:8080`, which is what `pnpm web:dev` proxies to. ## The contract you must not break casually @@ -55,7 +55,7 @@ The browser clients hand-mirror the harness's wire format. These are load-bearin When you change any of these, name the felix-web files that must change with it — the shared `packages/felix-protocol` (wire types and the SSE reader, one copy for both apps), each app's own `src/api.ts`, and the engine `switch` in `@felix/client` — and use the `api-contract-change` skill to land -the client side. Route changes also want `apps/chat-ui/harness-openapi.json` refreshed, which +the client side. Route changes also want `apps/web/harness-openapi.json` refreshed, which `pnpm check-api-drift` enforces. ## Engineering rules diff --git a/.claude/skills/threat-review/references/checklist.md b/.claude/skills/threat-review/references/checklist.md index cac1707f..85489426 100644 --- a/.claude/skills/threat-review/references/checklist.md +++ b/.claude/skills/threat-review/references/checklist.md @@ -2,7 +2,7 @@ Reference for `threat-review`. -## Proxy Worker — `apps/chat-ui/worker/index.ts` +## Proxy Worker — `apps/web/worker/index.ts` - [ ] The Worker attaches no credential of its own on any upstream path - [ ] `host` and the `cf-*` headers still stripped (they are trusted signals upstream) @@ -13,10 +13,10 @@ Reference for `threat-review`. a documented, intentional pass-through mode - [ ] Streaming preserved: body passed through, `duplex: 'half'`, `redirect: 'manual'`, no buffering - [ ] Response headers not reconstructed in a way that drops or adds sensitive headers -- [ ] The dev proxy in `apps/chat-ui/vite.config.ts` changed with it — it is a second copy of the +- [ ] The dev proxy in `apps/web/vite.config.ts` changed with it — it is a second copy of the same contract, and a fix in only one leaves dev and production disagreeing -## Gate and identity — `src/lib/auth.ts`, `components/gate.tsx` +## Gate and identity — `src/lib/auth/auth.ts`, `components/gate.tsx` - [ ] The session is the only credential; no shared key or service token has come back - [ ] Stored only in `localStorage` under the known key; not sent anywhere but `/api/*` @@ -54,7 +54,7 @@ Reference for `threat-review`. - [ ] `wrangler.jsonc` `vars` contains only `FELIX_ORIGIN` - [ ] `.dev.vars` gitignored; only `.dev.vars.example` tracked, with empty values -- [ ] Both tracked `wrangler.jsonc` files (`apps/chat-ui`, `apps/docs`) stay free of account and +- [ ] Both tracked `wrangler.jsonc` files (`apps/web`, `apps/docs`) stay free of account and resource ids; CI deploys them as they are - [ ] No secret in `index.html`, in a `VITE_`-prefixed env var, or in `dist/` - [ ] No source maps published that expose more than intended diff --git a/.claude/skills/toolkit-authoring/SKILL.md b/.claude/skills/toolkit-authoring/SKILL.md index 16dbb8b5..0c46f518 100644 --- a/.claude/skills/toolkit-authoring/SKILL.md +++ b/.claude/skills/toolkit-authoring/SKILL.md @@ -69,7 +69,7 @@ Non-negotiables in this repo: - **Silent when there is nothing to say.** A hook that fires on every edit trains people to ignore it. - **Test before wiring**, by piping realistic JSON: ```bash - echo '{"tool_input":{"file_path":"apps/chat-ui/src/api.ts"},"cwd":"'"$PWD"'"}' \ + echo '{"tool_input":{"file_path":"apps/web/src/api/client.ts"},"cwd":"'"$PWD"'"}' \ | .claude/hooks/impact-reminder.sh ``` - `chmod +x` the script, use `"$CLAUDE_PROJECT_DIR"` for paths, and remember that a blocking gate diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 53612d79..5c4e4085 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -87,7 +87,7 @@ jobs: if: ${{ !cancelled() }} run: pnpm build env: - FELIX_OPENAPI_SPEC: ${{ github.workspace }}/apps/chat-ui/harness-openapi.json + FELIX_OPENAPI_SPEC: ${{ github.workspace }}/apps/web/harness-openapi.json # What chat-ui loads before it can draw anything. KaTeX and rehype-raw each # rode into it on one static import inside a dependency, and nothing above diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 02f38e13..f970c63d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,6 +1,6 @@ name: Deploy -# Deploys the two Workers: docs.felix.run (apps/docs) and make.felix.run (apps/chat-ui). +# Deploys the two Workers: docs.felix.run (apps/docs) and make.felix.run (apps/web). # # - After CI passes on a push to main: both, from exactly the commit CI checked. # - On `felix-deployed` from felix-run/ops, sent after it rolls api.felix.run to a new @@ -28,7 +28,7 @@ on: app: description: Which Worker to deploy type: choice - options: [both, docs, chat-ui] + options: [both, docs, web] default: both permissions: @@ -49,7 +49,7 @@ jobs: ${{ fromJSON( github.event_name == 'repository_dispatch' && '["docs"]' || (github.event_name == 'workflow_dispatch' && inputs.app != 'both') && format('["{0}"]', inputs.app) || - '["docs", "chat-ui"]' + '["docs", "web"]' ) }} runs-on: ubuntu-latest timeout-minutes: 15 diff --git a/.gitignore b/.gitignore index 11973725..510388b3 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,7 @@ packages/harness/src/skills/bundled.ts wrangler.jsonc # Docs + chat-ui checked-in configs use vars only (no account ids). !apps/docs/wrangler.jsonc -!apps/chat-ui/wrangler.jsonc +!apps/web/wrangler.jsonc # Astro / Starlight build cache apps/docs/.astro/ @@ -46,4 +46,4 @@ apps/docs/public/api-version.txt .impeccable/critique/ # Written and removed by scripts/check-tailwind-sources.mjs; only survives a killed run. -apps/chat-ui/src/.check-tailwind-sources.tmp.css +apps/web/src/styles/.check-tailwind-sources.tmp.css diff --git a/.impeccable/critique/2026-08-23T22-38-55Z__apps-chat-ui-src.md b/.impeccable/critique/2026-08-23T22-38-55Z__apps-chat-ui-src.md index 992dcb75..d252d759 100644 --- a/.impeccable/critique/2026-08-23T22-38-55Z__apps-chat-ui-src.md +++ b/.impeccable/critique/2026-08-23T22-38-55Z__apps-chat-ui-src.md @@ -8,7 +8,7 @@ slug: apps-chat-ui-src --- # Critique: chat-ui (whole app) -Target `apps/chat-ui/src`, inspected live against the harness on `:8080`. The previous critique scoped to the two rails; this one covers the surfaces that work never touched: composer, transcript, tool cards, greeting, and the interrupt banners. +Target `apps/web/src`, inspected live against the harness on `:8080`. The previous critique scoped to the two rails; this one covers the surfaces that work never touched: composer, transcript, tool cards, greeting, and the interrupt banners. ## Design Health Score @@ -30,7 +30,7 @@ Up from 18/40. The eight points came from the rails work; the remaining debt sit ## Anti-Patterns Verdict -**Deterministic scan:** `detect.mjs` over `apps/chat-ui/src` returns **0 findings**, as it did last time. No gradient text, no side stripes, no purple-cyan palette, no hero metrics. +**Deterministic scan:** `detect.mjs` over `apps/web/src` returns **0 findings**, as it did last time. No gradient text, no side stripes, no purple-cyan palette, no hero metrics. **LLM assessment:** one genuine tell has become systemic. `text-xs font-medium uppercase tracking-wide text-muted-foreground` now appears **13 times across 9 files**: the greeting's manifest name, both interrupt banners, the banner's Before/After labels, tool card Input/Output, the history rail's Server group, and four sheets. That recipe is the app's default answer to "this is a label", which is exactly the point at which a kicker stops being voice and becomes grammar. It is also, at 11px uppercase and tracked, the least readable text in the product. diff --git a/.impeccable/critique/2026-08-24T00-58-29Z__s-chat-ui-src-components-chat-multimodal-input-tsx.md b/.impeccable/critique/2026-08-24T00-58-29Z__s-chat-ui-src-components-chat-multimodal-input-tsx.md index 50ebaec4..693a020d 100644 --- a/.impeccable/critique/2026-08-24T00-58-29Z__s-chat-ui-src-components-chat-multimodal-input-tsx.md +++ b/.impeccable/critique/2026-08-24T00-58-29Z__s-chat-ui-src-components-chat-multimodal-input-tsx.md @@ -8,7 +8,7 @@ slug: s-chat-ui-src-components-chat-multimodal-input-tsx --- # Critique: the composer -Target `apps/chat-ui/src/components/chat/multimodal-input.tsx` (672 lines) and the `prompt-input` primitive it wraps (1,175). Driven live against the harness on `:8080`. +Target `apps/web/src/components/chat/multimodal-input.tsx` (672 lines) and the `prompt-input` primitive it wraps (1,175). Driven live against the harness on `:8080`. ## Design Health Score diff --git a/.impeccable/critique/2026-08-25T21-25-51Z__pps-chat-ui-src-components-inspector-inspector-tsx.md b/.impeccable/critique/2026-08-25T21-25-51Z__pps-chat-ui-src-components-inspector-inspector-tsx.md index bbed1880..6c382148 100644 --- a/.impeccable/critique/2026-08-25T21-25-51Z__pps-chat-ui-src-components-inspector-inspector-tsx.md +++ b/.impeccable/critique/2026-08-25T21-25-51Z__pps-chat-ui-src-components-inspector-inspector-tsx.md @@ -8,7 +8,7 @@ slug: pps-chat-ui-src-components-inspector-inspector-tsx --- # Design Critique — Inspector › Activity -**Target**: `apps/chat-ui/src/components/inspector/inspector.tsx` (lines 46–523: `ActivitySection`, `StatusDot`, `toolOf`, `summary`, `relTime`, and the `Section` / `SectionBody` shell it inherits) +**Target**: `apps/web/src/components/inspector/inspector.tsx` (lines 46–523: `ActivitySection`, `StatusDot`, `toolOf`, `summary`, `relTime`, and the `Section` / `SectionBody` shell it inherits) **Register**: product · **Assessment A**: source review against PRODUCT.md · **Assessment B**: deterministic detector ## Design Health Score @@ -59,7 +59,7 @@ Biggest opportunity: the 12-row cap can hide exactly the events the color system **Fix**: Add `summary()` arms for the three unhandled types. `guardrail_block` → rule/policy name plus blocked tool. `model_switch` → `from → to`. `plan_step` → step label plus new status. Verify payload keys against the harness. -**Suggested command**: `/impeccable clarify apps/chat-ui/src/components/inspector/inspector.tsx` +**Suggested command**: `/impeccable clarify apps/web/src/components/inspector/inspector.tsx` ### [P1] The header count and the screen-reader announcement are both the fetch cap @@ -69,7 +69,7 @@ Biggest opportunity: the 12-row cap can hide exactly the events the color system **Fix**: Make the header meta a signal — count of failed/blocked events in the window with `metaTone="attention"` when non-zero, falling back to the newest event's age when clean. Request `limit: 61` and render `60+`, or relabel the footer "Showing 12 of the last 60". Derive the live-region string from something that moves. -**Suggested command**: `/impeccable harden apps/chat-ui/src/components/inspector/inspector.tsx` +**Suggested command**: `/impeccable harden apps/web/src/components/inspector/inspector.tsx` ### [P1] Twelve rows, no filter, no drill-down — and the API already supports the filter @@ -79,7 +79,7 @@ Biggest opportunity: the 12-row cap can hide exactly the events the color system **Fix**: Failures-only toggle in the section header wired to the existing `status` parameter. Expandable rows in place (`Collapsible` is already imported) or route to the agent sheet. Raise or make the 12-row cap adjustable once the footer tells the truth. -**Suggested command**: `/impeccable layout apps/chat-ui/src/components/inspector/inspector.tsx` +**Suggested command**: `/impeccable layout apps/web/src/components/inspector/inspector.tsx` ### [P2] Status vocabulary is passed through raw, and `capitalize`d @@ -89,7 +89,7 @@ Biggest opportunity: the 12-row cap can hide exactly the events the color system **Fix**: Map raw status onto a display vocabulary — Succeeded / Failed / Denied / Running / Pending — with an explicit `running` branch painting `--state-running`; keep the raw string in a `title`. Drop `capitalize`. -**Suggested command**: `/impeccable clarify apps/chat-ui/src/components/inspector/inspector.tsx` +**Suggested command**: `/impeccable clarify apps/web/src/components/inspector/inspector.tsx` ### [P2] Four of seven help strings can never render, and the three that can need a mouse @@ -99,7 +99,7 @@ Biggest opportunity: the 12-row cap can hide exactly the events the color system **Fix**: Either surface the type on every row (quiet unbadged label for routine types, tonal badge for exceptions) so all seven strings have somewhere to live, or move help out of `title` into a real tooltip primitive with focus and touch support. Delete entries that genuinely have no place. -**Suggested command**: `/impeccable polish apps/chat-ui/src/components/inspector/inspector.tsx` +**Suggested command**: `/impeccable polish apps/web/src/components/inspector/inspector.tsx` ## Persona Red Flags diff --git a/.impeccable/critique/2026-09-01T21-30-36Z__apps-chat-ui-src-main-tsx-toaster-toast-call-sites.md b/.impeccable/critique/2026-09-01T21-30-36Z__apps-chat-ui-src-main-tsx-toaster-toast-call-sites.md index e2cd95dc..68efe432 100644 --- a/.impeccable/critique/2026-09-01T21-30-36Z__apps-chat-ui-src-main-tsx-toaster-toast-call-sites.md +++ b/.impeccable/critique/2026-09-01T21-30-36Z__apps-chat-ui-src-main-tsx-toaster-toast-call-sites.md @@ -30,7 +30,7 @@ Scoped to the notification layer (the `` in `main.tsx` and the 30 `toas The specific failure is the register clash. `approval-decision.tsx` is careful work: the comments argue about button emphasis, fold thresholds, and reading order. Three files away, the app's most attention-grabbing element is a vendor default. -**Deterministic scan.** `detect.mjs --json` over `apps/chat-ui/src` returned `[]`, exit 0. Clean, and correctly so. It is also structurally blind here: the entire visual surface of the toast lives in `node_modules/sonner/dist/styles.css`, which no repo-scoped scan will reach. This is worth naming as a pattern. The repo has four bespoke guards for contracts that fail silently (`check-api-drift`, `check-protocol-parity`, `check-payload-shapes`, `check-tailwind-sources`), and the toast layer is the same failure shape with no guard: it compiles, lints, passes every check, and renders wrong. +**Deterministic scan.** `detect.mjs --json` over `apps/web/src` returned `[]`, exit 0. Clean, and correctly so. It is also structurally blind here: the entire visual surface of the toast lives in `node_modules/sonner/dist/styles.css`, which no repo-scoped scan will reach. This is worth naming as a pattern. The repo has four bespoke guards for contracts that fail silently (`check-api-drift`, `check-protocol-parity`, `check-payload-shapes`, `check-tailwind-sources`), and the toast layer is the same failure shape with no guard: it compiles, lints, passes every check, and renders wrong. **Browser evidence.** Live measurement in Chrome against a real harness, dark theme active: diff --git a/.impeccable/critique/2026-09-02T02-57-25Z__apps-chat-ui-src-main-tsx-toaster-toast-call-sites.md b/.impeccable/critique/2026-09-02T02-57-25Z__apps-chat-ui-src-main-tsx-toaster-toast-call-sites.md index 015e9b99..1ce0ff01 100644 --- a/.impeccable/critique/2026-09-02T02-57-25Z__apps-chat-ui-src-main-tsx-toaster-toast-call-sites.md +++ b/.impeccable/critique/2026-09-02T02-57-25Z__apps-chat-ui-src-main-tsx-toaster-toast-call-sites.md @@ -28,7 +28,7 @@ Re-run after five merged PRs (#112, #113, #114, #115, #116). Same target, same s **LLM assessment.** The register clash is gone. The toast reads as part of this app: its own state tokens, its own font and radius, 200ms motion, and a surface sitting 1.29:1 above the page rather than 18.97:1. The previous verdict was that this layer was *undesigned* rather than AI-generated; it is now designed, and the reasoning is in the file rather than in a PR description. -**Deterministic scan.** `detect.mjs --json apps/chat-ui/src` returns **3 findings, all in `index.css`, and all three are false positives**: +**Deterministic scan.** `detect.mjs --json apps/web/src` returns **3 findings, all in `index.css`, and all three are false positives**: - `flat-type-hierarchy` (12/14/16px, 1.3:1) reads the token block. The product register asks for 1.125–1.2 between steps in app UI; 1.3 already exceeds it. Wrong register applied to a product surface. - `em-dash-overuse` (210) counts **CSS comments**, not copy. This file is deliberately heavy on prose comments and that is the house style. diff --git a/.impeccable/critique/2026-09-26T14-01-32Z__apps-chat-ui-src.md b/.impeccable/critique/2026-09-26T14-01-32Z__apps-chat-ui-src.md index c3eed8ee..fdaa63d2 100644 --- a/.impeccable/critique/2026-09-26T14-01-32Z__apps-chat-ui-src.md +++ b/.impeccable/critique/2026-09-26T14-01-32Z__apps-chat-ui-src.md @@ -5,7 +5,7 @@ max_score: 40 na_heuristics: p0_count: 0 p1_count: 3 -target_identity: "file:/Users/blake/Projects/felix-web/apps/chat-ui/src" +target_identity: "file:/Users/blake/Projects/felix-web/apps/web/src" timestamp: 2026-09-26T14-01-32Z slug: apps-chat-ui-src --- diff --git a/.impeccable/critique/2026-09-26T16-06-16Z__apps-chat-ui-src.md b/.impeccable/critique/2026-09-26T16-06-16Z__apps-chat-ui-src.md index a1ebd428..3a773a40 100644 --- a/.impeccable/critique/2026-09-26T16-06-16Z__apps-chat-ui-src.md +++ b/.impeccable/critique/2026-09-26T16-06-16Z__apps-chat-ui-src.md @@ -5,7 +5,7 @@ max_score: 40 na_heuristics: p0_count: 1 p1_count: 2 -target_identity: "file:/Users/blake/Projects/felix-web/apps/chat-ui/src" +target_identity: "file:/Users/blake/Projects/felix-web/apps/web/src" timestamp: 2026-09-26T16-06-16Z slug: apps-chat-ui-src --- diff --git a/.impeccable/critique/2026-09-27T14-05-51Z__apps-chat-ui-src.md b/.impeccable/critique/2026-09-27T14-05-51Z__apps-chat-ui-src.md index ef9e93e4..ce7cad72 100644 --- a/.impeccable/critique/2026-09-27T14-05-51Z__apps-chat-ui-src.md +++ b/.impeccable/critique/2026-09-27T14-05-51Z__apps-chat-ui-src.md @@ -5,7 +5,7 @@ max_score: 40 na_heuristics: p0_count: 0 p1_count: 2 -target_identity: "file:/Users/blake/Projects/felix-web/apps/chat-ui/src" +target_identity: "file:/Users/blake/Projects/felix-web/apps/web/src" timestamp: 2026-09-27T14-05-51Z slug: apps-chat-ui-src --- diff --git a/.impeccable/design.json b/.impeccable/design.json index a2c99685..c620d0c2 100644 --- a/.impeccable/design.json +++ b/.impeccable/design.json @@ -659,7 +659,7 @@ }, { "name": "The Two-Client Rule", - "body": "The ramp is authored as `oklch()` in `apps/chat-ui/src/index.css` and frozen as sRGB hex in `packages/design/src/tokens.ts`, because neither a terminal nor `RGBA.fromHex` takes `oklch()`. `pnpm check-state-palette` fails when they disagree. The stylesheet is the authored form; never edit the hex to match a change.", + "body": "The ramp is authored as `oklch()` in `apps/web/src/styles/index.css` and frozen as sRGB hex in `packages/design/src/tokens.ts`, because neither a terminal nor `RGBA.fromHex` takes `oklch()`. `pnpm check-state-palette` fails when they disagree. The stylesheet is the authored form; never edit the hex to match a change.", "section": "colors" }, { diff --git a/CLAUDE.md b/CLAUDE.md index 1da94b15..79d77250 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -11,7 +11,7 @@ in this repo beyond one thin proxy Worker. | Path | Role | |---|---| -| `apps/chat-ui` (`@felix/chat-ui`) | Full streaming chat + harness inspector (React/Vite → Worker) | +| `apps/web` (`@felix/web`) | Full streaming chat + harness inspector (React/Vite → Worker) | | `apps/tui` (`@felix/tui`) | Full-screen terminal chat client (OpenTUI → Bun) | | `apps/docs` (`@felix/docs`) | Starlight docs site → Workers static assets | | `packages/ui` (`@felix/ui`) | shadcn/ui primitives, consumed as raw `.tsx` source | @@ -27,7 +27,7 @@ in this repo beyond one thin proxy Worker. ```bash pnpm install -pnpm chat:dev # Vite :5173 — /api/* proxied to Python Felix on :8080 +pnpm web:dev # Vite :5173 — /api/* proxied to Python Felix on :8080 pnpm tui:dev # terminal client, straight to FELIX_ORIGIN (default :8080) pnpm docs:dev pnpm build # turbo run build (tsc -b && vite build; astro build) @@ -44,7 +44,7 @@ pnpm check-bundle-budget # chat-ui's first load (entry + preloads + CSS, gzip pnpm sync:harness [path] # re-record all four contract files from a harness checkout pnpm sync:diagrams [path] # re-render the harness's docs/diagrams/*.mmd into apps/docs/src/diagrams (docs theme) pnpm sync:brand # re-render favicons, touch/PWA icons, docs logo + social card (needs rsvg-convert, magick) -pnpm --filter @felix/chat-ui