Land the Generate view on main (#5 merged into its stacked base)#7
Merged
Conversation
demo Generate view driven by `dspack-gen serve` (localhost NDJSON): - input bar: prompt / intent / model (ollama:<tag> | anthropic:<id>) / fake-pipeline toggle (the deterministic scripted adapter the Playwright gate drives) - per-attempt panels: gate strip S1 surface-schema / S2 contract-vocabulary / S3 governance; findings with rule id, location, message, and the contract's rationale VERBATIM; on a clean attempt the S3 card lists every applicable rule as satisfied — verified by the linter, not assumed from prompt steering - the exact repair message sent (rendered from the same findings object) - emitter gate strip A1/A2/A3 per A2UI version - outcome panel: the emitted surface rendered off the generated catalog via @a2ui/react v0.9.1 (dspack tokens driving the theme), audit report v1 download; failures render honestly with no surface Verified in-browser: fake pipeline shows violation → repair → all gates green → AlertDialog renders and opens with cancel-before-confirm. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
M1 PR-7 (demo side): governed Generate view
There was a problem hiding this comment.
Pull request overview
This PR mechanically lands the previously reviewed “Generate (governed)” demo view onto main, restoring the demo surface that streams NDJSON pipeline events from dspack-gen serve and renders attempts/gates/outcome in the UI.
Changes:
- Add
GenerateViewdemo screen that runs the governed-generation pipeline via localhost NDJSON and renders attempts, repairs, emitter gates, and outcome. - Add a view toggle in
App.tsxto switch between existing “surfaces” view and the new “Generate (governed)” view.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| demo/src/GenerateView.tsx | New governed-generation UI: streams NDJSON events from dspack-gen serve, renders gate status/findings, renders emitted surface, and allows downloading the audit report. |
| demo/src/App.tsx | Adds navigation/state to switch between existing surface rendering and the new Generate view. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+94
to
+103
| for (;;) { | ||
| const { done: eof, value } = await reader.read(); | ||
| if (value) buffer += decoder.decode(value, { stream: true }); | ||
| const lines = buffer.split("\n"); | ||
| buffer = lines.pop() ?? ""; | ||
| for (const line of lines) { | ||
| if (line.trim()) setEvents((prev) => [...prev, JSON.parse(line) as PipelineEvent]); | ||
| } | ||
| if (eof) break; | ||
| } |
Comment on lines
+74
to
+77
| const processor = new MessageProcessor<ReactComponentImplementation>([ingested.catalog], async () => {}); | ||
| processor.processMessages(structuredClone(done.surfaceMessages.messages) as any); | ||
| const model = Array.from(processor.model.surfacesMap.values())[0]; | ||
| return model ? processor.model.getSurface(model.id) : null; |
Comment on lines
+267
to
+271
| const a = document.createElement("a"); | ||
| a.href = URL.createObjectURL(blob); | ||
| a.download = "audit-report.json"; | ||
| a.click(); | ||
| URL.revokeObjectURL(a.href); |
Comment on lines
+72
to
75
| const [view, setView] = useState<"surfaces" | "generate">("surfaces"); | ||
| const [surfaceKey, setSurfaceKey] = useState<string>("access"); | ||
| const [surface, setSurface] = useState<AnySurface | null>(null); | ||
| const [actions, setActions] = useState<A2uiClientAction[]>([]); |
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.
Mechanical landing PR — content already reviewed and merged as #5.
What happened: #5 was stacked with base
claude/inspiring-bartik-07ada9; when #4 merged, #5 was not retargeted to main (the base branch wasn't deleted, so GitHub kept the original base), and its merge commit22872celanded on the stacked branch instead of main.demo/src/GenerateView.tsxis therefore absent from main — which is also the root cause of the currentdemo-e2efailure on aestheticfunction/dspack-gen#5 (its workflow now checks outdspack-to-a2ui@main, per the planned post-merge ref flip).This PR's diff is exactly the #5 demo work (the branch is otherwise identical to main after #4's merge). Once merged, dspack-gen#5's
demo-e2ejob goes green on re-run.🤖 Generated with Claude Code