Skip to content

fix(examples-chat): smoke pass findings A+B (palette dropdowns + reasoning summary)#217

Merged
blove merged 5 commits into
mainfrom
claude/examples-chat-smoke-fixes-a-b
May 8, 2026
Merged

fix(examples-chat): smoke pass findings A+B (palette dropdowns + reasoning summary)#217
blove merged 5 commits into
mainfrom
claude/examples-chat-smoke-fixes-a-b

Conversation

@blove

@blove blove commented May 8, 2026

Copy link
Copy Markdown
Contributor

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 @for loop 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 sets selected on 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:

  1. Python graph previously requested reasoning.effort only — OpenAI's Responses API needs reasoning.summary='auto' to actually emit summary text. Without it, the response carried {type: 'reasoning', summary: []}. Now extends kwargs.
  2. @ngaf/langgraph adapterextractReasoning previously only looked at block.text (Anthropic-style). Extended to also concatenate block.summary[].text items (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.summary now arrives populated with summary_text items.

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 for extractReasoning summary path; existing 41 unchanged)
  • nx run examples-chat-python:smoke — 2 passed
  • Server-side probe with model=gpt-5, effort=high: response includes a reasoning block with summary[0..n] populated, each with type: 'summary_text' and substantive text

Pending visual verification (rolls into issue #214)

  • Reload at /embed after changing model — palette shows the persisted option
  • Send the puzzle prompt with effort=high — <chat-reasoning> pill appears with summarised thinking text

Findings 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)

@vercel

vercel Bot commented May 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cacheplane Ready Ready Preview, Comment May 8, 2026 9:21pm

Request Review

blove and others added 2 commits May 8, 2026 14:18
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 blove merged commit 8300be9 into main May 8, 2026
14 checks passed
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>
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.

1 participant