ソースを参照

docs: close professional console todo

Problem: Todo 53 needed final verification evidence and an explicit record that browser QA was waived by the user.\n\nRisk: no browser result is represented as passing; later visual defects must use a new follow-up todo.
zhenyu.hu 2 週間 前
コミット
8bec5bc095

+ 24 - 24
docs/plans/todo-53-professional-debug-console-ui.md

@@ -27,7 +27,7 @@
 - Modify: `src/agent_lab/presentation/static/app.js:85-93,259-320,413-450,477-677,867-897`
 - Modify: `src/agent_lab/presentation/static/index.html:212-233`
 
-- [ ] **Step 1: Write failing source-contract tests**
+- [x] **Step 1: Write failing source-contract tests**
 
 Add these assertions in focused tests:
 
@@ -46,7 +46,7 @@ assert 'id="event-agent-model-settings"' in html
 
 Slice `update_prompt`, `collect_prompts`, and `normalize_prompts` using the existing `js.index(...)` test style so each assertion is scoped to the correct function.
 
-- [ ] **Step 2: Run tests and verify RED**
+- [x] **Step 2: Run tests and verify RED**
 
 ```bash
 uv run pytest tests/test_websocket_api.py -k "event_prompt or prompt_restore or tool_mode" -q
@@ -54,7 +54,7 @@ uv run pytest tests/test_websocket_api.py -k "event_prompt or prompt_restore or
 
 Expected: new assertions fail because there is no unified refresh, generated-content filter, or model-settings container.
 
-- [ ] **Step 3: Add conservative legacy-generated-prompt detection**
+- [x] **Step 3: Add conservative legacy-generated-prompt detection**
 
 Add:
 
@@ -81,7 +81,7 @@ function removeEventPromptItems() {
 
 Change `normalizePromptItems()` to discard typed EventPrompt entries and legacy generated EventPrompt text. Insert one blank custom prompt only when no custom prompt remains; do not insert EventPrompt there.
 
-- [ ] **Step 4: Centralize mode/tool refresh and outbound filtering**
+- [x] **Step 4: Centralize mode/tool refresh and outbound filtering**
 
 Implement:
 
@@ -123,7 +123,7 @@ function collectSystemPrompts() {
 
 Wrap EventAgent model, temperature, max tokens, system prompt, and extra-body controls in `#event-agent-model-settings`. Disable that fieldset only in `chat_agent_tools`; keep loop, parallelism, and timeout controls outside it and enabled.
 
-- [ ] **Step 5: Verify GREEN**
+- [x] **Step 5: Verify GREEN**
 
 ```bash
 uv run pytest tests/test_websocket_api.py -k "event_prompt or prompt_restore or tool_mode or tools_ui" -q
@@ -133,7 +133,7 @@ git diff --check
 
 Expected: focused tests pass; Node and diff checks are clean.
 
-- [ ] **Step 6: Commit Task 1**
+- [x] **Step 6: Commit Task 1**
 
 ```bash
 git add tests/test_websocket_api.py src/agent_lab/presentation/static/app.js src/agent_lab/presentation/static/index.html
@@ -148,7 +148,7 @@ git commit -m "fix: synchronize EventPrompt with tool mode" -m "Problem: EventPr
 - Modify: `src/agent_lab/presentation/static/index.html:7-247`
 - Modify: `src/agent_lab/presentation/static/styles.css:1-end`
 
-- [ ] **Step 1: Write failing layout tests**
+- [x] **Step 1: Write failing layout tests**
 
 Require these IDs and structural markers while retaining every existing runtime control ID:
 
@@ -173,7 +173,7 @@ assert "@media (max-width: 900px)" in css
 
 Update the existing fixed-layout test to expect the new left/workspace/drawer shell instead of `.workspace-body` containing a permanent replay column.
 
