Skip to content

Opportunities panel: re-skin to the "Explore the Opportunities" design - #101

Merged
marty916 merged 1 commit into
mainfrom
panel/explore-opportunities-design
Oct 24, 2026
Merged

marty916 merged 1 commit into
mainfrom
panel/explore-opportunities-design

Conversation

@marty916

@marty916 marty916 commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

What

Lays the opportunities panel out as the AIPOS prototype v2 "Explore the Opportunities" screen and its opportunity side panel, within the engine contract.

  • List: rank, title + problem ID, active work items, score; title/ID search, work-items filter, sort. The design's product/theme/concept tabs are dropped for this MVP (the engine's rows carry no such attributes).
  • Semantic search: "Describe it in your own words" → find_similar_problems(text, limit=5); shows bands only, never a score. A match in the loaded list opens its detail in place.
  • Side panel over a scrim: composite score, the five engine components as bars (scaled to the highest loaded value — the engine's score scale is not fixed, so no priority band is invented), personas, work items, evidence grouped by source_type with each reference opening in its source system through ui/open-link. Focus-trapped; Escape and the scrim close it.
  • Add Opportunity to a tracker: the panel's first non-read action, one plain user turn through ui/message. The conversation chooses the tracker (Aha!, Jira) from the user's own connectors; the panel never calls another server. The design's Refine/Select actions are not carried.
  • Evidence text is still not shown; the excerpt view over get_evidence_text is a follow-on.

Engine dependency

Needs discovery-engine panel/widen-opportunities-allowed-tools (widens PanelDef.allowed_tools to the five names). tests/test_panel_contract.py here now expects find_similar_problems in the bundle, so this panel is only bindable by an engine with that change.

Checks

  • npm test 37/37; python -m pytest tests/test_panel_contract.py 44/44
  • node build.mjs: 461,606 bytes (ceiling 1,048,576)
  • node check-page.mjs all scenarios in Chromium under the MCP Apps default CSP, light and dark (PANEL_CHROME added for a non-Chrome Chromium)
  • BRAND.md checklist: host surfaces and font, brand accents only, contrast per the table, no external requests, no <form> submission (the host sandbox has no allow-forms — now written into BRAND.md)

Generated by Claude Code

Summary by CodeRabbit

  • New Features
    • Search opportunities by title or semantic similarity, with matching results and relevance bands.
    • Open an opportunity in a detail panel with grouped evidence, persona tags, and component score bars.
    • Send an opportunity to the conversation to add it to a connected tracker.
  • Updates
    • Browse a ranked list with work-item information and links, plus clearer search and coverage indicators.
    • The detail panel supports keyboard focus and adapts to narrow screens.
  • Documentation
    • Updated the panel guide with its search, detail, and tracker workflows.

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your workspace is out of credits. Ask your workspace admin to add credits to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Walkthrough

The Opportunities panel adds semantic search and a ranked-list detail view. Users can inspect score components and grouped evidence, then send a tracker request to the conversation. The bridge, panel model, browser checks, tests, and panel documentation were updated for these changes.

Changes: Opportunities Panel

Layer / File(s) Summary
Semantic search flow
docs/plans/2026-10-23-opportunities-panel.md, panels/BRAND.md, panels/opportunities/README.md, panels/opportunities/app.mjs, panels/opportunities/bridge.mjs, panels/opportunities/model.mjs, panels/opportunities/template.html, panels/opportunities/style.css, panels/opportunities/*test.mjs, panels/opportunities/check-page.mjs, tests/test_panel_contract.py
The bridge calls find_similar_problems with a limit of five. The panel validates and displays matches, handles search errors, and allows a loaded match to open in the detail view. The tool allowlist and search checks were updated.
Ranked list and opportunity detail
panels/opportunities/README.md, panels/opportunities/app.mjs, panels/opportunities/model.mjs, panels/opportunities/template.html, panels/opportunities/style.css, panels/opportunities/model.test.mjs, panels/opportunities/check-page.mjs
The list remains visible behind a modal detail panel. The detail view groups evidence by source, shows personas as chips, and scales component bars against loaded opportunities. Browser and model checks cover the updated display and interactions.
Tracker hand-off
panels/opportunities/README.md, panels/opportunities/app.mjs, panels/opportunities/bridge.mjs, panels/opportunities/model.mjs, panels/opportunities/bridge.test.mjs, panels/opportunities/model.test.mjs, panels/opportunities/mock-host.mjs, panels/opportunities/check-page.mjs
The panel formats a tracker request with opportunity details and active work-item references when present. The bridge sends it as a user message, and the panel displays whether the host accepted it.

Priority: Pending latest changes

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant OpportunitiesPanel
  participant connectBridge
  participant find_similar_problems
  OpportunitiesPanel->>connectBridge: Submit trimmed query
  connectBridge->>find_similar_problems: Send text with limit 5
  find_similar_problems-->>connectBridge: Return similar matches
  connectBridge-->>OpportunitiesPanel: Return search result
Loading
sequenceDiagram
  participant PanelUser
  participant OpportunitiesPanel
  participant sendMessage
  participant HostConversation
  PanelUser->>OpportunitiesPanel: Select Add Opportunity
  OpportunitiesPanel->>sendMessage: Send tracker request as user text
  sendMessage->>HostConversation: Submit ui/message
  HostConversation-->>sendMessage: Return acceptance result
  sendMessage-->>OpportunitiesPanel: Return success status
  OpportunitiesPanel-->>PanelUser: Display hand-off status
Loading

Possibly related PRs

Merge Risk: Low · up to 428b0

The panel remains usable, but screen-reader users may hear repeated results or lose modal focus, and engine-supplied text could influence a tracker request. These bounded issues warrant correction or explicit acceptance before merging.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Lays the panel out as the AIPOS prototype v2 find step and its side panel,
within the engine contract: ranked list with title search, work-items filter
and sort; a scrim + side panel with the composite score, the five engine
components as bars scaled to the loaded maximum, personas, and evidence
references grouped by source type with their record links.

Adds semantic search through find_similar_problems (bands only, never a
score) and an "Add Opportunity to a tracker" action that hands a plain user
message to the conversation through ui/message, so the tracker (Aha!, Jira)
is chosen from the user's own connectors, never by the panel.

Tabs by product/theme/concept, the evidence excerpt view and the design's
Refine/Select actions are deliberately left for later. The contract test's
allowed set gains find_similar_problems; the matching engine change widens
PanelDef.allowed_tools. No <form> submission: the host sandbox has no
allow-forms. check-page.mjs accepts PANEL_CHROME for a non-Chrome Chromium.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016KzwBpzikmMMdfZFixLNgZ
@marty916
marty916 force-pushed the panel/explore-opportunities-design branch from 428b075 to a45df29 Compare October 24, 2026 18:17
@marty916
marty916 merged commit 2b4fdae into main Oct 24, 2026
5 checks passed
@marty916
marty916 deleted the panel/explore-opportunities-design branch October 24, 2026 18:18
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.

2 participants