fix(examples-chat): smoke pass findings A+B (palette dropdowns + reasoning summary)#217
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Two small bug fixes surfaced by the live Chrome smoke pass: A) Palette dropdowns (Model + Effort) show first option instead of signal/persisted value on initial render. Cause: `<select [value]>` property binding fires before `@for` materializes `<option>` children. Fix: add `[selected]` on each option matching current signal value. B) Reasoning blocks come back with empty `summary: []` because the python graph requests `reasoning.effort` but not `reasoning.summary='auto'`. Fix: extend kwargs and extend the `@ngaf/langgraph` adapter's `extractReasoning` helper to read text from OpenAI summary items. Defers Findings C (content duplication), D (thread restore on reload), E (regenerate flicker), F (cosmetic dup chat-error) to separate brainstorms. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Five-phase plan totaling ~4 commits. Phase 0 branch, Phase 1 palette [selected] bindings, Phase 2 python summary='auto', Phase 3 adapter extractReasoning extension (TDD with 2 new spec cases), Phase 4 verification + PR. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
blove
added a commit
that referenced
this pull request
Jun 9, 2026
…oning summary) (#217) * fix(examples-chat-angular): palette dropdowns honor signal value on initial render * fix(examples-chat-python): request reasoning.summary='auto' * fix(langgraph): extractReasoning reads OpenAI summary items * docs(spec): canonical examples/chat smoke fixes A+B Two small bug fixes surfaced by the live Chrome smoke pass: A) Palette dropdowns (Model + Effort) show first option instead of signal/persisted value on initial render. Cause: `<select [value]>` property binding fires before `@for` materializes `<option>` children. Fix: add `[selected]` on each option matching current signal value. B) Reasoning blocks come back with empty `summary: []` because the python graph requests `reasoning.effort` but not `reasoning.summary='auto'`. Fix: extend kwargs and extend the `@ngaf/langgraph` adapter's `extractReasoning` helper to read text from OpenAI summary items. Defers Findings C (content duplication), D (thread restore on reload), E (regenerate flicker), F (cosmetic dup chat-error) to separate brainstorms. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(plan): canonical examples/chat smoke fixes A+B implementation plan Five-phase plan totaling ~4 commits. Phase 0 branch, Phase 1 palette [selected] bindings, Phase 2 python summary='auto', Phase 3 adapter extractReasoning extension (TDD with 2 new spec cases), Phase 4 verification + PR. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Two small bug fixes surfaced by the live Chrome smoke pass against the workspace demo.
A) Palette dropdowns ignore signal value on initial render
The Model and Effort
<select>elements in the control palette showed the first option (gpt-5,minimal (fast)) on initial render instead of the persisted/signal value. Cause:[value]on<select>fires before the@forloop materializes<option>children; with no matching option, the select falls back to its first option.Fix: add
[selected]="opt.value === model()"(and equivalent for effort) on each option. Angular setsselectedon the matching option during the same change-detection pass that populates the@for, so first paint is correct.B) Reasoning blocks have empty
summary: []Two coupled fixes:
reasoning.effortonly — OpenAI's Responses API needsreasoning.summary='auto'to actually emit summary text. Without it, the response carried{type: 'reasoning', summary: []}. Now extends kwargs.@ngaf/langgraphadapter —extractReasoningpreviously only looked atblock.text(Anthropic-style). Extended to also concatenateblock.summary[].textitems (OpenAI-style). Two new spec cases pin the behaviour.After both:
<chat-reasoning>renders with the summarised thinking content for gpt-5 + effort=high. Verified end-to-end via curl probe —reasoning.summarynow arrives populated withsummary_textitems.Test plan
Verified locally
nx run examples-chat-angular:lint test build— green (9 vitest specs)nx run langgraph:lint test— green (2 new specs forextractReasoningsummary path; existing 41 unchanged)nx run examples-chat-python:smoke— 2 passedsummary[0..n]populated, each withtype: 'summary_text'and substantive textPending visual verification (rolls into issue #214)
/embedafter changing model — palette shows the persisted option<chat-reasoning>pill appears with summarised thinking textFindings C (content duplication), D (thread restore on reload), E (regenerate flicker), F (cosmetic dup chat-error) deferred to separate brainstorms.
Spec: `docs/superpowers/specs/2026-05-08-canonical-chat-smoke-fixes-a-b-design.md`
Plan: `docs/superpowers/plans/2026-05-08-canonical-chat-smoke-fixes-a-b.md` (in flight on `claude/spec-canonical-chat-smoke-fixes-a-b`; will land separately if not folded into this PR pre-merge)