Skip to content

fix web routing for explicitly selected skills - #7108

Open
truman-t3 wants to merge 3 commits into
nexu-io:mainfrom
truman-t3:fix/web-explicit-skill-routing
Open

fix web routing for explicitly selected skills#7108
truman-t3 wants to merge 3 commits into
nexu-io:mainfrom
truman-t3:fix/web-explicit-skill-routing

Conversation

@truman-t3

Copy link
Copy Markdown

Related to #6024.

Why

Selecting a Skill from the Home composer in Design mode should route the new project through that Skill alone. Instead, Home also attached the hidden od-default plugin whenever no visible scenario plugin was selected.

That produced conflicting creation metadata: the request carried the explicitly selected skillId, but it also carried pluginId: od-default. The default design router could then take precedence over the workflow the user deliberately selected.

This surfaced while validating an imported industrial-product-design Skill end to end from Home.

What users will see

When a user explicitly selects a Skill on Home and starts a Design-mode project, Open Design now preserves that Skill as the only routing source. Free-form Design-mode prompts with no Skill still use the hidden default design router, and explicitly selected scenario plugins are unchanged.

Surface area

  • UI — new page / dialog / panel / menu item / setting / empty state in apps/web or apps/desktop (including Electron menu bar)
  • Keyboard shortcut — new or changed
  • CLI / env var — new od subcommand or flag, new tools-dev / tools-pack flag, or new OD_* env var
  • API / contract — new /api/* endpoint, new SSE event, or changed shape in packages/contracts
  • Extension point — new entry under skills/, design-systems/, design-templates/, or craft/, or change to the skills protocol
  • i18n keys — added new translation keys
  • New top-level dependency — added to the root package.json
  • Default behavior change — fixes routing when an existing user explicitly selects a Skill
  • None — internal refactor, docs, tests, or translation update only

Screenshots

No visual layout changes. End-to-end verification used the existing Home @ mention picker and confirmed that selecting Industrial Product Design cleared the preselected Slide deck route before submission.

Bug fix verification

  • Test path: apps/web/tests/components/HomeView.prefill.test.tsx
  • Red on the pre-fix implementation: yes. The new test received pluginId: od-default instead of null.
  • Green after the source change: yes. The focused regression test passes with the rebased HomeView and test files.
  • End-to-end verification: yes. A source-mode Home submission created a project with skillId: industrial-product-design; the completed run recorded plugin_id: null, copied the Skill and both reference files into .od-skills, and returned the Skill-defined industrial-design clarification form.

Validation

  • Focused regression: 1 passed, 30 skipped, using the rebased HomeView and test files in an isolated local validation copy.
  • Full HomeView test file before the latest rebase: 29/29 passed on the complete local source snapshot.
  • Web typecheck before the latest rebase: passed on the complete local source snapshot.
  • Source-mode end-to-end run with Codex CLI: passed; run status succeeded, skill_id: industrial-product-design, plugin_id: null.
  • Rebased cleanly onto upstream main at 4eacda5751ecdb36d41bb0b8c051b379da545ca1.
  • git diff --check origin/main...HEAD: passed.
  • Pending before marking ready for review: rerun pnpm guard, pnpm typecheck, and the complete package-scoped web test file on the latest baseline. The local partial clone could not hydrate the remaining web sources because repeated GitHub promisor transfers stalled or reset.

@lefarcen

Copy link
Copy Markdown
Contributor

Thanks @truman-t3 — this is a nicely scoped routing fix, and the regression coverage plus end-to-end verification in the body are helpful. Since the PR is still marked draft, I'll hold off on a full review for now and let the requested reviewer take it from here once it's ready for review.

@truman-t3
truman-t3 marked this pull request as ready for review August 19, 2026 05:13
@lefarcen lefarcen added the needs-validation Runtime change detected; needs human or /explore agent validation. label Aug 19, 2026
@lefarcen

Copy link
Copy Markdown
Contributor

🧪 This PR has changes that need a manual QA pass before merge — please hold off self-merging for now; we'll loop QA in once it's merge-ready (and design/product have signed off, where applicable).

@mrcfps mrcfps left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@truman-t3 thanks for the clean, well-scoped routing fix — this is a nice catch from the industrial-product-design end-to-end path.

What I verified

  • In HomeView submit, routedPluginId now prefers an explicit scenario plugin, then only falls back to DEFAULT_UNSELECTED_SCENARIO_PLUGIN_ID in Design mode when no skill is resolved. Explicit skill picks therefore send skillId with pluginId: null, which matches the mutual-exclusivity comment above the change.
  • Free-form Design submits still keep the hidden default router (routes free-form submits through the hidden default plugin… remains intact).
  • The new regression in HomeView.prefill.test.tsx exercises the skill-use handoff path (createSkillUseHandoffuseSkill clears active plugin, seeds the example prompt) and asserts pluginId: null + the expected skillId.
  • useSkill already clears active, so the submit path cannot double-route plugin + skill from a normal skill pick.

No correctness, safety, or test gaps stood out in the changed ranges. Appreciate the red-spec style coverage and the clear PR write-up.

🔁 Powered by Looper · runner=reviewer · agent=opencode · An autonomous AI dev team for your GitHub repos.

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Visual regression review

Head: 03aba09 · Base: 16fad1c

0 changed · 49 unchanged · 0 new without baseline · 0 failed

Unchanged cases
Case Main PR Diff
visual-avatar-local-agent-list
0 px (0.00%)
main pr diff
visual-avatar-local-agent-list-panel
0 px (0.00%)
main pr diff
visual-avatar-menu
0 px (0.00%)
main pr diff
visual-avatar-menu-panel
0 px (0.00%)
main pr diff
visual-avatar-open-design-model-picker
0 px (0.00%)
main pr diff
visual-critical-settings
0 px (0.00%)
main pr diff
visual-critical-workspace
0 px (0.00%)
main pr diff
visual-critical-workspace-preview
0 px (0.00%)
main pr diff
visual-design-system-detail
0 px (0.00%)
main pr diff
visual-design-systems
0 px (0.00%)
main pr diff
visual-home
0 px (0.00%)
main pr diff
visual-home-catalog
0 px (0.00%)
main pr diff
visual-home-context-picker
0 px (0.00%)
main pr diff
visual-home-context-picker-popover
0 px (0.00%)
main pr diff
visual-home-plugin-filter
0 px (0.00%)
main pr diff
visual-home-plugin-use-staged
0 px (0.00%)
main pr diff
visual-home-plugin-use-with-query
0 px (0.00%)
main pr diff
visual-home-staged-attachment
0 px (0.00%)
main pr diff
visual-integrations
0 px (0.00%)
main pr diff
visual-integrations-mcp
0 px (0.00%)
main pr diff

Visual diff is advisory only and does not block merging.

@mrcfps mrcfps left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@truman-t3 thanks for the clean follow-up on explicit skill routing — the extra context-picker expectation updates make the mutual-exclusivity contract much clearer.

What I verified on 03aba09a

  • In HomeView submit, routedPluginId prefers an explicit scenario plugin, then only falls back to DEFAULT_UNSELECTED_SCENARIO_PLUGIN_ID in Design mode when no skill is resolved. Explicit skill picks therefore send skillId with pluginId: null, matching the mutual-exclusivity comment above the change.
  • Free-form Design submits still keep the hidden default router (routes free-form submits through the hidden default plugin… remains intact).
  • The new regression in HomeView.prefill.test.tsx covers the skill-use handoff path (createSkillUseHandoffuseSkill clears active plugin, seeds the example prompt) and asserts pluginId: null + the expected skillId.
  • HomeView.context-picker.test.tsx now expects pluginId: null for skill picks (including after clearing a type chip), which aligns with the production fix rather than the old default-plugin leakage.
  • useSkill already clears active, so the submit path cannot double-route plugin + skill from a normal skill pick.

No correctness, safety, or test gaps stood out in the changed ranges. Appreciate the red-spec style coverage and the tidy test alignment commit.

🔁 Powered by Looper · runner=reviewer · agent=opencode · An autonomous AI dev team for your GitHub repos.

@lefarcen
lefarcen requested a review from ivy-ting August 19, 2026 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-validation Runtime change detected; needs human or /explore agent validation. risk/medium Medium risk: regular code changes size/S PR changes 20-100 lines type/bugfix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants