fix(I1): stop offering workspace links that cannot work

↗ view on GitHub · sloth-ninja · 2026-08-07 · 6b52469b

getLinkForMatter collapsed the "unsupported" sentinel to null, so "this
matter has no workspace yet" and "workspace linking does not exist on this
deployment yet" were indistinguishable by the time they reached the UI. The
detail page therefore drew a "Start workspace" button, and the Matters page a
"Link to a Clio matter" row action, that could only ever answer 409 - the
`matter_workspace_links` migration (20260807_01) is not in the repo at all, so
that is the CURRENT state everywhere, not a hypothetical.

- getLinkForMatter now returns the sentinel; the detail route turns it into an
  explicit `linksUnavailable` flag (and still nulls `link`).
- New `areLinksAvailable(db)` probe, fails OPEN on a transient error (the
  27/07 rule: availability gate, not a destructive op) - the write path's own
  fixed refusal stays the honest backstop.
- The flag rides the LIST payload too: both remaining link affordances live on
  surfaces that never load a matter detail.
- Frontend hides both affordances behind it with honest copy ("Workspace
  linking isn't available yet."); the picker also refuses rather than letting
  a solicitor choose a matter and only then be told.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Repository Sloth-ninja/JessicaOSS
Author sloth-ninja <ezanahaddis@gmail.com>
Authored
Parents c59291b1
Stats 9 files changed , +159 , -24
Part of Practice Management: Clio-backed Matters and workspace links

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-6b52469b.md from inside the repo you want the change in.

⬇ Download capture-commit-6b52469b.md