spequi 0.1.6 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -36,10 +36,10 @@ Then invoke the Spequi skill **inside your coding agent**, with the same project
36
36
 
37
37
  | Agent | Run after `init` |
38
38
  | --- | --- |
39
- | GigaCode CLI | `/skills spequi` or `/spequi` |
40
39
  | Claude Code | `/spequi` |
41
40
  | Codex | `$spequi` |
42
41
  | Other skill-capable agents | load `.agents/skills/spequi/SKILL.md` |
42
+ | GigaCode CLI | `/skills spequi` or `/spequi` |
43
43
 
44
44
  The skill starts the local server, shares its URL, and handles requests from the UI. Open the URL it provides, normally **http://127.0.0.1:4310**. Keep the agent session running while you work. Reload your agent if the new skill does not appear.
45
45
 
@@ -53,28 +53,33 @@ A plain diff shows **what** changed, not **why**.
53
53
 
54
54
  - **Spec-linked diffs.** Linked code blocks show the requirement or scenario behind them, with source path and line range. Link coverage depends on the preview; suggested file-level context is labelled separately.
55
55
  - **Review implementation before applying.** Implementation previews use an isolated copy. Applying is a separate, explicit step with conflict checks and backups. Planning requests update specification files in your project.
56
- - **Bring your own agent.** GigaCode, Claude Code, Codex, or any skill-capable agent. No extra model endpoint or provider API key to configure.
56
+ - **Bring your own agent.** Claude Code, Codex, GigaCode, or any skill-capable agent. No extra model endpoint or provider API key to configure.
57
57
  - **Local workspace.** The UI binds to `127.0.0.1`. Browsing and offline analysis do not upload source. Your attached agent may send source to its provider; optional model generation sends selected context to your configured endpoint.
58
58
 
