open-legal-products puts the frontend quality guardrails back in place

Mike's maintainers have restored a strict testing threshold so small frontend changes cannot quietly weaken the product's foundations.

infrastructureworkflow

The team reversed a temporary relaxation of its automated test standard and filled in the gaps that made it necessary. The aim is practical: catch the kinds of small integration mistakes that can break a legal workflow even when a screen appears to work.

  • API connections are checked for the right destination, permissions, data labels and downloadable exports.
  • Folder deletion is tested through failed, cancelled and stale states, so users can retry safely rather than be left in a confused interface.
  • Locally run AI models are checked for availability and are presented as local options, without requiring an external service key.

The coverage bar now sits close to the team's measured results, making future untested additions fail automated checks while leaving more variable interface testing outside this rule.

So what Legal teams evaluating Mike should care because this is disciplined maintenance of the connective tissue behind everyday document, folder and AI-model workflows.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

1 commit from open-legal-products/mike, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
5719a6c9 test(frontend): cover every lib wrapper and restore the coverage ratchet Amal 2026-08-04 ↗ GitHub
commit body
WHY THIS MATTERS
The frontend gates src/app/lib/** with global coverage floors that, by
policy (docs/frontend-testing.md), only ever go up. Recent PRs bent that:
new lib code landed with partial tests (folderDeleteState at 69% branches,
the Ollama additions to modelAvailability untested) and PR #284 then
lowered the branch floor from 96 to 80 to get CI green - the exact move
the ratchet exists to prevent. A lowered floor silently licenses the next
regression too.

WHAT IS A COVERAGE RATCHET
A ratchet is a no-regression floor, not a target: CI fails if coverage
drops below the last measured level, and whenever tests are added the
floor is raised to just under the new measurement in the same PR. It
converts test debt into an explicit, reviewable decision instead of a
gradual drift.

HOW THIS PR CLOSES THE GAP
- mikeApi.ts: a table-driven it.each suite asserts route, HTTP method,
  JSON body, and auth header for every remaining thin endpoint wrapper
  (~50: MCP connectors, project/library folders and documents, document
  versions, chats, workflows incl. share/open-source). These wrappers are
  one-liners whose only failure modes are a wrong route or a camelCase
  key that should be snake_case - mistakes TypeScript cannot catch, so
  each case pins exactly those three things. Wrappers that unwrap an
  envelope (getOllamaModels, getCourtlistenerOpinions) or return blobs
  (exportChatData, exportTabularReviewsData) get explicit tests.
- folderDeleteState.ts: covers the failed-delete path (back to idle so
  the dialog allows retry), stale start/failed actions for a folder no
  longer pending, and cancel being a no-op mid-delete.
- modelAvailability.ts: covers the Ollama branches - prefix-based
  provider resolution, always-available (local models need no API key),
  label, and group mapping.

Measured after: 99.69% statements / 98.53% branches / 100% functions /
100% lines (was 80 / 92.68 / 56.92 / 79.09). Floors move to 97/96/98/98 -
~2 points under measured, per the config's stated policy, restoring the
branch floor to its pre-#284 level of 96 and raising the other three far
above their old values. docs/frontend-testing.md's coverage table, floor
numbers, and TODO list are updated to match.

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

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-1307.md from inside the repo you want the changes in.

⬇ Download capture-thread-1307.md