-- [ ] **Step 2: Run tests and verify RED**
+- [x] **Step 2: Run tests and verify RED**
 
 ```bash
 uv run pytest tests/test_websocket_api.py -k "professional_console or layout_keeps_controls" -q
@@ -181,7 +181,7 @@ uv run pytest tests/test_websocket_api.py -k "professional_console or layout_kee
 
 Expected: failure because the new shell and CSS tokens do not exist.
 
-- [ ] **Step 3: Restructure the HTML shell**
+- [x] **Step 3: Restructure the HTML shell**
 
 Use this hierarchy:
 
@@ -203,7 +203,7 @@ Use this hierarchy:
 
 Immediately after the header, create `main#console-layout.layout` with exactly three direct children in order: `aside.controls[aria-label="Runtime controls"]`, `section.workspace[aria-label="Conversation workspace"]`, and `aside#debug-drawer.debug-drawer[aria-label="Audit and usage"]`. Create four `.control-section` blocks in the controls child. Each toggle uses `data-collapse-target`, `aria-expanded`, and `aria-controls`; Session and Tools start expanded, Agent Config and Snapshot collapsed. Move Audit Replay and Session Usage into the drawer. Keep metrics above the anchored composer, preserve dialogs and all current IDs, and version both assets as `20260714-professional-console`.
 
-- [ ] **Step 4: Implement the visual system and responsive layout**
+- [x] **Step 4: Implement the visual system and responsive layout**
 
 Start with these tokens and layout rules:
 
@@ -237,7 +237,7 @@ Start with these tokens and layout rules:
 
 Add explicit primary/secondary/danger buttons, `:focus-visible`, compact selected tool cards, restrained role-specific messages, metrics/composer boundaries, drawer overflow, and `[hidden]` collapse rules. At `max-width: 900px`, allow body scrolling, stack the three regions, remove locked heights, and prevent horizontal overflow.
 
-- [ ] **Step 5: Verify GREEN**
+- [x] **Step 5: Verify GREEN**
 
 ```bash
 uv run pytest tests/test_websocket_api.py -k "static_ui or professional_console or layout or audit_replay or agent_config" -q
@@ -247,7 +247,7 @@ git diff --check
 
 Expected: focused static tests and checks pass.
 
-- [ ] **Step 6: Commit Task 2**
+- [x] **Step 6: Commit Task 2**
 
 ```bash
 git add tests/test_websocket_api.py src/agent_lab/presentation/static/index.html src/agent_lab/presentation/static/styles.css
@@ -261,7 +261,7 @@ git commit -m "feat: redesign the debug console layout" -m "Problem: chat lacked
 - Modify: `tests/test_websocket_api.py:1396-1620`
 - Modify: `src/agent_lab/presentation/static/app.js:1-120 and session lifecycle functions`
 
-- [ ] **Step 1: Write failing persistence/status tests**
+- [x] **Step 1: Write failing persistence/status tests**
 
 ```python
 assert 'const CONSOLE_UI_STORAGE_KEY = "agent-lab-console-ui-v1"' in js
@@ -276,7 +276,7 @@ assert "current-mode-label" in js
 assert "CONSOLE_UI_STORAGE_KEY" not in build_request
 ```
 
-- [ ] **Step 2: Run tests and verify RED**
+- [x] **Step 2: Run tests and verify RED**
 
 ```bash
 uv run pytest tests/test_websocket_api.py -k "presentation_state or topbar_status" -q
@@ -284,7 +284,7 @@ uv run pytest tests/test_websocket_api.py -k "presentation_state or topbar_statu
 
 Expected: failure because the presentation-state functions do not exist.
 
-- [ ] **Step 3: Implement resilient browser-only UI state**
+- [x] **Step 3: Implement resilient browser-only UI state**
 
 ```javascript
 const CONSOLE_UI_STORAGE_KEY = "agent-lab-console-ui-v1";
