Skip to content

Land the Generate view on main (#5 merged into its stacked base)#7

Merged
ryandmonk merged 2 commits into
mainfrom
claude/inspiring-bartik-07ada9
Jul 2, 2026
Merged

Land the Generate view on main (#5 merged into its stacked base)#7
ryandmonk merged 2 commits into
mainfrom
claude/inspiring-bartik-07ada9

Conversation

@ryandmonk

Copy link
Copy Markdown
Contributor

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 commit 22872ce landed on the stacked branch instead of main. demo/src/GenerateView.tsx is therefore absent from main — which is also the root cause of the current demo-e2e failure on aestheticfunction/dspack-gen#5 (its workflow now checks out dspack-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-e2e job goes green on re-run.

🤖 Generated with Claude Code

ryandmonk and others added 2 commits July 2, 2026 12:56
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
Copilot AI review requested due to automatic review settings July 2, 2026 21:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 GenerateView demo screen that runs the governed-generation pipeline via localhost NDJSON and renders attempts, repairs, emitter gates, and outcome.
  • Add a view toggle in App.tsx to 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 thread demo/src/GenerateView.tsx
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 thread demo/src/GenerateView.tsx
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 thread demo/src/GenerateView.tsx
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 thread demo/src/App.tsx
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[]>([]);
@ryandmonk ryandmonk merged commit b47a2cf into main Jul 2, 2026
2 checks passed
@ryandmonk ryandmonk deleted the claude/inspiring-bartik-07ada9 branch July 5, 2026 02:35
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.

2 participants