Skip to content

fix(front): feed distinctive vocab into the AutorIA column (WO-12) - #117

Merged
sergi-torres merged 1 commit into
mainfrom
fix/wo-12-distinctive-vocab
Jul 28, 2026
Merged

fix(front): feed distinctive vocab into the AutorIA column (WO-12)#117
sergi-torres merged 1 commit into
mainfrom
fix/wo-12-distinctive-vocab

Conversation

@sergi-torres

@sergi-torres sergi-torres commented Jul 28, 2026

Copy link
Copy Markdown
Owner

What

Feeds the distinctive vocabulary into the AutorIA column of the side-by-side, which until now was not receiving it.

Why

Closes #93

Root of the frontend chain: wo-12 → wo-13 and wo-12 → wo-11.

How IBM Bob helped

  • Custom Mode used: none
  • Bob session export: n/a

Claude Code agents. On frontend work orders the ui-ux-pro-max skill was used only as an accessibility verifier (AA contrast, touch target size), with the explicit brake that docs/design-system.md is authoritative and any styling, colour or typography proposal it makes is discarded.

That brake was necessary: without it, a work order that consists of swapping amber-500 for --warning turns into a redesign.

Screenshots / output

Data change in the AutorIA column. Honest note: with the database unseeded, the terms it displays come from the fixture. The real quality of those terms depends on #89 and #100 — see those PRs on the fact that the vocabulary surfaces common words.

Checklist

  • Tests pass locally (make test)
  • Lint passes (make lint)
  • If schema changed (StyleProfile / Passport) → bumped version + updated docs/
  • If new env var → added to .env.example
  • If new/changed endpoint → updated docs/api_contract.yaml
  • Documentation in the relevant README.md updated
  • At least one teammate reviewed

Checkboxes deliberately unticked: whoever opens the PR does not certify it.

Formatting note: the repo has trailing commas committed and Prettier 3.9.6 strips them — if you reformat, use --trailing-comma=all.

The <mark> highlight device from design-system section 8.4 never fired:
GenerateStudio held `distinctiveTerms` in a setter-less useState initialised to
`[]`, so AuthorColumn's `distinctiveTerms.length > 0` guard was always false and
neither the marks nor the one-line legend rendered.

- lib/style-dna.ts: new pure `selectDistinctiveTerms()` (rank by TF-IDF score,
  drop blanks, case-insensitive de-dup, top-10 cap) + unit tests.
- app/author/[id]/page.tsx: single load point for the StyleProfile (demo-safe
  fixture fallback, 5 s budget), passes the terms down.
- GenerateStudio.tsx: `distinctiveTerms` becomes a prop, default `[]`.

The vanilla column still receives nothing - its blankness is the point.
AuthorColumn's prop contract is unchanged. Empty vocab degrades to plain text.

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

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
author-ai Ready Ready Preview, Comment Jul 28, 2026 4:25pm

@sergi-torres
sergi-torres merged commit efa5348 into main Jul 28, 2026
7 checks passed
@sergi-torres
sergi-torres deleted the fix/wo-12-distinctive-vocab branch July 28, 2026 16:48
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.

[frontend] WO-12 — Alimentar el vocabulario distintivo en la columna AutorIA del side-by-side

1 participant