Skip to content

docs+chat: smoke checklist Projects + Pydantic discriminator + untitled-thread fallback#278

Merged
blove merged 1 commit into
mainfrom
claude/checklist-projects-tech-debt
May 13, 2026
Merged

docs+chat: smoke checklist Projects + Pydantic discriminator + untitled-thread fallback#278
blove merged 1 commit into
mainfrom
claude/checklist-projects-tech-debt

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented May 13, 2026

Summary

Three small follow-ups bundled, all surfaced by the review work after sidenav-polish:

1. Smoke checklist — Projects + Move-to-project (covers PR #273)

Two new sections in `examples/chat/smoke/CHECKLIST.md` cover Phase 4's Projects feature end-to-end:

  • Sidenav PROJECTS section render + inline create / rename / delete flows + filter behavior + persistence
  • Move thread to project — kebab submenu wiring, idempotent moves, optimistic-hide, "No project" reset

2. Pydantic envelope discriminator enforcement

`A2uiEnvelope` now has a `model_validator` requiring exactly one of `surfaceUpdate` / `beginRendering` / `dataModelUpdate`. Catches LLM outputs that pass strict-mode validation but emit ambiguous (multi-discriminator or empty) envelopes — flagged in the PR #259 review as a follow-up.

Two new tests cover the rejected cases.

3. Untitled-thread fallback

`ThreadsService.toThread` previously fell back to `Thread 019e1e98...` (raw id slice) when `metadata.title` was missing. The Python backend writes the title on the first user message, but threads created via "+ New chat" and abandoned never get a title — leaving ugly raw-id rows in the sidenav.

Fallback now reads "Untitled" — easier on the eye, consistent with how most chat apps surface drafts.

Test plan

  • `pytest tests/test_envelope_tool.py` — 9/9 (was 7, +2 new)
  • Full `pytest tests/` — 31/31
  • `nx build examples-chat-angular` clean
  • CI green
  • Spot-check: open a fresh thread via "+ New chat", do NOT send a message, reload — sidenav row reads "Untitled" not "Thread 019e..."

Three changes bundled per follow-up review notes:

1. examples/chat/smoke/CHECKLIST.md — adds 'Projects' and 'Move thread
   to project' sections covering PR #273 (Phase 4) end-to-end: inline
   create / rename / delete, filter behaviour, submenu wiring, idempotent
   moves, persistence across reload.

2. examples/chat/python/src/streaming/envelope_tool.py — Pydantic
   model_validator on A2uiEnvelope rejects envelopes with zero or
   multiple discriminators set. Catches LLM outputs that pass strict-
   mode validation but emit ambiguous shapes; two new tests cover the
   rejected cases.

3. examples/chat/angular/src/app/shell/threads.service.ts — fallback
   for threads without metadata.title changes from 'Thread 019e1e98...'
   (raw id slice) to a graceful 'Untitled'. Backend writes the title
   on the first user message; threads created via '+ New chat' and
   abandoned previously appeared with their raw id prefix in the
   sidenav.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 13, 2026

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

Project Deployment Actions Updated (UTC)
cacheplane Ready Ready Preview, Comment May 13, 2026 2:09am

Request Review

@blove blove merged commit f60e8c2 into main May 13, 2026
14 checks passed
@blove blove deleted the claude/checklist-projects-tech-debt branch May 13, 2026 02:14
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