fix(frontend): remove /harness and stop offering subscriptions the runner says are not there - #6024
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe change removes the ChangesHarness picker removal
Subscription state handling
Estimated code review effort: 3 (Moderate) | ~25 minutes Mergeability Score: 🔵 Low · up to The PR removes phantom subscription options and the redundant /harness command. The remaining risk is a stale subscription-picker contract comment that could mislead future callers; this is localized and non-blocking, so the PR is mergeable with explicit owner follow-up. Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: e3aa89d8-fd58-4355-b5ee-7b59a4e5c195
📒 Files selected for processing (15)
web/oss/src/components/AgentChatSlice/components/AgentComposerDock.tsxweb/oss/src/components/AgentChatSlice/components/SlashCommand/HarnessPickerPanel.tsxweb/oss/src/components/AgentChatSlice/components/SlashCommand/PermissionsPickerPanel.tsxweb/oss/src/components/AgentChatSlice/components/SlashCommand/README.mdweb/oss/src/components/AgentChatSlice/hooks/useChatSlashCommands.tsxweb/packages/agenta-entities/src/secret/core/subscriptionPairs.tsweb/packages/agenta-entities/tests/unit/subscription-pairs.test.tsweb/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentConfigPatch.tsweb/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useModelHarness.tsxweb/packages/agenta-entity-ui/src/DrillInView/SchemaControls/connectionPicker.tsweb/packages/agenta-entity-ui/src/DrillInView/SchemaControls/harnessMeta.tsweb/packages/agenta-entity-ui/src/secretProvider/PlaygroundProviderSections.tsxweb/packages/agenta-entity-ui/tests/unit/connectionPicker.test.tsweb/packages/agenta-entity-ui/tests/unit/subscriptionPickerRows.test.tsweb/packages/agenta-ui/src/RichChatInput/assets/slashCommands.ts
💤 Files with no reviewable changes (2)
- web/oss/src/components/AgentChatSlice/components/AgentComposerDock.tsx
- web/oss/src/components/AgentChatSlice/components/SlashCommand/HarnessPickerPanel.tsx
| * The runner's live pairs decide the subscription rows once it has answered — including an answer | ||
| * of "none ready", which lists NO subscription rows (a plan the deployment is not signed in to | ||
| * must not be offered). Only while no answer exists at all (`subscriptionPairs` null: the check is | ||
| * in flight, or the runner is old or unreachable) does the static mapping stand in, so the menu | ||
| * holds its shape rather than losing rows mid-check. | ||
| */ | ||
| export const buildConnectionPickerRows = (args: BuildPickerRowsArgs): PickerConnectionRow[] => { | ||
| const {capabilities, showSubscriptions = true, subscriptionPairs, pairModelSelection} = args | ||
| const live = | ||
| showSubscriptions && subscriptionPairs?.length | ||
| ? subscriptionRowsFromPairs({ | ||
| capabilities, | ||
| pairs: subscriptionPairs, | ||
| pairModelSelection, | ||
| }) | ||
| : null | ||
|
|
||
| return [...connectionRows(args), ...(live ?? subscriptionRows(args))] | ||
| const subscriptions = !showSubscriptions | ||
| ? [] | ||
| : subscriptionPairs | ||
| ? subscriptionRowsFromPairs({ | ||
| capabilities, | ||
| pairs: subscriptionPairs, | ||
| pairModelSelection, | ||
| }) | ||
| : subscriptionRows(args) | ||
|
|
||
| return [...connectionRows(args), ...subscriptions] |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Update the subscriptionPairs contract comment.
BuildPickerRowsArgs.subscriptionPairs still states that an empty list uses static rows. This function now treats [] as authoritative and produces no subscription rows. Update that JSDoc so callers preserve the null versus empty-list contract.
Railway Preview Environment
Updated at 2026-08-13T19:41:30.905Z |
Hotfix for the two release-cancelling bugs Mahmoud found on staging.
Bug 1: the model picker offered subscriptions that do not exist
The picker asks the runner which subscription logins are usable, and staging's runner correctly answers that none are (every harness reports
not_configured). ButbuildConnectionPickerRowstreated that authoritative empty answer the same as no answer at all, and fell through to the static catalog mapping — so the dropdown offered Claude and ChatGPT subscription rows the deployment can never run, while the providers drawer (correctly) showed none.The fix makes the null/empty distinction explicit end to end:
subscriptionPairsFromnow returnsnullfor an unanswered check and[]for an answered "none ready", and the picker only uses the static placeholder rows in thenullcase. An answered empty status lists no subscription rows anywhere (both playgrounds and the drawer read the same helper). Regression tests pin both sides, including the exact staging shape.Bug 2:
/harnessremoved from the chat paletteThe model picker's rows each carry their own harness now, so a standalone
/harnesscommand was redundant. Removed: the palette entry, theHarnessPickerPanel, theapplyHarnesswrite path, and the stale comments that referenced them./modeland/permissionsare untouched.Verification
@agenta/entity-ui426/426,@agenta/entities1287/1287,@agenta/ui30/30tsc --noEmitclean for both packages andweb/ossnot_configured) drives the new regression test