You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(frontend): settle v0.128.9 review threads on the /m drawers, deploy button and tests - #8200
This PR fixes the open review threads from the v0.128.9 merge train that were real problems, and updates one stale test.
Changes
Editable revision drawer (feat(frontend): editable revision drawer in /m Registry and Deployments #8157): when a commit showed a new revision and the host then asked for another revision, the drawer kept showing the committed one. The drawer now drops the committed revision when the host asks for any new revision.
Deploy button in the drawer header (feat(frontend): editable deployment drawer and a config view that never opens empty #8170): a click before the revision loaded opened the dialog with version 0 and an empty variant. The button is now off until the revision loads, and the dialog reads the variant label live, so it updates when the variants list loads later.
pnpm types:check in web/mobile and web/packages/agenta-playground-ui.
Vitest in web/mobile: runDetailsShell, editableRevisionDrawer, revisionDrawerGate, deploymentsTab, appOverviewSections, appOverviewBeta, appOverviewScreen, variantsScreen, promptsScreen. A new revisionDrawerGate test checks that Deploy is off while the revision loads, and it fails without the fix.
…oy button and tests
- Clear the drawer's committed revision when the host asks for another revision.
- Make the drawer config read-only while the next revision loads.
- Keep Deploy off until the revision loads, and read the variant label live.
- Use the destructive tokens for the solid red confirm button.
- Give the editable drawer tests a timeout longer than their polling.
- Expect Stop, not Pause, in the run details tests.
- Reword two test-design rules on mocks.
The Deploy button remains disabled until revision details are available, and deployment details now reflect the currently loaded revision and variant.
The revision editor is read-only while a new remote revision is loading, preventing changes to outdated details.
Switching revisions clears the previous committed state.
Updates
Active runs now use Stop wording instead of Pause.
Destructive confirmation buttons use the updated destructive color styling.
The changes update revision deployment and drawer states, align run details references with the Stop action, and revise test guidance, test timing, and destructive button styling.
Changes: Revision loading and editing
Layer / File(s)
Summary
Gate deployment on revision data web/mobile/src/features/revisions/DeployRevisionButton.tsx, web/mobile/tests/unit/revisionDrawerGate.render.test.tsx
The button reads revision data and variant label through Jotai hooks, disables itself until revision data is available, and resets its open state when the dialog closes. Tests cover the disabled state.
Handle pending revision state web/packages/agenta-playground-ui/src/panels/drawer/EditableRevisionDrawer.tsx, web/packages/agenta-playground-ui/src/panels/drawer/EditableRevisionDrawerBody.tsx
A new nonempty revision ID clears the committed ID. The configuration panel is read-only while a non-local revision is pending.
The screen comment and tests refer to Stop instead of Pause. Tests retain the stop-request and success-toast assertions and check that readers without edit rights do not see the Stop button.
Agenta-AI/agenta#8012: Introduces ConfigPanel and its hydration loading state, which the revision drawer uses.
Agenta-AI/agenta#8041: Adds the ConfigPanelreadOnly prop used by the revision drawer while a replacement revision loads.
Merge Risk: Low · up to 9235f
The deploy dialog can switch its target revision if the URL revision changes while it is open, and it can show a blank variant name until the label loads. Test guidance also conflicts with the save-test rule. These issues are small and can be fixed in follow-up work.
Pre-merge checks: 5
Check name
Status
Explanation
Title check
The title identifies the drawer, deploy button, and test changes.
Description check
The description covers the changes and reported tests.
Docstring Coverage
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 8 files. (1 skipped: 1 unsupported.)
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.
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 0 remain after this review.
- Mock only what lives outside the code: HTTP, time, randomness, the router, and browser APIs that jsdom lacks, such as the clipboard.
- If a test needs more than about 5 `vi.mock` calls, the level is wrong. Move down to the package state, or up to a screen with real children.
- Never assert on a mock. If the assertion still passes after you remove the mock, or fails because of it, delete the assertion.
- Never assert on a mock. An assertion that only checks what a mock returns or records tests the mock, so delete it. Keep an assertion on what the screen shows, even in a test that also mocks HTTP.
printf'%s\n''--- HTTP mock setup and save test ---'
nl -ba web/mobile/tests/unit/appActionsMenu.render.test.tsx | sed -n '1,140p;200,278p'
Repository: Agenta-AI/agenta
Length of output: 9991
Exempt request-body assertions from the mock rule.
Save tests can inspect requests recorded by an HTTP mock. The rule tells authors to delete those assertions, but the save rule requires request-body assertions. Clarify that assertions on requests sent by the code under test are allowed.
printf'%s\n''--- variants query ---'
nl -ba web/packages/agenta-entities/src/workflow/state/store.ts | sed -n '600,645p'printf'%s\n''--- revision query ---'
nl -ba web/packages/agenta-entities/src/workflow/state/store.ts | sed -n '1280,1345p'printf'%s\n''--- base entity query ---'
nl -ba web/packages/agenta-entities/src/workflow/state/store.ts | sed -n '1825,1955p'
Repository: Agenta-AI/agenta
Length of output: 13597
Handle an unavailable variant label in the deploy dialog.
The revision can load before the variants list. The dialog can then show a blank variant name, and a deployment submitted before the label arrives can show a blank name in its success message. Show a loading or unavailable label while preserving deployment if the list cannot load.
Keep the deploy dialog bound to the revision selected when it opens.
The drawer can update the URL revision through onNavigate without remounting DeployRevisionButton. Because row is derived from the current revisionId, an open dialog can submit the newly selected revision. The dialog key only resets its internal state; it does not preserve the original deployment target.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes the open review threads from the v0.128.9 merge train that were real problems, and updates one stale test.
Changes
text-white, which reads poorly on the dark mode red. It now uses thedestructiveanddestructive-foregroundtokens. Light mode looks the same, and dark mode gets dark text on the red.mountcan poll for up to 30 seconds, but the test timeout was 5 seconds. The tests now have a 60 second timeout, so a slow first mount does not fail and no poll runs on into the next test.Tests
pnpm lint-fixinweb/.pnpm types:checkinweb/mobileandweb/packages/agenta-playground-ui.web/mobile: runDetailsShell, editableRevisionDrawer, revisionDrawerGate, deploymentsTab, appOverviewSections, appOverviewBeta, appOverviewScreen, variantsScreen, promptsScreen. A new revisionDrawerGate test checks that Deploy is off while the revision loads, and it fails without the fix.