fix(motifs): make linked motifs clickable from an entry (#3) #47

Merged
rbrooks merged 1 commit from fix/v6.1-clickable-motifs into main 2026-06-25 23:19:00 +00:00
Owner

Closes #3 (v6.1).

Problem

On an entry, the linked motifs (the "Motifs" section, AddToMotif) rendered each motif title as a plain <span> — inert text. There was no way to navigate from an entry to one of its motifs.

Fix

Render each linked motif's title as a <Link to={/motifs/:id}> (the existing motif-detail route), with a hover colour + underline affordance. One-line behavioural change in AddToMotif.tsx; the add/remove panel and everything else is untouched.

Test

Adds AddToMotif.test.tsx — routes the component's two mount fetches and asserts a linked motif renders as a link with href="/motifs/:id". Guards against this regressing.

Verification (dev server)

  • tsc + vite build clean
  • Full app suite green (includes the new regression test)

First of the three v6.1 issues; #5 (dark-mode graph) and #4 (export-all-motifs) to follow.

🤖 Generated with Claude Code

Closes #3 (v6.1). ## Problem On an entry, the linked motifs (the "Motifs" section, `AddToMotif`) rendered each motif title as a plain `<span>` — inert text. There was no way to navigate from an entry to one of its motifs. ## Fix Render each linked motif's title as a `<Link to={/motifs/:id}>` (the existing motif-detail route), with a hover colour + underline affordance. One-line behavioural change in [AddToMotif.tsx](app/src/pages/Entries/AddToMotif.tsx); the add/remove panel and everything else is untouched. ## Test Adds `AddToMotif.test.tsx` — routes the component's two mount fetches and asserts a linked motif renders as a link with `href="/motifs/:id"`. Guards against this regressing. ## Verification (dev server) - `tsc` + `vite build` clean ✅ - Full app suite green (includes the new regression test) ✅ First of the three v6.1 issues; #5 (dark-mode graph) and #4 (export-all-motifs) to follow. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(motifs): make linked motifs clickable from an entry (#3)
All checks were successful
CI / API — typecheck & tests (push) Successful in 1m55s
CI / App — typecheck, test & build (push) Successful in 1m8s
CI / App — typecheck, test & build (pull_request) Successful in 1m25s
CI / API — typecheck & tests (pull_request) Successful in 2m6s
a038d7ee00
An entry's linked motifs in AddToMotif rendered the title as inert text,
so there was no way to navigate from an entry to a motif. Render each as
a Link to /motifs/:id with a hover affordance.

Adds a regression test asserting the membership renders as a link to the
motif detail page.

Closes #3

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
rbrooks deleted branch fix/v6.1-clickable-motifs 2026-06-25 23:19:01 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rbrooks/TeaLeaves!47
No description provided.