3.6 KiB
3.6 KiB
created, status, requirements, system_design, legacy_specs
| created | status | requirements | system_design | legacy_specs | ||
|---|---|---|---|---|---|---|
| 2026-08-31 | done |
|
|
Implementation Plan: Isolate Agent Tab Rename Double-clicks
Overview
Keep text-selection double-clicks inside the shared tab rename editor so they cannot reach the surrounding Agent-tab maximize handler. One work order adds a browser regression first, applies the shared event-boundary correction, and runs the focused frontend checks.
Scope
In scope
- Preserve native double-click text selection in an active Agent-tab rename input.
- Prevent that double-click from maximizing or restoring the Dockview group.
- Preserve tab-level double-click maximize behavior outside rename mode.
- Apply the isolation through the shared task tab rename editor.
Out of scope
- Session-name persistence, validation, commit, cancel, or error behavior.
- Dockview maximize state management or layout persistence.
- Phone and tablet session-control composition.
- Quick Chat tab rename behavior, which uses a different editor.
Confirmed root cause
SessionTab mounts TabRenameInput inside a ContextMenuTrigger whose
onDoubleClick calls useTabMaximizeOnDoubleClick. The editor stops bubbling
mousedown and click, but browsers emit a separate bubbling dblclick event.
That event reaches the parent maximize handler, which prevents the default text
selection and toggles the Dockview group.
Technical approach
- Add a focused Chromium Playwright scenario in
apps/web/e2e/tests/session/session-tab-rename.spec.ts. Enter Agent-tab rename mode from the context menu, double-click the input, assert native selection, and assert that the group remains unmaximized. - Update
TabRenameInputinapps/web/components/task/tab-rename-input.tsxto stop propagation of the shared editor'sdblclickevent without callingpreventDefault. - Leave
SessionTabanduseTabMaximizeOnDoubleClickunchanged so ordinary tab-surface double-clicks retain their current maximize-or-restore behavior.
Tests
AC-UI-TASK-AGENT-TAB-RECONCILIATION-002.2: the Playwright regression verifies selected input text and unchanged maximize state after an editor double-click.AC-UI-TASK-AGENT-TAB-RECONCILIATION-002.3: the same scenario verifies the existing tab-surface maximize path remains available outside the editor.
E2E tests
- Chromium:
apps/web/e2e/tests/session/session-tab-rename.spec.tscovers the affected fine-pointer Dockview workflow. - No mobile E2E change is required because phone and tablet task surfaces do not mount desktop Dockview Agent tabs or their maximize gesture.
Work orders
Verification results
Completed on 2026-08-31.
- The Chromium regression failed before the fix because the rename-input double-click removed the group's maximize icon by maximizing the group.
- The rebuilt production E2E bundle passed the focused scenario after the
shared editor stopped the bubbling
dblclickevent. - Web typecheck, focused ESLint, and
git diff --checkpassed. - No mobile test changed because phone and tablet do not mount the affected Dockview Agent-tab surface.
Risks
- Calling
preventDefaultat the editor boundary would fix maximize while also breaking the text-selection behavior being protected. The correction must stop propagation only. - Testing only the two individual click events would miss the separately
dispatched
dblclickthat causes the regression.