Skip to content

Chunk Quality v3.2: label overlap, add Chunks-view legend - #10

Merged
willscott-v2 merged 3 commits into
mainfrom
feature/chunk-quality-v3.2
Jul 25, 2026
Merged

willscott-v2 merged 3 commits into
mainfrom
feature/chunk-quality-v3.2

Conversation

@willscott-v2

Copy link
Copy Markdown
Collaborator

Why

Chuck's feedback: the Chunks view was unreadable to a non-dev — the RAG overlap prefix looked like duplicate content, and the vocabulary (Chunk, L#, sections, w/t, the breadcrumb) was never defined. Phase 1 of the Chunk Quality plan (tasks/todo.md) makes the current output self-explanatory. Everything is deterministic — zero AI/LLM calls.

API (api/chunk.js)

  • addOverlap() now records overlap_word_count on each section it modifies, carried through enhanceChunks() into the response
  • settings.target_words exposes the active {min, max, target} word range so the UI reads size ranges live instead of duplicating CHUNK_SIZES

UI (public/index.html)

  • Overlap prefix renders dimmed (dotted underline) with a ↔ Nw overlap badge; tooltip explains it's intentional RAG-style context carry-over, not duplicate content
  • Collapsible "How to read this" legend at the top of the Chunks view: Chunk, L#, Path, Sections, w/t, the live target size range, and overlap
  • Chunk meta pill (Chunk 1 • L2 • 2 sections • 105w • 115t) gets a tooltip spelling out each part; fixed the 1 sections plural
  • Heading-path breadcrumb labeled PATH with a tooltip + legend entry
  • Content Summary stat labels were reversed vs the chunk cards (big chunks labeled "Sections" and vice versa) — swapped to match

Testing

Smoke-tested locally (vercel dev) with Playwright at 1440px:

  • Hayes Barton Place assisted-living (the page Chuck screenshotted): Chunk 2 section 2 reports overlap_word_count: 29 and renders the 29-word prefix badged + dimmed; 7 badges total (2w–35w)
  • searchinfluence.com, the Wikipedia RAG article, and getchunks.searchinfluence.com: every reported overlap count splits the section text exactly (0 mismatches), target_words tracks the auto-detected size (small/medium/large), zero-overlap pages show no badges

Next: Phase 2 (v3.3) adds the actionable layer — deterministic per-chunk flags + a 0–100 Chunkability score.

🤖 Generated with Claude Code

Chuck couldn't tell intentional RAG overlap from duplicate content, and
the Chunks view assumed vocabulary it never defined. All deterministic —
no AI calls.

API (api/chunk.js):
- addOverlap() records overlap_word_count on each section it modifies;
  enhanceChunks() carries it into the response
- settings.target_words exposes the active {min,max,target} size range
  so the UI reads it live instead of mirroring CHUNK_SIZES

UI (public/index.html):
- Overlap prefix renders dimmed with a "↔ Nw overlap" badge + tooltip
  explaining the intentional carry-over
- Collapsible "How to read this" legend defines Chunk, L#, Path,
  Sections, w/t, live target size range, and overlap
- Chunk meta pill gets an explanatory tooltip; "1 sections" plural fixed
- Heading-path breadcrumb labeled "PATH" with tooltip + legend entry
- Content Summary stat labels swapped (big=Chunks, small=Sections) to
  match the chunk cards and legend

Smoke-tested on the page Chuck screenshotted (Hayes Barton Place
assisted-living: Chunk 2's 29-word overlap now renders labeled) plus
searchinfluence.com, Wikipedia RAG article, and getchunks itself.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 25, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
getchunks Ready Ready Preview, Comment Jul 25, 2026 8:37pm

Request Review

type="url" made the browser reject bare domains before submit. Switch to
type="text" (inputmode="url" keeps the mobile keyboard) and default to
https:// in the submit handler when no scheme is given. Full URLs pass
through untouched; the API's scheme allowlist stays strict.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The title attribute gave a help cursor but no visible tip in practice —
native tooltips need a long hover rest and never render in some embedded
browsers. New [data-tip] component renders the hint as a styled ::after
immediately on hover (.tip-right modifier anchors the chunk meta pill's
tip to its right edge). big-chunk-meta drops overflow:hidden/ellipsis so
the pseudo-element isn't clipped; it wraps instead when narrow.

The overlap prefix keeps its native title as a best-effort extra — CSS
tooltips don't position reliably on multi-line inline spans, and the
badge beside it carries the same message.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview — b90bfa7f Deployed Jul 25, 2026 by vercel[bot]
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