Sloth-ninja pulls Companies House research out of the chat box

JessicaOSS now gives solicitors a dedicated place to investigate a company before deciding what to ask the assistant next.

workflowintegration

The new Company Search area is built around a straightforward master-detail view: find a business, inspect it, then carry the enquiry into the assistant for follow-up.

  • Company profiles show the core record, officers and people with significant control.
  • Filing history opens on demand, with pages of filings and a direct link to the official register.
  • Clear messages cover a missing API key, rate limits, companies that cannot be found, and upstream service failures.

The same company-research logic still supports the assistant, so this is an added research surface rather than a competing one. Sloth-ninja has also kept raw service errors away from users and put limits around research requests.

So what Firms that need quick corporate context during matters or client intake should care: this makes Companies House research easier to review, then easier to turn into a focused legal question.

View this fork on GitHub →

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

Commits in this thread

4 commits from Sloth-ninja/JessicaOSS, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
bcbb4469 WS7: Company Search panel (Companies House) sloth-ninja 2026-07-19 ↗ GitHub
commit body
Backend: extract getCompanyBundle from the chat tool so the new
/companies routes (search, profile+officers+PSCs bundle, paginated
filing history) share one implementation; requireAuth + try/catch on
every handler, fixed friendly error details (401->409 key-missing code,
404/429 mapped, else generic 502); new researchLimiter
(RATE_LIMIT_RESEARCH_WINDOW_MINUTES/RATE_LIMIT_RESEARCH_MAX, documented
in .env.example and CLAUDE.md).

Frontend: Research > Company Search page (320px master list / flex-1
detail, Overview/Officers/PSCs/Filing history tabs per approved
mock-up), reusing PageHeader, TableToolbar, skeletons and the existing
CompanyPanel (new optional `section` prop); new FilingHistoryList
(lazy-fetched, 25/page, DD/MM/YYYY, Companies House register link);
Research sidebar group with Building2 icon; mikeApi chSearchCompanies /
chGetCompany / chGetFilingHistory; sessionStorage assistant-prefill
handoff ("Continue in Assistant" -> ChatInput initialValue).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
e258501a Docs: BUILD_LOG entry for WS7 PR 2 (Company Search) sloth-ninja 2026-07-19 ↗ GitHub
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
b83a1e4d WS7 review fixes: company-number validation, profile type guard, key-precedence docs sloth-ninja 2026-07-19 ↗ GitHub
commit body
- /companies routes: reject company numbers that aren't strictly
  alphanumeric after normalisation (400, fixed detail) so crafted input
  with path/query metacharacters never reaches the Companies House URL;
  validateCompanyNumber exported + tested.
- company-search page: guard profile narrowing with typeof "object".
- Docs truth fix: key resolution is env-first with per-user BYO fallback
  (userApiKeys.ts seeds env keys first) - corrected CLAUDE.md env
  registry, BUILD_LOG wording and the route header comment. Precedence
  behaviour itself unchanged (open owner decision, PR #25 review).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
93622ea5 Merge origin/main (PR #24 Citation Checker) into ws7-company-search sloth-ninja 2026-07-19 ↗ GitHub
commit body
Conflict resolutions (keep-both throughout):
- AppSidebar.tsx: adopted #24's renderNavItem pattern; the Research group
  now lists both Company Search and Citation Checker (collapsible variant
  from this branch dropped in favour of the merged static group label).
- backend/src/index.ts: both limiters (researchLimiter, citationsLimiter)
  and both mounts (/companies, /citations) kept.
- mikeApi.ts: both the Companies House section and checkCitations kept.
- backend/.env.example: both rate-limit var blocks kept.
- CLAUDE.md: both module-map route entries merged into one row;
  RATE_LIMIT_* count now 16 covering research + citations vars.
- docs/BUILD_LOG.md: both entries kept, this branch's entry first;
  verification updated to the post-merge numbers (vitest 133/133).

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-1170.md from inside the repo you want the changes in.

⬇ Download capture-thread-1170.md