|
@@ -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/app.js:85-93,259-320,413-450,477-677,867-897`
|
|
|
- Modify: `src/agent_lab/presentation/static/index.html:212-233`
|
|
- 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:
|
|
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.
|
|
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
|
|
```bash
|
|
|
uv run pytest tests/test_websocket_api.py -k "event_prompt or prompt_restore or tool_mode" -q
|
|
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.
|
|
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:
|
|
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.
|
|
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:
|
|
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.
|
|
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
|
|
```bash
|
|
|
uv run pytest tests/test_websocket_api.py -k "event_prompt or prompt_restore or tool_mode or tools_ui" -q
|
|
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.
|
|
Expected: focused tests pass; Node and diff checks are clean.
|
|
|
|
|
|
|
|
-- [ ] **Step 6: Commit Task 1**
|
|
|
|
|
|
|
+- [x] **Step 6: Commit Task 1**
|
|
|
|
|
|
|
|
```bash
|
|
```bash
|
|
|
git add tests/test_websocket_api.py src/agent_lab/presentation/static/app.js src/agent_lab/presentation/static/index.html
|
|
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/index.html:7-247`
|
|
|
- Modify: `src/agent_lab/presentation/static/styles.css:1-end`
|
|
- 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:
|
|
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.
|
|
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
|
|
```bash
|
|
|
uv run pytest tests/test_websocket_api.py -k "professional_console or layout_keeps_controls" -q
|
|
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.
|
|
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:
|
|
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`.
|
|
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:
|
|
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.
|
|
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
|
|
```bash
|
|
|
uv run pytest tests/test_websocket_api.py -k "static_ui or professional_console or layout or audit_replay or agent_config" -q
|
|
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.
|
|
Expected: focused static tests and checks pass.
|
|
|
|
|
|
|
|
-- [ ] **Step 6: Commit Task 2**
|
|
|
|
|
|
|
+- [x] **Step 6: Commit Task 2**
|
|
|
|
|
|
|
|
```bash
|
|
```bash
|
|
|
git add tests/test_websocket_api.py src/agent_lab/presentation/static/index.html src/agent_lab/presentation/static/styles.css
|
|
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: `tests/test_websocket_api.py:1396-1620`
|
|
|
- Modify: `src/agent_lab/presentation/static/app.js:1-120 and session lifecycle functions`
|
|
- 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
|
|
```python
|
|
|
assert 'const CONSOLE_UI_STORAGE_KEY = "agent-lab-console-ui-v1"' in js
|
|
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
|
|
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
|
|
```bash
|
|
|
uv run pytest tests/test_websocket_api.py -k "presentation_state or topbar_status" -q
|
|
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.
|
|
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
|
|
```javascript
|
|
|
const CONSOLE_UI_STORAGE_KEY = "agent-lab-console-ui-v1";
|
|
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.
|
|
`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
|
|
```javascript
|
|
|
function updateTopbarStatus() {
|
|
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.
|
|
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
|
|
```bash
|
|
|
uv run pytest tests/test_websocket_api.py -q
|
|
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.
|
|
Expected: all WebSocket/static tests pass with only the existing deprecation warning.
|
|
|
|
|
|
|
|
-- [ ] **Step 6: Commit Task 3**
|
|
|
|
|
|
|
+- [x] **Step 6: Commit Task 3**
|
|
|
|
|
|
|
|
```bash
|
|
```bash
|
|
|
git add tests/test_websocket_api.py src/agent_lab/presentation/static/app.js
|
|
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/todos.md:117`
|
|
|
- Modify: `docs/plans/todo-53-professional-debug-console-ui.md`
|
|
- 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:
|
|
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.
|
|
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
|
|
```bash
|
|
|
uv run pytest
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
```bash
|
|
|
git add README.md docs/plans/todos.md docs/plans/todo-53-professional-debug-console-ui.md
|
|
git add README.md docs/plans/todos.md docs/plans/todo-53-professional-debug-console-ui.md
|