Repository navigation
feat(agent-forge): Suggestions tab with pending draft card (L11b) - #1075
Merged
Merged
Conversation
GET /agents/:id/draft now returns a DraftView that diffs the current snapshot against the draft-patched snapshot live per request, so the card always shows what approval would actually change. The new Suggestions tab renders the pending draft with its origin, drift banner (base vs current version), L11a auto-review verdict, concerns, gated-field summary and ChangeList, plus approve/reject actions. Both the detail header and the builder tab strip show a pending-draft count via a shared usePendingDraftCount hook. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
GET /agents/:id/draftreturns aDraftView(ChangeDraft+ livechangesdiff +currentVersion), computed per request viadiffSpecs/applySpecPatchso the card reflects what approval would actually apply.currentVersion > baseVersion, L11a auto-review verdict (pending/clear/escalated/unavailable), concerns list, gated-field sentence,ChangeList, and approve/reject with optional reject note.approveDraft, toastsApplied the change as v<n>, reloads the open document with discard-local semantics; reject toasts and resolves. Errors stay on the card withrole="alert"and re-enable buttons.useDraftView/usePendingDraftCounthooks subscribe todraft.changedand relevantagent.changedevents with stale-response guards; both the detail header and builder tab strip show the pending count.audit/forge-builder/specs/L11b-suggestions-tab-draft-card.mdTest plan
server/__tests__/draftView.test.ts— enriched view,changes,currentVersion, no-draft 204/404 (4 tests)DraftCard.test.tsx(13),SuggestionsTab.test.tsx(8),agentTabs/BuilderTabs/AgentDetailRouteupdates — 39 targeted testssteerGate.tserror on main),fallow audit --base origin/mainclean (advisory dupes/CSS warnings only)Generated with Devin