Skip to content

fix(frontend): remove /harness and stop offering subscriptions the runner says are not there - #6024

Merged
mmabrouk merged 1 commit into
release/v0.112.1from
fix/rel112-harness-command-and-phantom-subscriptions
Aug 13, 2026
Merged

fix(frontend): remove /harness and stop offering subscriptions the runner says are not there#6024
mmabrouk merged 1 commit into
release/v0.112.1from
fix/rel112-harness-command-and-phantom-subscriptions

Conversation

@mmabrouk

Copy link
Copy Markdown
Member

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). But buildConnectionPickerRows treated 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: subscriptionPairsFrom now returns null for an unanswered check and [] for an answered "none ready", and the picker only uses the static placeholder rows in the null case. 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: /harness removed from the chat palette

The model picker's rows each carry their own harness now, so a standalone /harness command was redundant. Removed: the palette entry, the HarnessPickerPanel, the applyHarness write path, and the stale comments that referenced them. /model and /permissions are untouched.

Verification

  • @agenta/entity-ui 426/426, @agenta/entities 1287/1287, @agenta/ui 30/30
  • tsc --noEmit clean for both packages and web/oss
  • Staging's real subscription-status answer (all not_configured) drives the new regression test
  • Deploying this branch to demo.preview with migrations for live verification

@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Aug 13, 2026
@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Blocked Blocked Aug 13, 2026 6:43pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Changes

    • Removed the /harness command and picker from chat.
    • Model and permissions pickers remain available.
    • Improved subscription handling to distinguish unavailable results from confirmed empty results.
    • Empty subscription results now correctly hide subscription options, while unavailable data preserves placeholders.
  • Documentation

    • Updated command and configuration guidance to reflect the available /model and /permissions commands.
  • Bug Fixes

    • Prevented subscription rows from appearing when the service confirms no subscriptions are available.

Walkthrough

The change removes the /harness picker and related hook API. It retains model and permissions pickers. Subscription handling now distinguishes absent runner data from answered results with no ready subscriptions.

Changes

Harness picker removal

Layer / File(s) Summary
Slash-command contract and behavior
web/oss/src/components/AgentChatSlice/hooks/useChatSlashCommands.tsx
The slash picker type, /harness command, harness model fallback, applyHarness callback, and returned API were removed.
Picker surface and documentation cleanup
web/oss/src/components/AgentChatSlice/components/AgentComposerDock.tsx, web/oss/src/components/AgentChatSlice/components/SlashCommand/HarnessPickerPanel.tsx, web/oss/src/components/AgentChatSlice/components/SlashCommand/PermissionsPickerPanel.tsx, web/oss/src/components/AgentChatSlice/components/SlashCommand/README.md, web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/*, web/packages/agenta-ui/src/RichChatInput/assets/slashCommands.ts
The harness picker panel was removed. Related comments and documentation now describe the model and permissions picker behavior without /harness.

Subscription state handling

Layer / File(s) Summary
Nullable subscription result contract
web/packages/agenta-entities/src/secret/core/subscriptionPairs.ts, web/packages/agenta-entities/tests/unit/subscription-pairs.test.ts
Missing harness data returns null. Answered data with no ready subscriptions returns an empty array. Tests cover both states.
Subscription row propagation
web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/connectionPicker.ts, web/packages/agenta-entity-ui/src/secretProvider/PlaygroundProviderSections.tsx, web/packages/agenta-entity-ui/tests/unit/connectionPicker.test.ts, web/packages/agenta-entity-ui/tests/unit/subscriptionPickerRows.test.ts
Provided empty subscription pairs suppress subscription rows. Missing pairs retain static fallback rows. Playground rendering safely handles absent pairs.

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

Mergeability Score: 🔵 Low · up to f2ff4

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

  • Agenta-AI/agenta#5817: Introduced the slash-command harness picker and related /harness functionality removed by this change.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes both main fixes: removing /harness and preventing unavailable subscription rows.
Description check ✅ Passed The description directly explains both staging bugs, their fixes, regression tests, and verification results.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 60.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/rel112-harness-command-and-phantom-subscriptions

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 212c3a8 and f2ff465.

📒 Files selected for processing (15)
  • web/oss/src/components/AgentChatSlice/components/AgentComposerDock.tsx
  • web/oss/src/components/AgentChatSlice/components/SlashCommand/HarnessPickerPanel.tsx
  • web/oss/src/components/AgentChatSlice/components/SlashCommand/PermissionsPickerPanel.tsx
  • web/oss/src/components/AgentChatSlice/components/SlashCommand/README.md
  • web/oss/src/components/AgentChatSlice/hooks/useChatSlashCommands.tsx
  • web/packages/agenta-entities/src/secret/core/subscriptionPairs.ts
  • web/packages/agenta-entities/tests/unit/subscription-pairs.test.ts
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentConfigPatch.ts
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useModelHarness.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/connectionPicker.ts
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/harnessMeta.ts
  • web/packages/agenta-entity-ui/src/secretProvider/PlaygroundProviderSections.tsx
  • web/packages/agenta-entity-ui/tests/unit/connectionPicker.test.ts
  • web/packages/agenta-entity-ui/tests/unit/subscriptionPickerRows.test.ts
  • web/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

Comment on lines +470 to +488
* 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]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 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.

@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Status Destroyed (PR closed)

Updated at 2026-08-13T19:41:30.905Z

@mmabrouk
mmabrouk merged commit 53a9d82 into release/v0.112.1 Aug 13, 2026
66 of 68 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug frontend size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant