Skip to content

feat(agent-forge): Suggestions tab with pending draft card (L11b) - #1075

Merged
LinuxDevil merged 1 commit into
mainfrom
fb-l11b
Nov 12, 2026
Merged

LinuxDevil merged 1 commit into
mainfrom
fb-l11b

Conversation

@LinuxDevil

Copy link
Copy Markdown
Owner

Summary

  • GET /agents/:id/draft returns a DraftView (ChangeDraft + live changes diff + currentVersion), computed per request via diffSpecs/applySpecPatch so the card reflects what approval would actually apply.
  • New Suggestions tab (built, count badge) renders the pending draft: origin chip, relative time, drift banner when currentVersion > baseVersion, L11a auto-review verdict (pending/clear/escalated/unavailable), concerns list, gated-field sentence, ChangeList, and approve/reject with optional reject note.
  • Approve applies via approveDraft, toasts Applied the change as v<n>, reloads the open document with discard-local semantics; reject toasts and resolves. Errors stay on the card with role="alert" and re-enable buttons.
  • Shared useDraftView/usePendingDraftCount hooks subscribe to draft.changed and relevant agent.changed events with stale-response guards; both the detail header and builder tab strip show the pending count.
  • Spec: audit/forge-builder/specs/L11b-suggestions-tab-draft-card.md

Test 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/AgentDetailRoute updates — 39 targeted tests
  • Full Forge client suite: 233 files / 3952 tests pass; server suite 1486/1487 (1 known timing flake, passes in isolation)
  • Typechecks (client, server, e2e), lint (only pre-existing steerGate.ts error on main), fallow audit --base origin/main clean (advisory dupes/CSS warnings only)

Generated with Devin

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>
@LinuxDevil
LinuxDevil merged commit 28ee3df into main Nov 12, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant