Skip to content

fix(council): restore Perplexity research mode — click the typeahead item, Space no longer commits - #118

Open
intellegix wants to merge 2 commits into
masterfrom
bugfix/pplx-typeahead-commit-2026-10-30
Open

intellegix wants to merge 2 commits into
masterfrom
bugfix/pplx-typeahead-commit-2026-10-30

Conversation

@intellegix

Copy link
Copy Markdown
Owner

What broke

Every Perplexity research run for ~45 hours (2026-10-28 12:40Z → 2026-10-30 10:13Z) failed with Failed to activate research mode. The failure artifact from the 2026-10-30 03:13 PT run shows the page signed in (Austin Kidwell · Max), /research typed, and the slash palette still open with "Deep Research" highlighted. The palette is now a Lexical typeahead (#typeahead-menu, role="menuitem") and Space no longer commits it, so the mode never engaged.

Fix

  • activate_mode now calls _commit_mode_choice, which clicks the menu item whose text matches the mode (case-insensitive) and falls back to PERPLEXITY_COMMIT_KEY only when no item rendered.
  • Log lines report how the choice was committed (key=click_menuitem vs key=Space).
  • Cherry-picks 936cc5e (orig. 8d50db0, July aria-pressed verifier fix), which never reached master. Today's live run was confirmed by that tier (indicator=tier0_aria_pressed), so master needs both.

Verification

  • Live: real research query 2026-10-30 04:02 PT returned a full answer. Run log: step=commit_pressed key=click_menuitem → verify=OK indicator=tier0_aria_pressed → SUCCESS.
  • tests/test_activate_mode_commit.py (3 tests): the main test fails on the pre-fix code (assert False is True) and passes after. Full council-automation/tests: 84 passed on this branch.

Deploy path

The runner executes from the live ~/.claude working tree, not from master. The same patch was applied there by hand on 2026-10-30, and the live query above ran against it. Merging this PR does not deploy anything; it brings master in line with what is running.

PPLX-VERIFY-OVERRIDE: verification_unavailable — the subsystem under repair is the verifier. Deploy-path check done by hand as described above.

🤖 Generated with Claude Code

https://claude.ai/code/session_017QV5DKhmDhU3zMxVFEvaRw

intellegix and others added 2 commits October 30, 2026 04:04
… drift

Perplexity replaced the toolbar mode indicator (text pill "Deep research" /
"Research" / "Labs") with an icon-only button exposing aria-label + aria-pressed
and EMPTY textContent. The text-scan verifiers (_verify_research/_labs/_council
_activation) could no longer see the active mode -> false SELECTOR_DRIFT_DETECTED
-> activate_mode() returned False -> every research call aborted with
"Failed to activate research mode" (step=activate). 11/17 queries failed 2026-07-22.

Add an additive Tier-0 aria-label + aria-pressed check ahead of the existing text
tiers (returns True only on a positive match; falls through otherwise, so it cannot
regress). Research tier verified via live DOM probe + end-to-end research_query
returning a full synthesis; labs/council mirror the same redesign.

Note: this file also carries accumulated uncommitted live-patches whose diff context
was entangled with the fix, so they are snapshotted in this commit. Only
council_browser.py is staged; the repo's other dirty files are untouched.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018FgMrRBDHeDFgePWjG31zT
…nores Space

Perplexity's slash-command palette is now a Lexical typeahead
(#typeahead-menu, role="menuitem") that does not commit on Space. Every
research run for ~45h typed "/research", pressed Space, left the menu open
and failed as "Failed to activate research mode" while signed in (Max).

activate_mode now clicks the menu item matching the mode when one
rendered and falls back to PERPLEXITY_COMMIT_KEY otherwise. Log lines
report which path committed. Regression test fails on the old code.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017QV5DKhmDhU3zMxVFEvaRw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant