2.2 KiB
2.2 KiB
id, title, status, wave, depends_on, plan, spec
| id | title | status | wave | depends_on | plan | spec |
|---|---|---|---|---|---|---|
| 01-inspector-state | Preserve inspector pending state | done | 1 | plan.md | ../../specs/browser-inspect-annotations-save/spec.md |
Task 01: Preserve inspector pending state
Acceptance
- A pin or area selection remains available to
commitAnnotationafter the popup is opened, so Save/Enter can emitannotation-addedand close the popup. - Cancel and Escape still clear the pending selection without emitting an annotation.
- The existing API package tests and JavaScript syntax check pass.
Verification
- Add and run the focused regression test:
cd apps/backend && go test -run TestInspectorScript_PreservesPendingAnnotationAcrossPopupCleanup ./internal/agentctl/server/api - Run the full affected package:
cd apps/backend && go test ./internal/agentctl/server/api - Validate the embedded script parses:
cd apps/backend && node --check internal/agentctl/server/api/scripts/inspector.js - Run
git diff --check.
Files likely touched
apps/backend/internal/agentctl/server/api/scripts/inspector.jsapps/backend/internal/agentctl/server/api/html_injector_test.go
Dependencies
None.
Parallelism
Sequential. The test and the embedded script share the same behavior contract.
Inputs
docs/specs/browser-inspect-annotations-save/spec.md, especially the Save, Enter, and dismissal scenarios.docs/plans/browser-inspect-annotations-save/plan.md.- Existing
closePopup,openCommentPopup,startPending, andcommitAnnotationimplementations ininspector.js.
Output contract
Report the changed files, the red/green test results, exact commands, any remaining E2E dependency, and synchronized task/plan statuses.
Results
- RED:
cd apps/backend && go test -run TestInspectorScript_PreservesPendingAnnotationAcrossPopupCleanup ./internal/agentctl/server/apifailed at the new assertion before the production fix. - GREEN: the same focused test passed after preserving
pendingAnnotationacrossclosePopup(). cd apps/backend && go test ./internal/agentctl/server/api— passed.cd apps/backend && node --check internal/agentctl/server/api/scripts/inspector.js— passed.git diff --check— passed.