@@ -308,7 +308,7 @@ function writeConsoleUiState(state) {
 
 `setControlSectionExpanded(button, expanded, { persist = true } = {})` updates `aria-expanded`, target `hidden`, and `sections[targetId]`. `setDebugDrawerOpen(open, { persist = true } = {})` updates layout class, drawer `hidden`, button text/ARIA, and `debug_drawer_open`. `initializeConsoleUi()` applies stored state over markup defaults and binds controls. None of these values enter snapshots or requests.
 
-- [ ] **Step 4: Synchronize topbar session/mode context**
+- [x] **Step 4: Synchronize topbar session/mode context**
 
 ```javascript
 function updateTopbarStatus() {
@@ -324,7 +324,7 @@ function updateTopbarStatus() {
 
 Add `updateTopbarStatus();` to `refreshToolModeState()`, then call it after bootstrap, session creation/load, `session_started`, and any path replacing `currentSessionId`. Preserve active-turn and stale-socket guards.
 
-- [ ] **Step 5: Verify GREEN**
+- [x] **Step 5: Verify GREEN**
 
 ```bash
 uv run pytest tests/test_websocket_api.py -q
@@ -334,7 +334,7 @@ git diff --check
 
 Expected: all WebSocket/static tests pass with only the existing deprecation warning.
 
-- [ ] **Step 6: Commit Task 3**
+- [x] **Step 6: Commit Task 3**
 
 ```bash
 git add tests/test_websocket_api.py src/agent_lab/presentation/static/app.js
@@ -349,7 +349,7 @@ git commit -m "feat: persist debug console presentation state" -m "Problem: draw
 - Modify: `docs/plans/todos.md:117`
 - Modify: `docs/plans/todo-53-professional-debug-console-ui.md`
 
-- [ ] **Step 1: Update README operator guidance**
+- [x] **Step 1: Update README operator guidance**
 
 Document the left control rail, primary chat workspace, anchored metrics/composer, collapsible Audit/Usage drawer, browser-only presentation state, and these rules:
 
@@ -361,7 +361,7 @@ restores regenerate the correct state. EventAgent model settings are unavailable
 in direct mode, while shared loop, concurrency, and timeout controls remain active.
 ```
 
-- [ ] **Step 2: Run the complete automated gate**
+- [x] **Step 2: Run the complete automated gate**
 
 ```bash
 uv run pytest
@@ -372,19 +372,19 @@ uv run python -c "from agent_lab.main import app; print(app.title)"
 
 Expected: full pytest passes with only the known Starlette/httpx warning; Node/diff/import checks succeed.
 
-- [ ] **Step 3: Run desktop browser QA**
+- [x] **Step 3: Run desktop browser QA (waived by user on 2026-07-15)**
 
 Start `uv run uvicorn agent_lab.main:app --host 127.0.0.1 --port 8000`, then verify section defaults/persistence, drawer width recovery, tools/All/None/count, mode badge, exactly one selected-tool EventPrompt in dual mode, no EventPrompt in direct mode, model-only disabled state, restore deduplication, chat streaming, audit dialog, and usage rendering.
 
-- [ ] **Step 4: Run narrow browser QA**
+- [x] **Step 4: Run narrow browser QA (waived by user on 2026-07-15)**
 
 At width `<= 900px`, verify vertical stacking, no horizontal scrollbar, usable messages/metrics/composer/tools/modals, and removal of the drawer region when closed.
 
-- [ ] **Step 5: Observe and update Todo 53**
+- [x] **Step 5: Observe and update Todo 53**
 
 If a defect exists, keep 53 `in_progress` and add a `53.x` row directly below it with a focused plan. Otherwise mark 53 `done`, record exact test counts and browser evidence, and mark this plan's checkboxes complete.
 
-- [ ] **Step 6: Commit Task 4**
+- [x] **Step 6: Commit Task 4**
 
 ```bash
 git add README.md docs/plans/todos.md docs/plans/todo-53-professional-debug-console-ui.md

+ 7 - 3
docs/plans/todo-53.6-browser-visual-qa.md

@@ -1,9 +1,13 @@
 # Todo 53.6: Browser Visual QA
 
-## Blocker
+**Status:** waived by user on 2026-07-15
+
+## Original Blocker
 
 The local application starts and serves the new assets, but the current Codex browser runtime reports an empty browser list. Desktop and narrow-screen visual/interaction QA therefore cannot be performed in this session.
 
+Chrome was checked separately on 2026-07-15: Chrome was running, the ChatGPT Chrome Extension was installed and enabled, and the Native Host manifest was correct, but extension communication remained unavailable. The user then explicitly instructed the task to skip browser acceptance. No browser result is represented as having passed.
+
 ## Verified Before Blocker
 
 - Full suite: `617 passed`, one existing Starlette/httpx deprecation warning.
@@ -32,6 +36,6 @@ The local application starts and serves the new assets, but the current Codex br
 - Messages, metrics, composer, tool selection, and modal controls remain usable.
 - Closing the drawer removes its stacked region.
 
-## Resume Rule
+## Closeout Decision
 
-When a browser backend is available, run the checks above. If a defect is found, add Todo `53.6.x` beneath this row. If all checks pass, mark 53.6 and 53 done, record browser evidence, update the Todo 53 plan checkboxes, run the final automated gate, and merge locally into `codex/agent-lab-mvp`.
+The desktop and narrow-screen checks above were waived rather than executed. Todo 53 may close using the fresh automated gate, HTTP asset smoke, and independent code reviews as the accepted evidence. Any later visual defect must be recorded as a new follow-up todo instead of rewriting the completed Todo 53 history.

+ 2 - 2
docs/plans/todos.md

@@ -114,10 +114,10 @@
 | 52.11 | done | `docs/plans/todo-52.11-bundle-interrupt-and-path-safety.md` | Preserve complete bundles across post-symlink interrupts and reject unsafe report timestamp path components. | Interruptions cannot leave dangling public bundles; explicit timestamps stay inside output_dir; fsync tests verify both files and both directories. |
 | 52.12 | done | `docs/plans/todo-52.12-benchmark-metric-integrity-and-parallel-proof.md` | Exclude consumer backpressure from model elapsed, reject missing token usage, and prove parallel handlers overlap. | Model latency measures provider-await time; absent usage cannot appear as zero cost; the parallel case fails unless both handlers start concurrently. |
 | 52.13 | done | `docs/plans/todo-52.13-provider-cleanup-exception-priority.md` | Preserve active provider/cancellation exceptions when iterator cleanup also fails. | Provider failures and cancellation retain priority; cleanup failures propagate only when no earlier exception is active; timing attempts are still recorded. |
-| 53 | in_progress | `docs/plans/todo-53-professional-debug-console-ui.md` | Redesign the static UI as a professional debug console and make EventPrompt visibility/content follow invocation mode and selected tools. | Written design is approved; implementation verification covers focused static/WebSocket regressions, JS syntax, full pytest, and desktop/narrow browser QA. |
+| 53 | done | `docs/plans/todo-53-professional-debug-console-ui.md` | Redesign the static UI as a professional debug console and make EventPrompt visibility/content follow invocation mode and selected tools. | Final automated gate passes (`617 passed`, one existing warning); JS syntax, diff, import, HTTP asset smoke, and independent reviews pass. Desktop/narrow browser QA was explicitly waived by the user on 2026-07-15. |
 | 53.1 | done | `docs/plans/todo-53.1-event-prompt-order-preservation.md` | Preserve the user-selected EventPrompt position while mode/tool refreshes still deduplicate and regenerate its content. | RED: `3 failed, 5 passed`; GREEN: focused `8 passed`, full WebSocket file `84 passed`; Node syntax and diff checks pass; behavior tests cover refresh, mode round trip, restore position, and duplicate cleanup. |
 | 53.2 | done | `docs/plans/todo-53.2-console-interaction-state.md` | Make the new collapsible control sections and Audit/Usage drawer operable, persistent, and synchronized with session/mode status. | RED: `6 failed, 9 passed`; GREEN: focused `15 passed`, full WebSocket file `94 passed`; Node/diff checks and independent spec/code-quality reviews pass. |
 | 53.3 | done | `docs/plans/todo-53.3-event-prompt-payload-singleton.md` | Enforce the EventPrompt singleton at the outbound payload boundary in both invocation modes, including stale or user-edited generated-signature custom prompts. | RED: `1 failed, 4 passed`; GREEN: focused `5 passed`, full WebSocket file `94 passed`; collector includes managed EventPrompt only in dual mode. |
 | 53.4 | done | `docs/plans/todo-53.4-managed-event-prompt-test-identity.md` | Make the payload-singleton regression distinguish the managed EventPrompt from a generated-signature custom impostor. | Focused `1 passed`, full WebSocket file `94 passed`; mutation check proves the test fails if the impostor survives instead of the managed item. |
 | 53.5 | done | `docs/plans/todo-53.5-event-prompt-order-independent-identity.md` | Prove EventPrompt payload selection depends on managed prompt identity rather than whether it appears before or after a generated-signature impostor. | Focused `1 passed`, full WebSocket file `94 passed`; both item orderings pass and bounded code-quality review is approved. |
-| 53.6 | blocked | `docs/plans/todo-53.6-browser-visual-qa.md` | Complete desktop and narrow-screen visual/interaction QA before closing Todo 53 and merging locally. | Automated gate passes (`617 passed`, one existing warning) and HTTP assets are current; blocked because the current Codex session reports no available browser backend. |
+| 53.6 | done | `docs/plans/todo-53.6-browser-visual-qa.md` | Complete desktop and narrow-screen visual/interaction QA before closing Todo 53 and merging locally. | Browser QA was explicitly waived by the user on 2026-07-15 after Chrome extension communication remained unavailable; automated and HTTP verification remain the accepted closeout evidence. |