59
- Spequi sends usage and failure analytics, including project folder names, Git user names when configured, and a persistent identifier shared across projects on the same machine account. Source files, prompts, and review comments are excluded. See [Security and limits](docs/security.md#analytics).
59
+ Spequi sends usage and failure analytics with a persistent identifier shared across projects on the same machine account. Project folder names and Git user names are excluded unless you opt in for that project during `spequi init`. Source files, prompts, and review comments are excluded. See [Security and limits](docs/security.md#analytics).
60
60
 
61
61
  ## How it works
62
62
 
63
- 1. **Plan.** Click **New spec**, describe an idea, and shape the plan beside your agent's conversation. Drafts save automatically.
64
- 2. **Preview.** Open **Implement** and request a preview. The agent builds in a separate copy of your project.
65
- 3. **Review.** Read Proposal, Design and Tasks, then inspect real diffs with available spec links, dependency impact, and inline comments.
66
- 4. **Apply.** Confirm explicitly. Spequi checks hashes and baseline conflicts, writes the files, and keeps recoverable backups. Then validate and archive.
63
+ 1. **Plan.** Click **New spec**, describe an idea, and optionally name a Git branch. Generate the next artifact or the full proposal, specs, design and tasks. Planning stops before implementation; drafts save automatically.
64
+ 2. **Generate.** Open **Files** and choose **Generate file diff**. The agent makes the spec’s file changes in an isolated copy, without running validation, builds, linters or tests. Test files change only when the specs require them.
65
+ 3. **Review.** Read the agent’s change summary and inspect the diff with recorded spec links, changed-line link coverage, suggested context, dependency impact and inline comments.
66
+ 4. **Apply and finish.** Apply explicitly with baseline conflict checks and recoverable backups. **Workflow** stays beside the artifact tabs and explains optional validation, verification, sync and archive actions.
67
67
 
68
68
  ## Features
69
69
 
70
- - **Full lifecycle:** drafts, spec refinement, implementation preview, validate, archive
70
+ - **Planning boundaries:** next-artifact and full-plan requests create planning documents only
71
+ - **Branch per change:** create or switch branches before the agent starts, including spec creation; confirm reuse of an existing branch
72
+ - **Spec-linked review:** agent summaries, linked requirements and scenarios, and visible changed-line coverage
71
73
  - **Unified and split diffs** with syntax highlighting, changed-word emphasis, folding and wrapping
72
74
  - **Impact analysis:** direct and downstream dependencies, related tests, export changes
73
75
  - **Precise feedback:** comments on files, code ranges and Markdown passages; export a review brief or queue a spec update
74
- - **Requests inbox:** see questions, failures and running work across all specs
75
- - **Works offline:** browsing, review, affected-file analysis and patch import need no agent
76
+ - **Questions where you need them:** read and answer directly in Agent or Requests; cancel an obsolete waiting request to free the queue
77
+ - **Optional desktop notifications:** use the header bell for completed plans and diffs, questions, and failures while you’re in another tab; keep the workspace open
78
+ - **Works offline:** browsing, review and affected-file analysis need no attached agent
76
79
  - **Light and dark themes**
77
80
 
81
+ Spequi questions and workflow confirmations appear in the UI. Native file-edit and tool-execution approvals stay in your coding agent’s CLI or host; the generic skill connection does not intercept them. Check that session if progress pauses.
82
+
78
83
  ## Documentation
79
84
 
80
85
  | | |
@@ -82,15 +87,14 @@ Spequi sends usage and failure analytics, including project folder names, Git us
82
87
  | [Getting started](docs/getting-started.md) | Install, initialize, attach an agent, what `init` creates |
83
88
  | [Planning workflow](docs/planning.md) | New specs, drafts, slash commands, planning stages |
84
89
  | [Review workflow](docs/review.md) | Diffs, spec context, comments, requests inbox |
85
- | [Offline tools and model preview](docs/offline-and-model.md) | Affected-file analysis, patch import, optional model endpoint |
90
+ | [Offline tools and model preview](docs/offline-and-model.md) | Affected-file analysis, optional model endpoint, patch API |
86
91
  | [Agent workflow](docs/agent-workflow.md) | Queue, heartbeat, questions, MCP reports |
87
92
  | [Security and limits](docs/security.md) | Local data, boundaries, known limitations |
88
93
  | [Architecture](docs/architecture.md) | Stack, repo layout, development, packaging |
89
94
 
90
95
  ## Status
91
96
 
92
- Spequi is early. It is tested with Claude Code and Codex flows; continuous polling in a real GigaCode session and
93
- native Windows execution are not yet verified. Static impact analysis can miss dynamic references and aliases.
97
+ Spequi is early. It has been tested with Claude Code and Codex, and with GigaCode CLI on Windows. Static impact analysis can miss dynamic references and aliases.
94
98
  See [Security and limits](docs/security.md) for the full list.
95
99
 
96
100
  Feedback and bug reports are welcome in [Issues](https://github.com/rahulnjs/spequi/issues).
package/bin/spequi.mjs CHANGED
@@ -1,6 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import path from 'node:path';
3
3
  import fs from 'node:fs/promises';
4
+ import { createInterface } from 'node:readline/promises';
5
+ import { readJSON, runtime } from '../src/files.mjs';
4
6
  import { reportSession } from '../src/agent-session.mjs';
5
7
  import { setTimeout as delay } from 'node:timers/promises';
6
8
  import { initProject, installSkill, viewerVersion } from '../src/project.mjs';
@@ -27,7 +29,16 @@ async function agentCall(operation, payload, fallback) {
27
29
  try {
28
30
  const [command, subcommand, id] = argv;
29
31
  if (command === 'init') {
30
- print(await initProject(root));
32
+ const config = await readJSON(runtime(root, 'config.json'));
33
+ let shareIdentity;
34
+ if (typeof config?.analytics?.shareIdentity !== 'boolean' && process.stdin.isTTY && process.stdout.isTTY) {
35
+ const prompt = createInterface({ input: process.stdin, output: process.stdout });
36
+ try {
37
+ const answer = await prompt.question('Share this project’s folder name and Git user.name in usage events? Anonymous usage events are sent either way. Applies only to this project. [y/N] ');
38
+ shareIdentity = /^(y|yes)$/i.test(answer.trim());
39
+ } finally { prompt.close(); }
40
+ }
41
+ print(await initProject(root, { shareIdentity }));
31
42
  if (argv.includes('--start')) await startServer({ root, port: option('port') === undefined ? undefined : Number(option('port')) });
32
43
  else process.stdout.write('\nReady. Run node .spequi/server.mjs, or invoke /spequi in your agent.\n');
33
44
  } else if (command === 'start' || command === 'serve') await startServer({ root, port: option('port') === undefined ? undefined : Number(option('port')) });
@@ -42,6 +42,12 @@ Typical retained state looks like:
42
42
  result.json Diff metadata and application state
43
43
  ```
44
44
 
45
+ ## Native permission prompts
46
+
47
+ The ask/input protocol carries Spequi workflow questions and confirmations. It does not receive native file-edit or tool-execution approval events from an arbitrary coding host. Users must answer those permission prompts in the CLI or host that owns them.
48
+
49
+ An integration would need support from that host. For example, [Codex App Server](https://developers.openai.com/codex/app-server/#approvals) exposes command and file-change approval requests to its connected client, while [Claude Code PermissionRequest hooks](https://code.claude.com/docs/en/hooks#permissionrequest) provide a different integration mechanism. Neither is implemented by Spequi’s generic skill connection. Keep the existing host permission controls in effect; never represent an ordinary Spequi reply as a native tool approval.
50
+
45
51
  ## 2. Attachment starts in the coding agent
46
52
 
47
53
  The user invokes the installed skill using the host's convention, such as `$spequi` in Codex, `/skills spequi` in Sber/GitVerse GigaCode CLI, or `/spequi` in a CLI with that wrapper. The host makes the skill instructions available to the existing agent session.
@@ -60,7 +66,7 @@ The installer registers GigaCode alongside the existing agents. Project initiali
60
66
 
61
67
  `skill install --global` creates the same paths under the user's home directory. The command wrappers reference the skill in the matching scope and use GigaCode's `{{args}}` parameter syntax. After discovery, invoke `/skills spequi` or `/spequi`. These paths and formats follow GigaCode's [skills](https://gitverse.ru/docs/ai/ai-assistant-gigacode/gigacode-cli/skills) and [commands](https://gitverse.ru/docs/ai/ai-assistant-gigacode/gigacode-cli/commands) documentation.
62
68
 
63
- The installer registers the viewer skill; it does not install other OpenSpec workflows. Those must be discoverable separately. Registration and refresh behavior are tested locally; indefinite polling in a real GigaCode session still requires an integration test.
69
+ The installer registers the viewer skill; it does not install other OpenSpec workflows. Those must be discoverable separately. Registration and refresh behavior are tested locally. GigaCode CLI has also been tested on Windows.
64
70
 
65
71
  ### Register a session
66
72
 
@@ -236,7 +242,7 @@ The agent locates the skill through its host's skill discovery. In this reposito
236
242
  cat .agents/skills/openspec-apply-change/SKILL.md
237
243
  ```
238
244
 
239
- **Reading that file does not execute a skill.** It gives the agent instructions. The agent then carries out those instructions through its normal tools: resolving OpenSpec status, reading artifacts, editing the assigned files and running checks.
245
+ **Reading that file does not execute a skill.** It gives the agent instructions. The agent then carries out those instructions through its normal tools: resolving OpenSpec status, reading artifacts, editing the assigned files. Preview requests explicitly exclude validation and test commands.
240
246
 
241
247
  For example, the apply workflow includes commands such as:
242
248
 
@@ -259,9 +265,11 @@ For an implementation preview:
259
265
 
260
266
  | Directory | What happens there |
261
267
  | ---------------------------- | ---------------------------------------------------------------------------------------------------------------- |
262
- | `workflow.directory` | Read the copied planning context, implement, install needed dependencies and run checks inside the isolated copy |
268
+ | `workflow.directory` | Read the copied planning context and make the specified file changes only; do not run checks or tests |
263
269
  | `workflow.protocolDirectory` | Run `agent log`, `ask`, `input`, `finish` and `fail` against the original project's queue |
264
270
 
271
+ Preview generation does not run validation, builds, linters, type checks or tests. Test files change only when the selected specs explicitly require them. The agent records spec links while editing and includes a short summary in the same request.
272
+
265
273
  All implementation edits, including task checkboxes, stay inside the preview copy. The agent must re-resolve OpenSpec roots there and refuse paths that escape it. The snapshot is not an OS sandbox; the agent must honor that boundary.
266
274
 
267
275
  When the agent finishes, the application freezes the resulting changed files. It does not copy them into the original project automatically. The user reviews the diff and explicitly uses **Apply reviewed preview**, which checks for baseline conflicts.
@@ -364,7 +372,7 @@ On success:
364
372
  ```bash
365
373
  node .spequi/cli.mjs agent finish JOB_ID \
366
374
  --token CLAIM_TOKEN \
367
- --message "Implemented the requested scope; checks passed."
375
+ --message "Implemented the requested scope; summary of changes and linked requirements."
368
376
  ```
369
377
 
370
378
  On failure:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spequi",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "Local web UI for OpenSpec: plan specs with your coding agent, review spec-linked diffs, apply only what you approve.",
5
5
  "keywords": [
6
6
  "openspec",
package/public/app.css CHANGED
@@ -1,5 +1,5 @@
1
1
  :root{font-family:'DM Sans',sans-serif;color-scheme:light;--bg:#f7f8fa;--surface:#fdfdfe;--rail:#eef1f6;--panel:#f7f8fb;--text:#252d3c;--muted:#626f83;--line:#dfe4ed;--accent:#3f62b5;--accent-soft:#e6edfb;--accent-text:#2d4e99;--green:#23704c;--green-bg:#e4f3eb;--red:#a13843;--red-bg:#fcebed;--code:#f3f5f9;--ui:13px;--radius:7px;--rail-width:244px;--panel-width:282px;--prose:15px;--reader-pad:42px}
2
- *{box-sizing:border-box}body{margin:0;font-size:var(--ui);background:var(--bg);color:var(--text);height:100dvh;overflow:hidden}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button,a,select,input,textarea{outline-offset:3px}button,a,select{touch-action:manipulation}:focus-visible{outline:2px solid var(--accent)}::selection{background:var(--accent-soft);color:var(--accent-text)}input,textarea{caret-color:var(--accent)}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}svg{flex-shrink:0}small,.muted{color:var(--muted)}code,pre,kbd{font-family:'IBM Plex Mono',monospace}code{font-size:.88em}button,.button{transition:background .15s,border-color .15s,color .15s}button:hover,.button:hover{background:var(--rail)}.topbar{height:58px;display:flex;align-items:center;justify-content:space-between;padding:0 24px;border-bottom:1px solid var(--line);background:var(--surface)}.brand{display:flex;align-items:center;gap:10px;font-weight:700;font-size:17px;letter-spacing:-.4px}.brand>svg{color:var(--accent);width:25px;height:25px}.brand-suffix{font-weight:450;color:var(--muted)}.local-pill{font-size:9px;letter-spacing:1px;color:var(--muted);padding:3px 5px;border:1px solid var(--line);border-radius:3px;margin-left:3px}.topbar-end{display:flex;align-items:center;gap:12px}select{background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:var(--radius);padding:8px 28px 8px 10px;max-width:100%}.connection{display:flex;gap:6px;align-items:center;font-size:11px;color:var(--muted)}i{display:inline-block;width:6px;height:6px;border-radius:50%;background:#a28540;flex-shrink:0}.online i{background:var(--green)}.workspace{height:calc(100dvh - 58px);display:grid;grid-template-columns:var(--rail-width) minmax(0,1fr) var(--panel-width)}.sidebar{background:var(--rail);border-right:1px solid var(--line);padding:24px 15px 16px;display:flex;flex-direction:column;min-height:0;overflow:auto}.project-select{display:flex;align-items:center;gap:11px;padding:0 8px 24px}.project-select>svg:first-child{color:var(--accent);width:21px;height:21px}.project-select>svg:last-child{width:13px;margin-left:auto;color:var(--muted)}.project-select>div{flex:1;min-width:0}.project-select strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:650}.project-select small{display:block;font-size:11px;margin-top:3px}.search{position:relative;display:flex;align-items:center;margin-bottom:27px}.search svg{position:absolute;left:10px;width:14px;color:var(--muted)}.search input{width:100%;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);color:var(--text);padding:10px 43px 10px 31px;font-size:12px;min-height:36px}.search kbd{position:absolute;right:9px;font-size:9px;color:var(--muted);padding:2px 3px;border:1px solid var(--line);border-radius:3px}.nav-heading{display:flex;justify-content:space-between;padding:0 10px 10px;color:var(--muted);font-size:11px;font-weight:600}.nav-heading>span:last-child{font-size:10px;font-variant-numeric:tabular-nums}.nav-heading.separated{margin-top:29px}.change-link,.spec-link{display:flex;align-items:center;gap:9px;padding:11px 10px;border-radius:6px;margin-bottom:4px;min-width:0}.change-link:hover,.spec-link:hover{background:color-mix(in srgb,var(--accent-soft) 60%,transparent)}.change-link.selected,.spec-link.selected{background:var(--accent-soft);color:var(--accent-text)}.nav-change{min-width:0;flex:1}.nav-change>span{display:block;overflow-wrap:anywhere;font-weight:550;font-size:12px}.nav-change small{display:block;font-size:10px;margin-top:5px}.nav-icon{display:flex;color:var(--muted);align-self:flex-start;margin-top:1px}.selected .nav-icon{color:var(--accent)}.selected-mark{height:5px;width:5px;background:var(--accent);border-radius:50%}.spec-link{font-size:12px;overflow-wrap:anywhere}.spec-link svg{width:15px;color:var(--muted)}.nav-empty{font-size:11px;line-height:1.65;color:var(--muted);padding:0 10px;margin:4px 0 0}.sidebar-foot{margin-top:auto;padding:30px 9px 2px;display:flex;gap:9px;align-items:flex-start;font-size:10px;line-height:1.8;color:var(--muted)}.sidebar-foot svg{width:16px;margin-top:1px}.sidebar-foot small{font-size:10px}.main{background:var(--surface);display:flex;flex-direction:column;min-width:0;min-height:0}.breadcrumbs{min-height:57px;display:flex;align-items:center;gap:10px;padding:0 30px;font-size:11px;color:var(--muted);border-bottom:1px solid var(--line)}.breadcrumbs>svg{width:11px;height:11px}.breadcrumbs strong{font-weight:500;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.change-header{padding:29px 30px 25px;display:flex;flex-direction:column;gap:20px}.change-title-line{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.change-title-line h1{font-size:25px;line-height:1.25;font-weight:650;letter-spacing:-.7px;margin:0;text-wrap:balance}.change-header p{font-size:11px;color:var(--muted);margin:9px 0 0}.badge{display:inline-flex;align-items:center;white-space:nowrap;font-size:10px;font-weight:550;padding:4px 7px;border-radius:4px;background:var(--rail);color:var(--muted);line-height:1.2}.badge.blue{background:var(--accent-soft);color:var(--accent-text)}.badge.success{background:var(--green-bg);color:var(--green)}.header-actions{display:flex;gap:8px}.button,button{display:inline-flex;align-items:center;justify-content:center;gap:7px;background:var(--surface);border:1px solid var(--line);color:var(--text);padding:8px 11px;border-radius:var(--radius);font-weight:550;font-size:11px;min-height:34px}.button svg{width:14px;height:14px}.button.primary{background:var(--accent);border-color:var(--accent);color:#f9fbff}.button.primary:hover{background:color-mix(in srgb,var(--accent) 85%,#202b46)}.selected-button{background:var(--accent-soft);border-color:color-mix(in srgb,var(--accent) 30%,var(--line));color:var(--accent-text)}.new-dot{width:5px;height:5px;border-radius:50%;background:var(--green)}.document-tabs{display:flex;overflow-x:auto;scrollbar-width:thin;border-bottom:1px solid var(--line);padding:0 26px;flex-shrink:0;min-height:46px;gap:10px}.document-tab{display:flex;align-items:center;gap:7px;white-space:nowrap;padding:12px 5px 14px;font-size:11px;color:var(--muted);position:relative;text-transform:capitalize}.document-tab svg{width:14px;height:14px}.document-tab.active{color:var(--accent-text);font-weight:600}.document-tab.active:after{content:'';position:absolute;bottom:0;height:2px;left:2px;right:2px;background:var(--accent)}.tab-count{background:var(--rail);border-radius:4px;padding:2px 5px;font-size:9px;color:var(--muted);font-weight:500;font-variant-numeric:tabular-nums}.reader{overflow:auto;min-height:0;flex:1}.file-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 30px;background:var(--panel);border-bottom:1px solid var(--line);font-size:10px;color:var(--muted)}.file-toolbar>span{display:flex;gap:7px;align-items:center;min-width:0}.file-toolbar>span>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-toolbar svg{width:13px;height:13px}.segmented{display:flex;align-items:center;padding:2px;background:var(--rail);border:1px solid var(--line);border-radius:5px;flex-shrink:0}.segmented a{padding:4px 8px;font-size:10px;border-radius:3px;display:flex;align-items:center;color:var(--muted)}.segmented a.active{background:var(--surface);color:var(--text);box-shadow:0 1px 3px #14213b0d}.prose{font-size:var(--prose);line-height:1.8;color:var(--text);max-width:80ch;padding:24px var(--reader-pad) 50px;margin:0 auto;overflow-wrap:anywhere}.prose h1{font-size:27px;letter-spacing:-.6px;font-weight:650;line-height:1.3;margin:6px 0 28px}.prose h2{font-size:18px;font-weight:650;letter-spacing:-.25px;margin:30px 0 12px;padding-bottom:8px;border-bottom:1px solid var(--line);line-height:1.4}.prose h3{font-size:15px;font-weight:650;margin:25px 0 9px;line-height:1.45}.prose h4{font-size:13px;margin:20px 0 7px}.prose p{margin:12px 0 17px}.prose ul,.prose ol{padding-left:23px;margin:12px 0 19px}.prose li{margin:8px 0;padding-left:4px}.prose li::marker{color:var(--muted)}.prose a{text-decoration:underline;text-underline-offset:3px;color:var(--accent-text)}.prose code{background:var(--code);border:1px solid var(--line);border-radius:4px;padding:1px 4px;font-size:.78em;color:var(--accent-text)}.prose pre{background:var(--code);border:1px solid var(--line);padding:16px;border-radius:6px;overflow:auto;font-size:12px;line-height:1.75}.prose pre code{padding:0;border:0;background:none;color:var(--text);font-size:inherit}.prose blockquote{margin:20px 0;padding:1px 16px;border-left:1px solid var(--accent);background:var(--panel)}.prose table{border-collapse:collapse;width:100%;font-size:12px;display:block;overflow:auto}.prose th,.prose td{padding:9px 12px;border:1px solid var(--line);text-align:left}.prose th{background:var(--panel)}.prose input[type=checkbox]{accent-color:var(--accent);vertical-align:middle;margin:0 7px 0 -18px}.source-view{margin:0;padding:24px 30px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.85;color:var(--text)}.workspace-footer{min-height:35px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 20px;font-size:9px;color:var(--muted);gap:12px}.workspace-footer>span{display:flex;align-items:center;gap:6px}.workspace-footer svg{width:12px;height:12px}.footer-divider{opacity:.5;margin:0 3px}.inspector{background:var(--panel);border-left:1px solid var(--line);display:flex;flex-direction:column;min-height:0;overflow:auto}.inspector-section{padding:24px 20px;border-bottom:1px solid var(--line)}.section-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.section-title h2{font-size:12px;margin:0;font-weight:650}.section-title>svg{width:14px;color:var(--muted)}dl{margin:0}dl>div{display:flex;align-items:center;justify-content:space-between;margin-top:15px;font-size:11px}dt{color:var(--muted)}dd{margin:0}.task-progress{margin-top:24px}.task-progress>span{display:flex;justify-content:space-between;font-size:10px;color:var(--muted)}.task-progress strong{font-size:11px;color:var(--text);font-weight:600}.progress-track{display:block!important;height:4px;background:var(--line);border-radius:8px;margin-top:10px;overflow:hidden}.progress-track>span{height:100%;display:block;background:var(--accent);border-radius:8px}.agent-state{display:flex;gap:7px;align-items:center;font-size:11px;font-weight:500}.inspector-copy{font-size:11px;line-height:1.75;color:var(--muted);margin:10px 0}.attach-details{font-size:10px;color:var(--muted);margin:12px 0 20px;line-height:1.7}.attach-details summary{cursor:pointer;color:var(--accent-text)}.attach-details code{font-size:10px;color:var(--text);overflow-wrap:anywhere}.workflow-form{display:flex;flex-direction:column;gap:8px}.workflow-form label{font-size:10px;color:var(--muted);font-weight:500;margin-top:5px}.workflow-form label>span{font-weight:400;float:right}.workflow-form select{font-size:11px;width:100%;min-height:37px}.workflow-form textarea{resize:vertical;min-height:75px;padding:10px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);color:var(--text);font-size:11px;line-height:1.6}.workflow-form textarea::placeholder{color:var(--muted)}.full-width{width:100%;margin-top:5px;justify-content:flex-start;min-height:37px}.full-width>svg:last-child{margin-left:auto}.activity-section{flex:1}.activity-empty{display:flex;gap:9px;align-items:flex-start;color:var(--muted)}.activity-empty>svg{width:14px;margin-top:2px}.activity-empty p{margin:0;font-size:10px;line-height:1.8}.activity-empty p span{font-size:10px}.activity{font-size:11px;border-bottom:1px solid var(--line);padding:12px 0}.activity summary{display:flex;align-items:flex-start;gap:8px;cursor:pointer}.activity summary strong{font-size:10px;font-weight:550;display:block}.activity small{font-size:9px;display:block;margin-top:5px;text-transform:capitalize}.activity-dot{height:6px;width:6px;margin-top:4px;border-radius:50%;background:var(--muted);flex-shrink:0}.activity-dot.running{background:var(--accent)}.activity-dot.completed{background:var(--green)}.activity-dot.failed{background:var(--red)}.activity-body{font-size:10px;line-height:1.7;padding:5px 0 0 14px;overflow-wrap:anywhere}.activity-body time{color:var(--muted);font-size:9px}.activity-body p{margin:8px 0}.text-link,.text-button{color:var(--accent-text);font-size:10px}.text-button{background:none;border:0;padding:0;min-height:28px}.inspector-bottom{padding:17px 20px;display:flex;gap:7px;font-size:9px;color:var(--muted)}.inspector-bottom svg{width:13px;height:13px}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:70px 30px;text-align:center;min-height:360px;max-width:660px;margin:auto}.empty-state>svg{width:36px;height:36px;color:var(--accent);margin-bottom:20px}.empty-state h2{font-size:23px;font-weight:550;letter-spacing:-.5px;margin:0 0 15px}.empty-state p{color:var(--muted);line-height:1.9;font-size:13px;max-width:55ch;margin:0 0 20px}.empty-state>code{padding:10px 16px;border-radius:5px;background:var(--code)}.preview-steps{display:flex;gap:0;flex-wrap:wrap;justify-content:center;margin-top:12px}.preview-steps span{padding:8px 12px;font-size:10px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);color:var(--muted)}.review-intro{padding:26px 28px;border-bottom:1px solid var(--line)}.review-intro h2{font-size:20px;font-weight:600;margin:0 0 10px;letter-spacing:-.4px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}.review-intro p{font-size:12px;line-height:1.8;color:var(--muted);margin:0;max-width:75ch}.spec-diff{margin:20px;border:1px solid var(--line);border-radius:6px;overflow:hidden}.diff-file-head{display:flex;align-items:center;gap:8px;padding:12px 15px;background:var(--panel);border-bottom:1px solid var(--line);font-size:11px;flex-wrap:wrap}.diff-file-head strong{font-family:'IBM Plex Mono',monospace;font-weight:500;overflow-wrap:anywhere}.diff-file-head>svg{width:14px}.operation-badges,.diff-file-head>.segmented{margin-left:auto}.operation-badges{display:flex;gap:4px}.comparison{display:grid;grid-template-columns:1fr 1fr}.comparison>section{min-width:0}.comparison>section+section{border-left:1px solid var(--line)}.comparison h3,.split-diff h3{margin:0;padding:10px 16px;border-bottom:1px solid var(--line);color:var(--muted);font-size:10px;font-weight:500}.prose.small{padding:10px 18px;font-size:12px}.prose.small h1{font-size:20px}.prose.small h2{font-size:15px}.prose.small h3{font-size:13px}.prose.small h4{font-size:12px}.preview-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:20px}.preview-actions>span{font-size:11px;margin-right:auto}.preview-actions form{margin:0}.diff-add{color:var(--green);margin-left:8px}.diff-remove{color:var(--red);margin-left:5px}.preview-layout{display:grid;grid-template-columns:180px minmax(0,1fr);min-height:280px}.preview-files{border-right:1px solid var(--line);padding:12px 8px;font-size:10px;background:var(--panel)}.preview-files a{display:flex;align-items:flex-start;gap:7px;padding:9px 7px;overflow-wrap:anywhere;border-radius:4px}.preview-files a.selected{background:var(--accent-soft)}.file-state{font-family:'IBM Plex Mono',monospace;font-size:9px;margin-top:1px}.file-state.added{color:var(--green)}.file-state.deleted{color:var(--red)}.file-state.modified{color:var(--accent)}.diff-panel{min-width:0}.split-diff{display:grid;grid-template-columns:1fr 1fr}.split-diff>section{min-width:0;overflow:auto}.split-diff>section+section{border-left:1px solid var(--line)}.split-diff h3 span{font-size:9px;opacity:.8}.code-diff{overflow:auto;font-size:10px;font-family:'IBM Plex Mono',monospace;line-height:1.9;padding:10px 0;min-height:100px}.diff-row{display:flex;min-width:max-content}.diff-row code{font-size:inherit;white-space:pre;padding:0 10px 0 0}.line-number{display:inline-block;color:var(--muted);width:35px;text-align:right;padding-right:10px;flex-shrink:0;user-select:none}.diff-row.addition{background:var(--green-bg);color:var(--green)}.diff-row.deletion{background:var(--red-bg);color:var(--red)}.diff-empty{font-size:11px;padding:10px 20px}.error-message,.success-message{font-size:11px;line-height:1.7;padding:10px 12px;border-radius:5px;overflow-wrap:anywhere}.error-message{color:var(--red);background:var(--red-bg)}.success-message{color:var(--green);background:var(--green-bg)}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%) translateY(12px);background:var(--text);color:var(--surface);padding:12px 18px;border-radius:7px;font-size:12px;max-width:calc(100vw - 30px);z-index:20;opacity:0;pointer-events:none;transition:opacity .18s,transform .18s}#toast.visible{opacity:1;transform:translateX(-50%) translateY(0)}.mobile-menu,.navigation-close{display:none}.skip-link{position:fixed;top:-60px;left:10px;z-index:40;background:var(--accent);color:var(--surface);padding:10px}.skip-link:focus{top:5px}dialog{color:var(--text);background:var(--surface);border:1px solid var(--line);border-radius:12px;max-width:min(460px,calc(100vw - 32px));padding:26px;box-shadow:0 20px 70px #15203b26}dialog::backdrop{background:#101a3066}dialog h2{font-size:20px;margin:0 0 14px}dialog p{font-size:13px;line-height:1.8;color:var(--muted)}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}.htmx-request button[type=submit]{opacity:.6;pointer-events:none}.htmx-request .reader{opacity:.6}*{scrollbar-width:thin;scrollbar-color:var(--line) transparent}
2
+ *{box-sizing:border-box}body{margin:0;font-size:var(--ui);background:var(--bg);color:var(--text);height:100dvh;overflow:hidden}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button,a,select,input,textarea{outline-offset:3px}button,a,select{touch-action:manipulation}:focus-visible{outline:2px solid var(--accent)}::selection{background:var(--accent-soft);color:var(--accent-text)}input,textarea{caret-color:var(--accent)}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}svg{flex-shrink:0}small,.muted{color:var(--muted)}code,pre,kbd{font-family:'IBM Plex Mono',monospace}code{font-size:.88em}button,.button{transition:background .15s,border-color .15s,color .15s}button:hover,.button:hover{background:var(--rail)}.topbar{height:58px;display:flex;align-items:center;justify-content:space-between;padding:0 24px;border-bottom:1px solid var(--line);background:var(--surface)}.brand{display:flex;align-items:center;gap:10px;font-weight:700;font-size:17px;letter-spacing:-.4px}.brand>svg{color:var(--accent);width:25px;height:25px}.brand-suffix{font-weight:450;color:var(--muted)}.local-pill{font-size:9px;letter-spacing:1px;color:var(--muted);padding:3px 5px;border:1px solid var(--line);border-radius:3px;margin-left:3px}.topbar-end{display:flex;align-items:center;gap:12px}select{background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:var(--radius);padding:8px 28px 8px 10px;max-width:100%}.connection{display:flex;gap:6px;align-items:center;font-size:11px;color:var(--muted)}i{display:inline-block;width:6px;height:6px;border-radius:50%;background:#a28540;flex-shrink:0}.online i{background:var(--green)}.workspace{height:calc(100dvh - 58px);display:grid;grid-template-columns:var(--rail-width) minmax(0,1fr) var(--panel-width)}.sidebar{background:var(--rail);border-right:1px solid var(--line);padding:24px 15px 16px;display:flex;flex-direction:column;min-height:0;overflow:auto}.project-select{display:flex;align-items:center;gap:11px;padding:0 8px 24px}.project-select>svg:first-child{color:var(--accent);width:21px;height:21px}.project-select>svg:last-child{width:13px;margin-left:auto;color:var(--muted)}.project-select>div{flex:1;min-width:0}.project-select strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:650}.project-select small{display:block;font-size:11px;margin-top:3px}.search{position:relative;display:flex;align-items:center;margin-bottom:27px}.search svg{position:absolute;left:10px;width:14px;color:var(--muted)}.search input{width:100%;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);color:var(--text);padding:10px 43px 10px 31px;font-size:12px;min-height:36px}.search kbd{position:absolute;right:9px;font-size:9px;color:var(--muted);padding:2px 3px;border:1px solid var(--line);border-radius:3px}.nav-heading{display:flex;justify-content:space-between;padding:0 10px 10px;color:var(--muted);font-size:11px;font-weight:600}.nav-heading>span:last-child{font-size:10px;font-variant-numeric:tabular-nums}.nav-heading.separated{margin-top:29px}.change-link,.spec-link{display:flex;align-items:center;gap:9px;padding:11px 10px;border-radius:6px;margin-bottom:4px;min-width:0}.change-link:hover,.spec-link:hover{background:color-mix(in srgb,var(--accent-soft) 60%,transparent)}.change-link.selected,.spec-link.selected{background:var(--accent-soft);color:var(--accent-text)}.nav-change{min-width:0;flex:1}.nav-change>span{display:block;overflow-wrap:anywhere;font-weight:550;font-size:12px}.nav-change small{display:block;font-size:10px;margin-top:5px}.nav-icon{display:flex;color:var(--muted);align-self:flex-start;margin-top:1px}.selected .nav-icon{color:var(--accent)}.selected-mark{height:5px;width:5px;background:var(--accent);border-radius:50%}.spec-link{font-size:12px;overflow-wrap:anywhere}.spec-link svg{width:15px;color:var(--muted)}.nav-empty{font-size:11px;line-height:1.65;color:var(--muted);padding:0 10px;margin:4px 0 0}.sidebar-foot{margin-top:auto;padding:30px 9px 2px;display:flex;gap:9px;align-items:flex-start;font-size:10px;line-height:1.8;color:var(--muted)}.sidebar-foot svg{width:16px;margin-top:1px}.sidebar-foot small{font-size:10px}.main{background:var(--surface);display:flex;flex-direction:column;min-width:0;min-height:0}.breadcrumbs{min-height:57px;display:flex;align-items:center;gap:10px;padding:0 30px;font-size:11px;color:var(--muted);border-bottom:1px solid var(--line)}.breadcrumbs>svg{width:11px;height:11px}.breadcrumbs strong{font-weight:500;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.change-header{padding:29px 30px 25px;display:flex;flex-direction:column;gap:20px}.change-title-line{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.change-title-line h1{font-size:25px;line-height:1.25;font-weight:650;letter-spacing:-.7px;margin:0;text-wrap:balance}.change-header p{font-size:11px;color:var(--muted);margin:9px 0 0}.badge{display:inline-flex;align-items:center;white-space:nowrap;font-size:10px;font-weight:550;padding:4px 7px;border-radius:4px;background:var(--rail);color:var(--muted);line-height:1.2}.badge.blue{background:var(--accent-soft);color:var(--accent-text)}.badge.success{background:var(--green-bg);color:var(--green)}.header-actions{display:flex;gap:8px}.button,button{display:inline-flex;align-items:center;justify-content:center;gap:7px;background:var(--surface);border:1px solid var(--line);color:var(--text);padding:8px 11px;border-radius:var(--radius);font-weight:550;font-size:11px;min-height:34px}.button svg{width:14px;height:14px}.button.primary{background:var(--accent);border-color:var(--accent);color:#f9fbff}.button.primary:hover{background:color-mix(in srgb,var(--accent) 85%,#202b46)}.selected-button{background:var(--accent-soft);border-color:color-mix(in srgb,var(--accent) 30%,var(--line));color:var(--accent-text)}.new-dot{width:5px;height:5px;border-radius:50%;background:var(--green)}.document-tabs{display:flex;overflow-x:auto;scrollbar-width:thin;border-bottom:1px solid var(--line);padding:0 26px;flex-shrink:0;min-height:46px;gap:10px}.document-tab{display:flex;align-items:center;gap:7px;white-space:nowrap;padding:12px 5px 14px;font-size:11px;color:var(--muted);position:relative;text-transform:capitalize}.document-tab svg{width:14px;height:14px}.document-tab.active{color:var(--accent-text);font-weight:600}.document-tab.active:after{content:'';position:absolute;bottom:0;height:2px;left:2px;right:2px;background:var(--accent)}.tab-count{background:var(--rail);border-radius:4px;padding:2px 5px;font-size:9px;color:var(--muted);font-weight:500;font-variant-numeric:tabular-nums}.reader{overflow:auto;min-height:0;flex:1}.file-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 30px;background:var(--panel);border-bottom:1px solid var(--line);font-size:10px;color:var(--muted)}.file-toolbar>span{display:flex;gap:7px;align-items:center;min-width:0}.file-toolbar>span>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-toolbar svg{width:13px;height:13px}.segmented{display:flex;align-items:center;padding:2px;background:var(--rail);border:1px solid var(--line);border-radius:5px;flex-shrink:0}.segmented a{padding:4px 8px;font-size:10px;border-radius:3px;display:flex;align-items:center;color:var(--muted)}.segmented a.active{background:var(--surface);color:var(--text);box-shadow:0 1px 3px #14213b0d}.prose{font-size:var(--prose);line-height:1.8;color:var(--text);max-width:80ch;padding:24px var(--reader-pad) 50px;margin:0 auto;overflow-wrap:anywhere}.prose h1{font-size:27px;letter-spacing:-.6px;font-weight:650;line-height:1.3;margin:6px 0 28px}.prose h2{font-size:18px;font-weight:650;letter-spacing:-.25px;margin:30px 0 12px;padding-bottom:8px;border-bottom:1px solid var(--line);line-height:1.4}.prose h3{font-size:15px;font-weight:650;margin:25px 0 9px;line-height:1.45}.prose h4{font-size:13px;margin:20px 0 7px}.prose p{margin:12px 0 17px}.prose ul,.prose ol{padding-left:23px;margin:12px 0 19px}.prose li{margin:8px 0;padding-left:4px}.prose li::marker{color:var(--muted)}.prose a{text-decoration:underline;text-underline-offset:3px;color:var(--accent-text)}.prose code{background:var(--code);border:1px solid var(--line);border-radius:4px;padding:1px 4px;font-size:.78em;color:var(--accent-text)}.prose pre{background:var(--code);border:1px solid var(--line);padding:16px;border-radius:6px;overflow:auto;font-size:12px;line-height:1.75}.prose pre code{padding:0;border:0;background:none;color:var(--text);font-size:inherit}.prose blockquote{margin:20px 0;padding:1px 16px;border-left:1px solid var(--accent);background:var(--panel)}.prose table{border-collapse:collapse;width:100%;font-size:12px;display:block;overflow:auto}.prose th,.prose td{padding:9px 12px;border:1px solid var(--line);text-align:left}.prose th{background:var(--panel)}.prose input[type=checkbox]{accent-color:var(--accent);vertical-align:middle;margin:0 7px 0 -18px}.source-view{margin:0;padding:24px 30px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.85;color:var(--text)}.workspace-footer{min-height:35px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 20px;font-size:9px;color:var(--muted);gap:12px}.workspace-footer>span{display:flex;align-items:center;gap:6px}.workspace-footer svg{width:12px;height:12px}.footer-divider{opacity:.5;margin:0 3px}.inspector{background:var(--panel);border-left:1px solid var(--line);display:flex;flex-direction:column;min-height:0;overflow:auto}.inspector-section{padding:24px 20px;border-bottom:1px solid var(--line)}.section-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.section-title h2{font-size:12px;margin:0;font-weight:650}.section-title>svg{width:14px;color:var(--muted)}dl{margin:0}dl>div{display:flex;align-items:center;justify-content:space-between;margin-top:15px;font-size:11px}dt{color:var(--muted)}dd{margin:0}.task-progress{margin-top:24px}.task-progress>span{display:flex;justify-content:space-between;font-size:10px;color:var(--muted)}.task-progress strong{font-size:11px;color:var(--text);font-weight:600}.progress-track{display:block!important;height:4px;background:var(--line);border-radius:8px;margin-top:10px;overflow:hidden}.progress-track>span{height:100%;display:block;background:var(--accent);border-radius:8px}.agent-state{display:flex;gap:7px;align-items:center;font-size:11px;font-weight:500}.inspector-copy{font-size:11px;line-height:1.75;color:var(--muted);margin:10px 0}.attach-details{font-size:10px;color:var(--muted);margin:12px 0 20px;line-height:1.7}.attach-details summary{cursor:pointer;color:var(--accent-text)}.attach-details code{font-size:10px;color:var(--text);overflow-wrap:anywhere}.workflow-form{display:flex;flex-direction:column;gap:8px}.workflow-form label{font-size:10px;color:var(--muted);font-weight:500;margin-top:5px}.workflow-form label>span{font-weight:400;float:right}.workflow-form select{font-size:11px;width:100%;min-height:37px}.workflow-form textarea{resize:vertical;min-height:75px;padding:10px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);color:var(--text);font-size:11px;line-height:1.6}.workflow-form textarea::placeholder{color:var(--muted)}.full-width{width:100%;margin-top:5px;justify-content:flex-start;min-height:37px}.full-width>svg:last-child{margin-left:auto}.activity-section{flex:1}.activity-empty{display:flex;gap:9px;align-items:flex-start;color:var(--muted)}.activity-empty>svg{width:14px;margin-top:2px}.activity-empty p{margin:0;font-size:10px;line-height:1.8}.activity-empty p span{font-size:10px}.activity{font-size:11px;border-bottom:1px solid var(--line);padding:12px 0}.activity summary{display:flex;align-items:flex-start;gap:8px;cursor:pointer}.activity summary strong{font-size:10px;font-weight:550;display:block}.activity small{font-size:9px;display:block;margin-top:5px;text-transform:capitalize}.activity-dot{height:6px;width:6px;margin-top:4px;border-radius:50%;background:var(--muted);flex-shrink:0}.activity-dot.running{background:var(--accent)}.activity-dot.completed{background:var(--green)}.activity-dot.failed{background:var(--red)}.activity-body{font-size:10px;line-height:1.7;padding:5px 0 0 14px;overflow-wrap:anywhere}.activity-body time{color:var(--muted);font-size:9px}.activity-body p{margin:8px 0}.text-link,.text-button{color:var(--accent-text);font-size:10px}.text-button{background:none;border:0;padding:0;min-height:28px}.inspector-bottom{padding:17px 20px;display:flex;gap:7px;font-size:9px;color:var(--muted)}.inspector-bottom svg{width:13px;height:13px}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:70px 30px;text-align:center;min-height:360px;max-width:660px;margin:auto}.empty-state>svg{width:36px;height:36px;color:var(--accent);margin-bottom:20px}.empty-state h2{font-size:23px;font-weight:550;letter-spacing:-.5px;margin:0 0 15px}.empty-state p{color:var(--muted);line-height:1.9;font-size:13px;max-width:55ch;margin:0 0 20px}.empty-state>code{padding:10px 16px;border-radius:5px;background:var(--code)}.preview-steps{display:flex;gap:0;flex-wrap:wrap;justify-content:center;margin-top:12px}.preview-steps span{padding:8px 12px;font-size:10px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);color:var(--muted)}.review-intro{padding:26px 28px;border-bottom:1px solid var(--line)}.review-intro h2{font-size:20px;font-weight:600;margin:0 0 10px;letter-spacing:-.4px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}.review-intro p{font-size:12px;line-height:1.8;color:var(--muted);margin:0;max-width:75ch}.spec-diff{margin:20px;border:1px solid var(--line);border-radius:6px;overflow:hidden}.diff-file-head{display:flex;align-items:center;gap:8px;padding:12px 15px;background:var(--panel);border-bottom:1px solid var(--line);font-size:11px;flex-wrap:wrap}.diff-file-head strong{font-family:'IBM Plex Mono',monospace;font-weight:500;overflow-wrap:anywhere}.diff-file-head>svg{width:14px}.operation-badges,.diff-file-head>.segmented{margin-left:auto}.operation-badges{display:flex;gap:4px}.comparison{display:grid;grid-template-columns:1fr 1fr}.comparison>section{min-width:0}.comparison>section+section{border-left:1px solid var(--line)}.comparison h3,.split-diff h3{margin:0;padding:10px 16px;border-bottom:1px solid var(--line);color:var(--muted);font-size:10px;font-weight:500}.prose.small{padding:10px 18px;font-size:12px}.prose.small h1{font-size:20px}.prose.small h2{font-size:15px}.prose.small h3{font-size:13px}.prose.small h4{font-size:12px}.preview-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:20px}.preview-actions>span{font-size:11px;margin-right:auto}.preview-actions form{margin:0}.diff-add{color:var(--green);margin-left:8px}.diff-remove{color:var(--red);margin-left:5px}.preview-layout{display:grid;grid-template-columns:180px minmax(0,1fr);min-height:280px}.preview-files{border-right:1px solid var(--line);padding:12px 8px;font-size:10px;background:var(--panel)}.preview-files a{display:flex;align-items:flex-start;gap:7px;padding:9px 7px;overflow-wrap:anywhere;border-radius:4px}.preview-files a.selected{background:var(--accent-soft)}.file-state{font-family:'IBM Plex Mono',monospace;font-size:9px;margin-top:1px}.file-state.added{color:var(--green)}.file-state.deleted{color:var(--red)}.file-state.modified{color:var(--accent)}.diff-panel{min-width:0}.split-diff{display:grid;grid-template-columns:1fr 1fr}.split-diff>section{min-width:0;overflow:auto}.split-diff>section+section{border-left:1px solid var(--line)}.split-diff h3 span{font-size:9px;opacity:.8}.code-diff{overflow:auto;font-size:10px;font-family:'IBM Plex Mono',monospace;line-height:1.9;padding:10px 0;min-height:100px}.diff-row{display:flex;min-width:max-content}.diff-row code{font-size:inherit;white-space:pre;padding:0 10px 0 0}.line-number{display:inline-block;color:var(--muted);width:35px;text-align:right;padding-right:10px;flex-shrink:0;user-select:none}.diff-row.addition{background:var(--green-bg);color:var(--green)}.diff-row.deletion{background:var(--red-bg);color:var(--red)}.diff-empty{font-size:11px;padding:10px 20px}.error-message,.success-message{font-size:11px;line-height:1.7;padding:10px 12px;border-radius:5px;overflow-wrap:anywhere}.error-message{color:var(--red);background:var(--red-bg)}.success-message{color:var(--green);background:var(--green-bg)}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%) translateY(12px);background:var(--text);color:var(--surface);padding:12px 18px;border-radius:7px;font-size:12px;max-width:calc(100vw - 30px);z-index:20;opacity:0;pointer-events:none;transition:opacity .18s,transform .18s}#toast.visible{opacity:1;transform:translateX(-50%) translateY(0)}.mobile-menu,.navigation-close{display:none}.skip-link{position:fixed;top:-60px;left:10px;z-index:40;background:var(--accent);color:var(--surface);padding:10px}.skip-link:focus{top:5px}dialog{color:var(--text);background:var(--surface);border:1px solid var(--line);border-radius:12px;max-width:min(460px,calc(100vw - 32px));padding:26px;box-shadow:0 20px 70px #15203b26}dialog::backdrop{background:#101a3066}dialog h2{font-size:20px;margin:0 0 14px}dialog p{font-size:13px;line-height:1.8;color:var(--muted)}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}form.htmx-request button[type=submit]{opacity:.6;pointer-events:none}*{scrollbar-width:thin;scrollbar-color:var(--line) transparent}
3
3
  [data-theme=dark]{color-scheme:dark;--bg:#171c26;--surface:#1c2330;--rail:#151b27;--panel:#19202c;--text:#dce3ef;--muted:#9caac0;--line:#303b4d;--accent:#87a6ee;--accent-soft:#2b3c5b;--accent-text:#b7cdfb;--green:#9bd4b1;--green-bg:#213a32;--red:#ecadb0;--red-bg:#432a33;--code:#151c28}
4
4
  @media(min-width:1600px){:root{--rail-width:260px;--panel-width:310px;--reader-pad:52px}.change-header{flex-direction:row;justify-content:space-between;align-items:center}.prose{padding-top:34px}}
5
5
  @media(max-width:1150px) and (min-width:761px){:root{--rail-width:205px;--panel-width:235px;--reader-pad:26px}.inspector-section{padding:20px 15px}.change-title-line h1{font-size:22px}.change-header{padding-left:25px;padding-right:25px}.preview-layout{grid-template-columns:1fr}.preview-files{border-right:0;border-bottom:1px solid var(--line);display:flex;overflow:auto}.preview-files a{flex-shrink:0;max-width:220px}.comparison{grid-template-columns:1fr}.comparison>section+section{border-left:0;border-top:1px solid var(--line)}}
@@ -63,6 +63,7 @@
63
63
  .split-diff-table .diff-gap{background:var(--panel)}
64
64
  @media(max-width:760px){.changed-files-nav{max-height:45dvh}.file-review-intro{padding:20px 16px}.diff-version-form select{max-width:210px}.diff-empty-state{padding:24px 12px}.diff-empty-state .empty-state{padding:20px 8px}.diff-empty-actions .button{min-height:44px}.file-review-intro .preview-actions{gap:8px}.file-review-intro .preview-actions>span{flex-basis:100%;margin-bottom:2px}.file-review-intro .button{min-height:36px}}
65
65
  /* Markdown task checkboxes stay legible even though they are read-only. */
66
+ .prose li:has(>input[type=checkbox]),.prose li:has(>p>input[type=checkbox]),.prose li.task-list-item{list-style:none}
66
67
  .prose input[type=checkbox]{appearance:none;-webkit-appearance:none;display:inline-grid;place-content:center;inline-size:15px;block-size:15px;padding:0;border:1px solid var(--muted);border-radius:3px;background:var(--surface);opacity:1;vertical-align:-2px}
67
68
  .prose input[type=checkbox]:checked{border-color:var(--green);background:var(--green)}
68
69
  .prose input[type=checkbox]:checked::after{content:"";display:block;inline-size:12px;block-size:12px;background:var(--surface);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 8.5 3.5 3.5L13 4.5' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 8.5 3.5 3.5L13 4.5' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat}
@@ -92,7 +93,7 @@
92
93
  .request-state{display:inline-flex;align-items:center;gap:5px;padding:2px 6px;border-radius:4px;background:var(--panel);color:var(--muted);font-size:10px;font-weight:500;line-height:16px;white-space:nowrap;flex-shrink:0}
93
94
  .request-state::before{content:"";width:4px;height:4px;border-radius:50%;background:currentColor;flex-shrink:0}
94
95
  .request-state[data-state=completed]{background:var(--green-bg);color:var(--green)}
95
- .request-state[data-state=failed],.request-state[data-state=stalled]{background:var(--red-bg);color:var(--red)}
96
+ .request-state[data-state=failed]{background:var(--red-bg);color:var(--red)}.request-state[data-state=stalled]{background:var(--rail);color:var(--muted)}
96
97
  .request-state[data-state=running],.request-state[data-state=awaiting-input]{background:var(--accent-soft);color:var(--accent-text)}
97
98
  .request-row details{min-width:0;font-size:12px;line-height:1.65;overflow-wrap:anywhere}
98
99
  .request-row summary{display:flex;align-items:flex-start;gap:8px;min-height:24px;margin:6px 0 4px;padding:2px 0;list-style:none;cursor:pointer;color:var(--muted);border-radius:3px}
@@ -174,3 +175,5 @@
174
175
  @media(prefers-reduced-motion:reduce){.sidebar-community-invite>svg:last-child{transition:none;transform:none}}
175
176
  .preview-blocker{font-size:11px;color:var(--muted);line-height:1.6;margin:7px 0 12px}
176
177
  .guided-file-actions{gap:12px;flex-wrap:wrap}.guided-file-actions>span{margin-right:auto}.guided-file-actions .preview-followup{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.guided-file-actions .preview-blocker{flex-basis:100%;margin:0}
178
+
179
+ [data-enable-notifications][hidden]{display:none!important}
package/public/app.js CHANGED
@@ -71,28 +71,74 @@
71
71
  applyTheme(document.documentElement.dataset.theme === 'dark' ? 'enterprise' : 'dark');
72
72
  try { localStorage.setItem('spequi-theme', document.documentElement.dataset.theme); } catch {}
73
73
  });
74
+ function updateNotificationControls() {
75
+ const supported = 'Notification' in window;
76
+ const permission = supported ? Notification.permission : 'unavailable';
77
+ for (const button of document.querySelectorAll('[data-enable-notifications]')) button.hidden = permission !== 'default';
78
+ for (const toggle of document.querySelectorAll('[data-notification-toggle]')) {
79
+ toggle.dataset.notificationState = permission;
80
+ toggle.setAttribute('aria-label', permission === 'granted' ? 'Desktop notifications enabled' : 'Desktop notification settings');
81
+ toggle.title = permission === 'granted' ? 'Desktop notifications enabled' : 'Get notified when work finishes or your agent needs an answer';
82
+ }
83
+ for (const status of document.querySelectorAll('[data-notification-message]')) {
84
+ status.textContent = { granted: 'Desktop notifications are enabled for this browser.', denied: 'Notifications are blocked. Allow them in your browser’s site settings to enable desktop alerts.', unavailable: 'This browser does not support desktop notifications. In-app updates still work.', default: 'Desktop alerts are optional. In-app updates always stay available.' }[permission];
85
+ }
86
+ }
87
+ document.addEventListener('click', async event => {
88
+ const notificationButton = event.target.closest('[data-enable-notifications]');
89
+ if (notificationButton) {
90
+ notificationButton.disabled = true;
91
+ try {
92
+ const permission = await Notification.requestPermission();
93
+ toast(permission === 'granted' ? 'Desktop notifications enabled for this browser.' : 'Desktop notifications are off. Completion messages will still appear here.');
94
+ } catch { toast('Desktop notifications are unavailable. Completion messages will still appear here.'); }
95
+ finally { notificationButton.disabled = false; updateNotificationControls(); }
96
+ }
97
+ const toggle = event.target.closest('[data-spec-context-toggle]');
98
+ if (toggle) {
99
+ const quotes = [...toggle.closest('.file-diff').querySelectorAll('.spec-context-quote')];
100
+ const open = toggle.getAttribute('aria-expanded') !== 'true';
101
+ for (const quote of quotes) { quote.open = open; specDisclosures.set(quote.id, open); }
102
+ toggle.setAttribute('aria-expanded', String(open)); toggle.textContent = open ? 'Collapse quotes' : 'Expand quotes';
103
+ }
104
+ });
105
+ function syncSpecToggle() {
106
+ for (const toggle of document.querySelectorAll('[data-spec-context-toggle]')) {
107
+ const open = [...toggle.closest('.file-diff').querySelectorAll('.spec-context-quote')].some(quote => quote.open);
108
+ toggle.setAttribute('aria-expanded', String(open)); toggle.textContent = open ? 'Collapse quotes' : 'Expand quotes';
109
+ }
110
+ }
111
+ document.addEventListener('toggle', event => {
112
+ if (!event.target.matches?.('.spec-context-quote')) return;
113
+ specDisclosures.set(event.target.id, event.target.open); syncSpecToggle();
114
+ }, true);
115
+ document.addEventListener('htmx:afterSwap', updateNotificationControls);
116
+ window.addEventListener('focus', updateNotificationControls);
117
+ document.addEventListener('beforetoggle', event => { if (event.target.id === 'notification-settings' && event.newState === 'open') updateNotificationControls(); }, true);
118
+ updateNotificationControls();
74
119
  let pendingRefresh = false, refreshing = false, followUpRefresh = false, navigationRequests = 0, navigationGeneration = 0, backgroundXHR = null;
75
120
  const drafts = {};
76
121
  const specDisclosures = new Map();
77
122
  const sourceDrafts = new Map(), sourcePending = new Set(), sourceMessages = new Map();
78
123
  const initialDetailsToggle = document.getElementById('toggle-review-details');
79
124
  let reviewDetailsOpen = initialDetailsToggle ? initialDetailsToggle.getAttribute('aria-expanded') === 'true' : undefined, preserveReader = null;
80
- function toast(message, downloadUrl = '') {
125
+ function toast(message, downloadUrl = '', href = '') {
81
126
  const node = document.getElementById('toast'); if (!node) return;
82
127
  node.textContent = message;
83
128
  if (/^\/api\/reviews\/[a-zA-Z0-9_-]+\/feedback\/[a-zA-Z0-9_-]+$/.test(downloadUrl)) {
84
129
  const link = document.createElement('a'); link.href = downloadUrl; link.download = 'openspec-review-feedback.md'; link.textContent = 'Download Markdown'; node.append(link);
85
130
  }
131
+ if (typeof href === 'string' && href.startsWith('/?')) { const link = document.createElement('a'); link.href = href; link.textContent = 'Open result'; node.append(link); }
86
132
  node.classList.add('visible'); clearTimeout(node.hideTimer);
87
- const dismiss = () => { node.hideTimer = setTimeout(() => node.classList.remove('visible'), downloadUrl ? 9000 : 4500); };
133
+ const dismiss = () => { node.hideTimer = setTimeout(() => node.classList.remove('visible'), downloadUrl || href ? 9000 : 4500); };
88
134
  node.onpointerenter = node.onfocusin = () => clearTimeout(node.hideTimer);
89
135
  node.onpointerleave = node.onfocusout = dismiss; dismiss();
90
136
  }
91
137
  document.addEventListener('spequi-toast', event => {
92
- const { message, downloadUrl = '', persist = false } = event.detail || {};
138
+ const { message, downloadUrl = '', href = '', persist = false } = event.detail || {};
93
139
  if (typeof message !== 'string' || !message) return;
94
140
  if (persist) try { sessionStorage.setItem('spequi-toast', JSON.stringify({ message, at: Date.now() })); } catch {}
95
- toast(message, downloadUrl);
141
+ toast(message, downloadUrl, href);
96
142
  });
97
143
  try {
98
144
  const saved = JSON.parse(sessionStorage.getItem('spequi-toast')); sessionStorage.removeItem('spequi-toast');
@@ -117,10 +163,35 @@
117
163
  if (sourcePending.has(scope)) for (const button of document.querySelectorAll('[data-source-action] button')) button.disabled = true;
118
164
  const message = sourceMessages.get(scope), feedback = document.getElementById('source-preview-feedback');
119
165
  if (message && feedback) { feedback.textContent = message.text; feedback.className = message.error ? 'error-message' : 'success-message'; }
166
+ syncSpecToggle();
120
167
  }
121
168
  function readingViewport() { return document.querySelector('.diff-code-scroll') || document.querySelector('.reader'); }
169
+ let filesLoading = null;
170
+ function restoreFilesLoading(error = false) {
171
+ const saved = filesLoading; filesLoading = null;
172
+ if (!saved) return;
173
+ clearTimeout(saved.timer);
174
+ saved.link.removeAttribute('aria-busy');
175
+ if (saved.label?.isConnected) saved.label.textContent = saved.text;
176
+ if (error) toast('Could not load file changes. Try the Files tab again.');
177
+ }
178
+ function showFilesLoading(link, xhr) {
179
+ restoreFilesLoading();
180
+ const label = link.querySelector('span'), saved = { link, xhr, label, text: label?.textContent };
181
+ filesLoading = saved;
182
+ saved.timer = setTimeout(() => {
183
+ if (filesLoading !== saved || !link.isConnected) return;
184
+ link.setAttribute('aria-busy', 'true');
185
+ if (label) label.textContent = 'Opening…';
186
+ }, 400);
187
+ }
188
+ let applyingRequest = null;
189
+ let refreshTimer;
122
190
  function refresh() {
123
- if (sourcePending.size || navigationRequests) { pendingRefresh = true; return; }
191
+ clearTimeout(refreshTimer); refreshTimer = setTimeout(refreshWorkspace, 150);
192
+ }
193
+ function refreshWorkspace() {
194
+ if (sourcePending.size || navigationRequests || applyingRequest) { pendingRefresh = true; return; }
124
195
  if (refreshing) { pendingRefresh = true; followUpRefresh = true; return; }
125
196
  if (!window.htmx) { pendingRefresh = true; return; }
126
197
  if (document.activeElement?.matches('input,textarea,select') || document.getElementById('apply-dialog')?.open || document.querySelector('dialog[open]')) { pendingRefresh = true; return; }
@@ -150,17 +221,50 @@
150
221
  document.addEventListener('htmx:configRequest', event => { event.detail.headers['X-CSRF-Token'] = document.querySelector('meta[name="csrf-token"]').content; });
151
222
  document.addEventListener('htmx:beforeRequest', event => {
152
223
  const xhr = event.detail?.xhr;
224
+ const applyForm = event.detail?.elt?.closest?.('[data-apply-form]');
225
+ if (applyForm) {
226
+ if (applyingRequest) { event.preventDefault(); return; }
227
+ const button = applyForm.querySelector('button'), feedback = document.getElementById('apply-feedback');
228
+ applyingRequest = { xhr, form: applyForm, button, html: button.innerHTML, disabled: button.disabled, feedback };
229
+ navigationGeneration++; backgroundXHR?.abort(); backgroundXHR = null;
230
+ applyForm.setAttribute('aria-busy', 'true'); button.disabled = true;
231
+ button.innerHTML = '<span class="apply-spinner" aria-hidden="true"></span>Applying changes…';
232
+ if (feedback) feedback.innerHTML = '<div class="applying-notice" role="status"><span class="apply-spinner" aria-hidden="true"></span><div><strong>Applying reviewed changes</strong><p>Saving the approved files to your project. This review will update when the operation finishes.</p></div></div>';
233
+ }
153
234
  if (event.detail?.requestConfig?.headers?.['X-Spequi-Refresh'] === '1' && xhr) {
154
235
  xhr.spequiGeneration = navigationGeneration; backgroundXHR = xhr;
155
236
  } else if (event.detail?.target?.id === 'workspace' && event.detail?.elt?.matches('a,form,input')) {
156
237
  navigationGeneration++; navigationRequests++;
157
- if (xhr) xhr.spequiNavigation = true;
238
+ if (xhr) { xhr.spequiNavigation = true; xhr.spequiGeneration = navigationGeneration; }
158
239
  backgroundXHR?.abort(); backgroundXHR = null;
159
240
  }
160
241
  remember();
242
+ const filesTab = event.detail?.elt?.closest?.('a[data-files-tab]');
243
+ if (filesTab) showFilesLoading(filesTab, xhr);
244
+ else if (xhr?.spequiNavigation) restoreFilesLoading();
161
245
  if (event.detail.elt?.closest('[data-preserve-reader]')) { const reader = readingViewport(); preserveReader = reader ? { top: reader.scrollTop, left: reader.scrollLeft } : null; }
162
246
  });
163
247
  document.addEventListener('htmx:afterRequest', event => {
248
+ if (applyingRequest?.xhr === event.detail?.xhr) {
249
+ const { form, button, html, disabled, feedback } = applyingRequest;
250
+ applyingRequest = null; form.removeAttribute('aria-busy');
251
+ const success = event.detail.xhr.status >= 200 && event.detail.xhr.status < 300 && !event.detail.failed;
252
+ button.innerHTML = success ? 'Changes applied' : html; button.disabled = success || disabled;
253
+ if (success) { pendingRefresh = true; setTimeout(refresh, 100); }
254
+ else {
255
+ pendingRefresh = false;
256
+ if (feedback?.querySelector('.applying-notice')) {
257
+ feedback.replaceChildren();
258
+ const error = document.createElement('p'); error.className = 'error-message'; error.setAttribute('role', 'alert');
259
+ error.textContent = 'Could not confirm whether the files were applied. Refresh this review before trying again.';
260
+ feedback.append(error);
261
+ }
262
+ }
263
+ }
264
+ if (filesLoading?.xhr === event.detail?.xhr) {
265
+ if (event.detail.failed || event.detail.xhr.status === 0 || event.detail.xhr.status >= 400) restoreFilesLoading(true);
266
+ else restoreFilesLoading();
267
+ }
164
268
  if (!event.detail?.xhr?.spequiNavigation) return;
165
269
  navigationRequests = Math.max(0, navigationRequests - 1);
166
270
  if (!navigationRequests && pendingRefresh) setTimeout(refresh, 100);
@@ -168,6 +272,7 @@
168
272
  document.addEventListener('htmx:beforeSwap', event => {
169
273
  const generation = event.detail?.xhr?.spequiGeneration;
170
274
  if (generation !== undefined && generation !== navigationGeneration) event.detail.shouldSwap = false;
275
+ if (filesLoading?.xhr === event.detail.xhr && event.detail.xhr.status >= 400) event.detail.shouldSwap = false;
171
276
  });
172
277
  document.addEventListener('htmx:afterSwap', () => {
173
278
  restore(); initializeDiff();
@@ -175,7 +280,7 @@
175
280
  });
176
281
  // HTMX restores incoming class attributes during settling, after afterSwap.
177
282
  document.addEventListener('htmx:afterSettle', initializeDiff);
178
- document.addEventListener('htmx:beforeSwap', event => { if (event.detail.xhr.status >= 400 && event.detail.xhr.status < 500) { event.detail.shouldSwap = true; event.detail.isError = false; } });
283
+ document.addEventListener('htmx:beforeSwap', event => { if (event.detail.xhr.status >= 400 && event.detail.xhr.status < 500 && event.detail.xhr.spequiGeneration === undefined) { event.detail.shouldSwap = true; event.detail.isError = false; } });
179
284
  document.addEventListener('htmx:sendError', () => toast('Could not reach the viewer. Check that the local server is running.'));
180
285
  document.addEventListener('workspace-updated', () => { pendingRefresh = true; refresh(); });
181
286
  document.addEventListener('focusout', () => { if (pendingRefresh) setTimeout(refresh, 100); });
@@ -278,11 +383,17 @@
278
383
  }, true);
279
384
  document.addEventListener('submit', event => {
280
385
  const form = event.target.closest('[data-apply-form]');
386
+ if (form && applyingRequest) { event.preventDefault(); event.stopImmediatePropagation(); return; }
281
387
  if (!form || form.dataset.confirmed) { if (form) delete form.dataset.confirmed; return; }
282
388
  event.preventDefault(); event.stopImmediatePropagation();
283
389
  const dialog = document.getElementById('apply-dialog');
284
390
  dialog.returnValue = ''; dialog.showModal();
285
- dialog.addEventListener('close', () => { if (dialog.returnValue === 'confirm') { form.dataset.confirmed = 'true'; form.requestSubmit(); } }, { once: true });
391
+ const action = form.getAttribute('hx-post');
392
+ dialog.addEventListener('close', () => {
393
+ if (dialog.returnValue !== 'confirm') return;
394
+ const current = [...document.querySelectorAll('[data-apply-form]')].find(item => item.getAttribute('hx-post') === action);
395
+ if (current && !current.querySelector('button').disabled) { current.dataset.confirmed = 'true'; current.requestSubmit(); }
396
+ }, { once: true });
286
397
  }, true);
287
398
  let retry = 1000, hasConnected = false;
288
399
  let agentRequest;
@@ -317,7 +428,7 @@
317
428
  function loadHTMX() {
318
429
  const script = document.createElement('script');
319
430
  script.src = '/vendor/htmx.js';
320
- script.addEventListener('load', () => { if (pendingRefresh) refresh(); });
431
+ script.addEventListener('load', () => { window.htmx.config.defaultSettleDelay = 0; window.htmx.config.attributesToSettle = []; if (pendingRefresh) refresh(); });
321
432
  script.addEventListener('error', () => toast('HTMX could not load. Reload the viewer to retry.'));
322
433
  document.head.append(script);
323
434
  }
package/public/diff.css CHANGED
@@ -142,7 +142,7 @@
142
142
  .compact-workspace.review-details-open .inspector{display:flex}
143
143
  .inspector[hidden]{display:none!important}
144
144
  .compact-workspace .workspace-footer{display:none}
145
- .compact-change-header{display:grid;grid-template-columns:minmax(0,1fr) auto 32px;align-items:center;gap:16px;padding:0 16px;min-height:46px;background:var(--surface);border-bottom:1px solid var(--line);flex-shrink:0;z-index:3}
145
+ .compact-change-header{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:16px;padding:0 16px;min-height:46px;background:var(--surface);border-bottom:1px solid var(--line);flex-shrink:0;z-index:3}
146
146
  .details-icon-toggle{width:32px;min-height:32px;padding:6px;background:transparent;border-color:transparent}
147
147
  .details-icon-toggle[aria-expanded=true]{background:var(--accent-soft);color:var(--accent-text)}
148
148
  .details-icon-toggle:hover{background:var(--rail)}
@@ -150,10 +150,10 @@
150
150
  .compact-change-header .document-tab{flex-shrink:0;font-size:11px;padding:13px 1px;gap:6px}
151
151
  .compact-change-header .document-tab svg{width:13px;height:13px}
152
152
  .compact-change-header .tab-count{font-size:9px;padding:2px 4px}
153
- .compact-workspace .breadcrumbs{min-height:44px;min-width:0;padding:0;gap:10px;flex-wrap:nowrap;border-bottom:0;overflow:hidden}
154
- .compact-workspace .breadcrumbs>strong{min-width:0}
155
- .compact-workspace .breadcrumbs>span{white-space:nowrap;flex-shrink:0}.compact-workspace .breadcrumbs>span:first-of-type{flex:0 1 auto;min-width:0;max-width:35%;overflow:hidden;text-overflow:ellipsis}
156
- .compact-workspace .breadcrumbs>.mobile-menu{flex-shrink:0}
153
+ .compact-change-header .breadcrumbs{min-height:44px;min-width:0;padding:0;gap:10px;flex-wrap:nowrap;border-bottom:0;overflow:hidden}
154
+ .compact-change-header .breadcrumbs>strong{min-width:0}
155
+ .compact-change-header .breadcrumbs>span{white-space:nowrap;flex-shrink:0}.compact-change-header .breadcrumbs>span:first-of-type{flex:0 1 auto;min-width:0;max-width:35%;overflow:hidden;text-overflow:ellipsis}
156
+ .compact-change-header .breadcrumbs>.mobile-menu{flex-shrink:0}
157
157
  .compact-review-feedback{flex-shrink:0}
158
158
  .source-preview-tools{flex-shrink:0;min-width:0;border-bottom:1px solid var(--line);font-size:12px;background:var(--panel)}
159
159
  .source-preview-tools>summary{display:grid;grid-template-columns:18px auto minmax(0,1fr) 16px;align-items:center;gap:9px;cursor:pointer;padding:12px 16px;list-style:none}
@@ -193,7 +193,7 @@
193
193
  .compact-workspace .review-diff-table th span{display:none}
194
194
  @media(min-width:761px){.workspace.compact-workspace{grid-template-columns:var(--rail-width) minmax(0,1fr)}.workspace.compact-workspace.review-details-open{grid-template-columns:var(--rail-width) minmax(0,1fr) var(--panel-width)}}
195
195
  @container review-main (max-width:640px){
196
- .compact-change-header{grid-template-columns:minmax(0,1fr) 32px;gap:0 8px}
196
+ .compact-change-header{grid-template-columns:minmax(0,1fr) auto;gap:0 8px}
197
197
  .compact-change-header .breadcrumbs{grid-column:1 / -1}
198
198
  .compact-change-header .document-tabs{justify-self:stretch}
199
199
  }
@@ -215,3 +215,38 @@
215
215
  .completed-diff-option>summary{cursor:pointer;min-height:32px;padding:7px;color:var(--accent-text)}
216
216
  .completed-diff-option>p{margin:6px 0 12px;font-size:11px;line-height:1.7}
217
217
  .completed-diff-option .generate-diff-form{display:flex;justify-content:center}
218
+ .apply-spinner{display:inline-block;flex-shrink:0;box-sizing:border-box;width:15px;height:15px;border:2px solid color-mix(in srgb,currentColor 30%,transparent);border-top-color:currentColor;border-radius:50%;animation:files-loading-spin .8s linear infinite}
219
+ .applying-notice{display:flex;align-items:flex-start;gap:12px;padding:16px;background:var(--accent-soft);color:var(--accent-text);border-bottom:1px solid var(--line)}
220
+ .applying-notice>.apply-spinner{margin-top:2px}
221
+ .applying-notice strong{font-size:12px;font-weight:600;line-height:1.6}
222
+ .applying-notice p{margin:4px 0 0;font-size:11px;line-height:1.8;max-width:70ch}
223
+ .files-load-error{padding:16px 24px;color:var(--red);border-bottom:1px solid var(--line)}
224
+ .files-load-error p{margin:0 0 8px}
225
+ .inspector[hidden]{display:none}
226
+ @keyframes files-loading-spin{to{transform:rotate(360deg)}}
227
+
228
+ @media(prefers-reduced-motion:reduce){.apply-spinner{animation:none}}
229
+
230
+ .diff-empty-state .empty-state>.diff-cli-note,.diff-empty-state .empty-state>.diff-scope-note{font-size:12px;line-height:1.7;margin-top:18px;color:var(--muted)}
231
+ .diff-generation-status{background:transparent;border-block:1px solid var(--line);border-radius:0;padding:14px 0;margin-top:24px}
232
+ .diff-summary{flex-shrink:0;border-bottom:1px solid var(--line);background:var(--surface);font-size:12px}
233
+ .diff-summary>summary{display:flex;align-items:center;gap:8px;padding:11px 16px;cursor:pointer;list-style:none}
234
+ .diff-summary>summary::-webkit-details-marker{display:none}
235
+ .diff-summary>summary>span{color:var(--muted);margin-left:auto;font-size:11px}
236
+ .diff-summary>summary>svg{width:14px;height:14px;color:var(--accent-text)}
237
+ .diff-summary[open]>summary>svg:last-child{transform:rotate(90deg)}
238
+ .diff-summary>.prose{margin:0;max-width:none;max-height:200px;overflow:auto;padding:0 18px 16px;font-size:13px;line-height:1.7}
239
+ .spec-context-overview{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:9px 16px;border-bottom:1px solid var(--line);background:var(--surface);font:11px/1.6 'DM Sans',sans-serif;flex-shrink:0}
240
+ .spec-context-overview>span{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
241
+ .spec-context-overview svg{width:14px;height:14px;color:var(--accent-text)}
242
+ .spec-context-overview>span>span{color:var(--muted)}
243
+ .spec-context-overview .text-button{font-size:11px}
244
+ .diff-panel .spec-context-inline{max-width:90ch}
245
+ @media(max-width:760px){.spec-context-overview{padding-inline:12px}.spec-context-overview .text-button{min-height:36px}.diff-summary>summary{padding-inline:12px}}
246
+
247
+ .diff-agent-question{max-width:70ch;margin:18px auto;text-align:left;font-size:13px;line-height:1.7}
248
+ .diff-agent-question>h3{font-size:14px;margin:0 0 12px}
249
+ .diff-agent-question .studio-question{background:transparent;border-radius:0;padding:12px 0}
250
+ .diff-agent-question textarea{border:1px solid var(--line);border-radius:var(--radius);padding:10px;resize:vertical}
251
+ .compact-review-feedback:has(.diff-agent-question){max-height:45dvh;overflow:auto;flex-shrink:0;padding-inline:16px}
252
+ @media(max-width:760px){.diff-agent-question textarea{font-size:16px}.diff-agent-question .button{min-height:44px}}