Repository navigation
[4559be66] Panel: let the CEO see and retire approved playbooks (archive route has no UI) - #1393
Conversation
|
Thanks for opening your first pull request on RoboCo! Quick checklist before review (most of these are enforced by CI, but worth a glance):
See CONTRIBUTING.md for the full workflow and the Code of Conduct for the community standards we follow. Welcome aboard — a maintainer will review shortly. |
There was a problem hiding this comment.
In-path PR-review gate — CHANGES REQUESTED 🔴
Reviewed by pr_reviewer (RoboCo PR reviewer). Posted by the project bot account; the gate verdict is authoritative in RoboCo.
[F-ff7f8585] docs/frontend/pr-1370-python-gate-base-regression.md:1 (minor) — The assembled feature PR ships only the playbook Approved view, its client methods, tests and feature doc. → It also adds a CI-triage working note for task 04d83ee5 / PR 1370 asserting the Python gate 'will stay red' and 'pr_pass will keep refusing'. → Delete docs/frontend/pr-1370-python-gate-base-regression.md from the branch. The base-regression finding belongs in a task/escalation to the PM, not a permanent doc on master.
[F-c963ea03] docs/frontend/README.md:29 (nit) — The new feature doc docs/frontend/components/playbook-approved-view.md is discoverable from the docs/frontend index, like the other entries. → README.md is unchanged, so the new playbook-approved-view.md page is not linked. → Add a one-line link entry for components/playbook-approved-view.md to docs/frontend/README.md.
Only the CEO merges this PR into master.
* [86b799b8] Approved playbooks view with archive action in panel (#1369) * [86b799b8] feat(panel): approved playbooks view with confirm-gated archive * [86b799b8] docs(panel): document approved playbooks view and archive action --------- Co-authored-by: Frontend Developer 1 <fe-dev-1@roboco.tech> Co-authored-by: Frontend Documenter <fe-doc@roboco.tech> * [24b8ea4f] test(panel): add Drafts/Approved toggle test and reformat review queue (#1374) Co-authored-by: Frontend Developer 1 <fe-dev-1@roboco.tech> * [04d83ee5] Fix PR 1370 red Python quality gate: sync base, reproduce, resubmit (#1378) * [04d83ee5] style(panel): prettier-format playbook approved list component and test * [04d83ee5] docs(frontend): record PR 1370 python gate base regression finding --------- Co-authored-by: Frontend Developer 1 <fe-dev-1@roboco.tech> Co-authored-by: Frontend Documenter <fe-doc@roboco.tech> --------- Co-authored-by: roboco-app[bot] <302741806+roboco-app[bot]@users.noreply.github.com> Co-authored-by: Frontend Developer 1 <fe-dev-1@roboco.tech> Co-authored-by: Frontend Documenter <fe-doc@roboco.tech> Co-authored-by: Frontend PM <fe-pm@roboco.tech>
7ed1cde to
a050543
Compare
There was a problem hiding this comment.
In-path PR-review gate — PASSED ✅
Reviewed by pr_reviewer (RoboCo PR reviewer). Posted by the project bot account; the gate verdict is authoritative in RoboCo.
Checked each AC against a line in the diff. AC1: playbooks.ts listApproved() uses GET /playbooks with params {status:'approved'}, and archive(id) uses POST /playbooks/${id}/archive. Both match roboco/api/routes/playbooks.py. AC2: playbook-review-queue.tsx adds a SegmentedControl Drafts/Approved toggle (Radix tabs). playbook-approved-list.tsx renders title, team badge, tags and problem, with a skeleton loading state, an empty message and a role=alert error state. AC3: Archive opens a confirm Dialog. onSuccess toasts, invalidates ['playbooks','drafts'] and ['playbooks','approved'], and the row drops on refetch. AC4: the onError branch for axios 409 shows toast.info and invalidates without crashing. AC5: playbooks.test.ts covers both client methods; playbook-approved-list.test.tsx covers list, loading/empty, error, confirm-archive with both invalidations, and 409; the queue tests cover the toggle. Round-1 findings resolved: README link added, and the pr-1370 note removed (it is no longer in the tree). No backend change, no lint suppressions, placement follows conventions (component in components/dashboard, client in lib/api).
Only the CEO merges this PR into master.
Objective
The playbook curation surface is only half shipped in the panel. The backend can list approved playbooks (GET /api/playbooks?status=approved) and retire one (POST /api/playbooks/{id}/archive, which archives it and removes it from the KB index). The panel's playbook client and the Playbook Review Queue only ever fetch and act on DRAFTS. Once the CEO approves a playbook it disappears from the panel. Every claim briefing then auto-injects it as institutional memory, and the CEO has no in-panel way to review the approved set or pull a stale or wrong one. Today only the Auditor can do that, through the archive_playbook MCP verb. Add an 'Approved' view next to the drafts queue (list approved playbooks with title, problem, tags and team) with an Archive action that calls the existing archive route. No backend changes are needed.
Notes
Success Criteria