Phase 7B: knowledge copilot reports UI#11
Merged
Conversation
e6ca293 to
db2ba1d
Compare
Contributor
Author
|
[CommandGrid][Phase 07B][PR_OPEN] PR opened and ready for Scout review. Ralph, please start Scout review. |
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
Builds the Phase 7B Knowledge Copilot + Reports UI on top of the Phase 7A APIs.
Changed files
src/app/(app)/copilot/*— live Knowledge Copilot route, loading/error states.src/modules/knowledge/components/knowledge-copilot.tsx— role-aware prompt chips, ask form, answer metadata, citation badges/cards.src/app/(app)/reports/*— report list/generation route plus detail route with loading/error/not-found states.src/modules/reports/components/reports-console.tsx— report list, capability cards, generation form, generated report preview.src/modules/reports/components/report-detail.tsx— report detail fetch/render usingGET /api/reports/{id}.src/modules/reports/components/report-markdown.tsx— safe markdown-as-structured-text renderer, no raw HTML injection.src/lib/navigation.ts— moves Knowledge Copilot and Reports to live Phase 7 navigation.src/app/(app)/incidents/[id]/page.tsx— adds low-risk incident entry points for Copilot and report generation.Verification
npm install✅npm run lint✅npm run typecheck✅npm test✅ — 10 files passed, 50 tests passed, 5 skippednpm run build✅npm run cf:build✅npm run demo:resetDATABASE_URL is not configurednpm run knowledge:reports-smokeDATABASE_URL is not configured)Route / visual review notes
Browser tooling was unavailable in this session: Clawdbot browser start failed with
PortInUseError: Port 18801 is already in use; sandbox browser is disabled. I used route/API/static smoke instead.Local route smoke with
next dev:/copilot?role=engineer→ HTTP 200/copilot?role=executive→ HTTP 200/reports?role=executive→ HTTP 200/reports?role=support-lead→ HTTP 200/reports?role=engineer→ HTTP 200/reports/report_flagship_exec_brief?role=executive→ HTTP 200/api/copilot?role=admin→ HTTP 200 and returned all five demo prompts/api/reports?role=executive→ HTTP 500 locally due missingDATABASE_URL(expected local DB blocker)No screenshots were captured because the browser tool could not start.
Acceptance checklist
POST /api/copilot.GET /api/reports.POST /api/reportsforpostmortem,executive-summary, andcustomer-impact.GET /api/reports/{id}and renders markdown safely as structured text, not raw HTML.Risks / notes
DATABASE_URLin this worktree.PortInUseError: Port 18801 is already in use).cf:buildpasses.