Skip to content

[AGE-4014] fix(frontend): Show changed-path affordance for provider/connection edits in config drawer - #5627

Open
bekossy wants to merge 3 commits into
mainfrom
AGE-4014-/-config-drawer-provider-level-change-shows-a-dirty-badge-but-no-changed
Open

[AGE-4014] fix(frontend): Show changed-path affordance for provider/connection edits in config drawer#5627
bekossy wants to merge 3 commits into
mainfrom
AGE-4014-/-config-drawer-provider-level-change-shows-a-dirty-badge-but-no-changed

Conversation

@bekossy

@bekossy bekossy commented Aug 1, 2026

Copy link
Copy Markdown
Member

Summary

Fixes #5544. In the agent config's Model & harness section, changing the provider/connection without committing shows the "Draft" state and the "Connect key" badge on the collapsed header, but expanding it showed no changed-path affordance at all — no dotted underline, no committed-value popover, no Restore.

Root cause: that section has three inline render branches, in precedence order — needs-key pane, changed-diff view, plain drawer row. When a provider/connection key is missing, the needs-key pane always wins, and it renders the bare ProviderCredentialsSection variant, which is headerless by design and is never mounted under a ChangedPathsProvider. So even when a real diff exists, the component reading it silently sees "nothing changed."

Changes

When the needs-key pane is showing AND the edit that triggered it touched llm.connection.*/llm.provider specifically (not some other model-harness field like harness.kind), it now renders through the same ChangedPathsProvider-wrapped path the rest of the panel's diff views use, and swaps to the non-bare ProviderCredentialsSection — the variant that already has the "Connect key" badge, a changed-path indicator dot, and a "Revert this group?" action, just previously never assembled together for this specific pane.

A change to an unrelated model-harness field keeps the original plain pane (with the inline model picker) unchanged — this only widens the branch that was structurally incapable of showing a diff.

Testing

Verified locally

  • tsc --noEmit clean on @agenta/entity-ui and on web/oss (which consumes this component).
  • eslint clean on both touched files.

Added or updated tests

N/A — no existing unit tests cover AgentTemplateControl/useModelHarness/ProviderCredentialsSection.

QA follow-up

  • Open an agent's config, Model & harness section. Switch the connection/provider mode without committing. Expanding the section should now show the "Connect key" badge alongside a changed indicator and a group Restore action, not a plain unmarked form.
  • Regression: change something else in the same section (e.g. harness kind) while a key is also missing — the pane should still show the plain connect-key form with the inline model picker, unchanged from before.

Demo

Screen.Recording.2026-08-01.at.4.06.36.PM.mov

Checklist

  • I have included a video or screen recording for UI changes, or marked Demo as N/A
  • Relevant tests pass locally
  • Relevant linting and formatting pass locally
  • I have signed the CLA, or I will sign it when the bot prompts me

Contributor Resources

@linear-code

linear-code Bot commented Aug 1, 2026

Copy link
Copy Markdown

AGE-4014

@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Aug 1, 2026
@vercel

vercel Bot commented Aug 1, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview Aug 1, 2026 4:53pm

Request Review

@dosubot dosubot Bot added the Frontend label Aug 1, 2026
@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: aca3933a-4368-48fa-af55-f2981e98c880

📥 Commits

Reviewing files that changed from the base of the PR and between 14754a8 and 18aef94.

📒 Files selected for processing (2)
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/AgentTemplateControl.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useModelHarness.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/AgentTemplateControl.tsx

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Added support for displaying provider credentials directly within connection settings.
    • Credentials can now appear in an expandable section or inline pane, depending on the workflow.
    • Changes to provider, connection, or model details are highlighted in the credentials view.
    • Added a grouped revert option to restore previously configured provider, connection, and model settings.

Walkthrough

The model harness now tracks draft changes to llm.provider and llm.connection. Changed credentials render in a change-aware inline view with grouped restore support.

Changes

Provider credentials tracking

Layer / File(s) Summary
Expose provider credentials section
web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/AgentTemplateControl.tsx, web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useModelHarness.tsx
The section-body discriminator supports "connect-key". The hook returns provider credentials content with combined credential and model revert handling.
Render changed credentials inline
web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/AgentTemplateControl.tsx
The control detects changes to llm.provider and llm.connection. It renders the changed-aware credentials body with changed-path tracking when those paths change.

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

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the frontend fix for changed-path affordances on provider and connection edits.
Description check ✅ Passed The description explains the issue, root cause, implementation, regression behavior, and validation for the related configuration drawer changes.
Linked Issues check ✅ Passed The changes address issue #5544 by enabling diff-aware provider and connection edits with changed indicators and group restore support.
Out of Scope Changes check ✅ Passed The changed files and behavior remain within the scope of issue #5544 and the stated Model & harness configuration objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch AGE-4014-/-config-drawer-provider-level-change-shows-a-dirty-badge-but-no-changed

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.

@bekossy
bekossy changed the base branch from release/v0.106.2 to main August 1, 2026 14:05

@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: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 09d42cc0-b2ea-4d3d-93b2-12d171e0b640

📥 Commits

Reviewing files that changed from the base of the PR and between 7c395db and 14754a8.

📒 Files selected for processing (2)
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/AgentTemplateControl.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useModelHarness.tsx

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f601b57be6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Status Destroyed (PR converted to draft)

Updated at 2026-08-01T15:58:55.012Z

@bekossy
bekossy marked this pull request as draft August 1, 2026 15:58
@bekossy
bekossy marked this pull request as ready for review August 1, 2026 16:08

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 14754a8b0e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

… atomically, trim comment

Addresses review: a provider-only change (llm.provider without llm.connection) now gets the
same changed indicator and Restore as a connection change. The group Restore also reverts
llm.model alongside provider/connection, since writeModel can move all three together and a
partial revert reattaches a stale connection slug to the new model (rejected by the backend).
Also trims a comment that grew past the one-line convention.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Frontend size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[config-drawer] Provider-level change shows a dirty badge but no changed-path underline/popover/Restore; section expands to the full edit form

1 participant