Files
search-with-chatgpt-powered…/docs/advanced-context-menu-verification.md

66 lines
3.5 KiB
Markdown

# Advanced context menu verification
Implemented against the approved 2026-10-05 spec and plan. Implementation was verified in the feature checkout. PR preparation commits
the extension changes separately from unrelated local notes. No release or
permission change is included.
## Automated checks
- `npm test`: strict lint with zero errors, notices, or warnings; 10 discovered
test files passed; unsigned ZIP built successfully.
- Direct execution of each test file: **60 individual tests passed**.
- ZIP inspection: dialog assets present; no docs, tests, or execution scratch.
- `git diff --check`: clean.
- Regression checks cover legacy preference migration, partial-save preservation,
context priority, dedicated prompts, literal substitutions, URL rejection,
Unicode budgets, truncation consent, dialogs, menu updates, and frame focus.
## Actual Firefox 157 checks
Temporary Firefox launched through `npm run dev`; interactions automated using
Marionette in a temporary profile. No user's browsing profile was modified.
- Native selection, link, linked-selection, and page-background menus displayed
the intended action groups.
- Extension dialog handoff acknowledged; language input received initial focus;
Spanish translation opened the correctly constructed ChatGPT URL.
- Concurrent dialogs held separate selections. Cancel and actual Escape key
dispatch opened no ChatGPT tab. Empty language submission was blocked.
- Long selection displayed consent; Continue opened an 8,000-character URL.
- Settings reflected storage updates. Narrow light/dark settings screenshots
were inspected and showed no horizontal overflow.
- Extension reload preserved configured preferences.
Not verified: physical shortcut presses in the user's desktop session (headless
WebDriver key attempts did not trigger the command), full browser restart,
forced background suspension/wakeup, all editable-field cases, dialog-window
creation failure on the native desktop, and the complete AGENTS.md manual matrix.
The shortcut's frame-selection logic is covered by an executable regression test,
including stale parent selection and restricted-page failure.
## Independent review
A fresh reviewer found no blocking defect. Its partial-save contract finding
was reclassified as important and fixed with a failing-then-passing regression.
One minor remains: if a direct launch fails but a retry dialog opens, the dialog
says it is ready rather than explaining the original failure. Continue retries.
## Execution decisions
- Worked in the existing feature checkout with a backup at
`/tmp/chatgpt-advanced-baseline`; this preserves prior uncommitted work but
means new work shares that checkout.
- Deferred implementation commits to avoid sweeping unrelated changes into them;
review uses the saved baseline instead of task commit ranges.
- Target languages must be single-line text of at most 100 Unicode code points;
unusual control-character labels are rejected.
- Menu-open visibility uses permission-free Firefox context labels. Source data
is read only at invocation. Whitespace-only selections may show a group but
cannot trigger a nonempty-source action.
- Partial settings updates retain their original contract so unrelated settings
cannot be reset; the extra regression test protects that contract.
- Prior shortcut-editor behavior and other unrelated dirty changes were kept;
their preexisting limitations are outside this change.
- ChatGPT honoring hints or retrieving a URL remains external behavior, described
as best effort rather than guaranteed.