Commit Graph

14 Commits

Author SHA1 Message Date
James ade93669d3 chore: commit accumulated WIP (Mar 23)
Modified:
- api/api_contact_sheet.go, api/api_image.go — image/contact sheet cleanup
- cmd/import-lab/main.go — minor fix
- docs/schema-auth.sql — auth schema updates
- lib/normalize.go, lib/stubs.go — normalization refactor
- portal/defense.go — new defense middleware
- portal/dossier_sections.go — section updates
- portal/genome.go — genome fix
- portal/main.go — main portal updates
- portal/mcp_http.go, portal/mcp_tools.go — MCP refactor
- portal/static/viewer.js — viewer fix
- marketing/twitter/header-FINAL.png — updated asset

New files:
- portal/oauth_chatgpt.go — ChatGPT OAuth integration
- lib/loinc.go — LOINC code lookup
- lib/render.go — rendering engine
- lib/Sora-Regular.ttf, lib/Sora-SemiBold.ttf — fonts
- docs/chatgpt-actions-setup.md, docs/openapi.yaml — docs
- portal/static/claditor-logo.css — styling
- web/static/genetics.html — genetics page
- tools/loinc-lookup/ — LOINC lookup tool
- marketing/screens/ — screenshots
- import-renpho/import-renpho — renpho binary
2026-03-23 12:11:13 -04:00
James c0e7362970 chore: auto-commit uncommitted changes 2026-03-18 20:01:05 -04:00
James a2141bb5d3 Checkpoint: all pending changes across lib, portal, api, tools
Extraction prompts refined, dossier sections expanded, MCP tools
enhanced, genome/oauth/upload improvements, health-poller added,
import-genome removed, landing/pricing/dashboard template updates,
carousel images, consent/docs templates, rquery/dbquery tools,
CLAUDE.md and docs updates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 23:37:44 -04:00
James 93643d285b Code review 2026-02-28: fix critical/high findings + full review report
Critical fixes:
- CR-001: Remove auth backdoor code 250365 (lib/dbcore.go)

High fixes:
- HI-001: Fix CORS wildcard to use origin allowlist (portal/api_mobile.go, portal/mcp_http.go)
- HI-002: Fix LOINC skip logic - skip only if BOTH SearchKey2 AND LOINC are set (lib/normalize.go)

Also added:
- Full code review report at docs/CODE-REVIEW-2026-02-28.md

14 issues found: 2 critical, 4 high, 5 medium, 3 low
3 fixes applied, remaining are documented for follow-up
2026-02-28 07:20:38 -05:00
James 033d558535 Portal: upload handler, dossier rework, dashboard updates, normalize fixes
- portal/upload.go: new file upload handler (360 lines)
- portal/templates/dossier.tmpl: major rework (469 changes)
- portal/templates/upload.tmpl, dashboard.tmpl: UI updates
- lib/normalize.go, llm.go, config.go: library fixes
- portal/dossier_sections.go, main.go: portal logic
- portal/lang/en.yaml: string updates
- cmd/populate-search-key: search key population tool
- Makefile, style.css: build and style updates
2026-02-25 20:01:11 -05:00
James cc1dd7690c Lab reference charts, import tracking, DossierFromEntry consolidation
- Fix lab chart reference bands: parse DOB in DossierFromEntry, generate
  deterministic ref_ids in import-caliper (was collapsing 4363 rows to 1)
- Consolidate DossierFromEntry into lib/dbcore.go (eliminate portal duplicate)
- Add Import field to entries for batch undo (NextImportID, all import paths)
- MyChart direct JSON parsing (skip Gemini for structured lab data)
- Multi-order extraction from markdown/text tables
- Normalize progress callback for UI feedback
- DICOM import, genome import, API, portal, MCP, translation updates
- Remove test DICOM data from repo

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 05:15:03 -05:00
James 75e9ec7722 Refactor: Remove legacy v2, data, roles modules; update auth, queries, translations, portal MCP tools 2026-02-13 15:30:22 -05:00
James 6486a52ad9 refactor: complete RBAC redesign with hierarchical permissions
Simplify access control from 500+ lines to ~50 lines of core logic:
- New permission bitmask (PermRead/Write/Delete/Manage)
- Hierarchical access (dossier → category → entry)
- Single choke points: CheckAccess(), EntryQuery(), DossierQuery()
- All data access now enforced through lib RBAC layer
- Removed complex role templates and permission caching

Also improved NewID() to use UUID v4 + SHA-256 hash for better
randomness distribution (was limited to 0-7 hex start).

Net -210 lines across 28 files. Ready for staging deployment.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-11 00:06:02 -05:00
James 9781b31c7d feat: fix year interpretation, new schedule format, exclude today from backfill 2026-02-09 02:00:18 -05:00
James 35e9e2a84b feat: add Terms of Service page and legal page updates
- Add /legal/terms with comprehensive ToS content
- Add terms link to footer navigation
- Add /legal/terms to defense.go whitelist for external access
- Update privacy policy and DPA templates with improved styling
- Refactor RBAC editor template formatting
- Add prompts AI setup documentation
- Include database migration scripts

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-08 04:59:59 -05:00
James c1cd76559d fix: genome query RBAC - use system context for data access
- Updated all genome functions to accept AccessContext parameter
- GenomeGetExtraction, GenomeGetTiers, GenomeGetTierByCategory,
  GenomeGetVariants, GenomeGetVariantsByTier now pass context to EntryList
- API genome handler uses system context after dossier access check
- Categories endpoint uses system context for counting operations
- Fixes MCP query_genome returning 403/no data errors

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-07 16:31:17 -05:00
Johan 9190ca1443 Merge remote 'Initial commit from dev' with local master
Conflicts resolved:
- soc2 docs: used remote (updated versions)
- go.mod/go.sum: kept local (full dependencies)
- lib/*.go: kept local (production FIPS, no hardcoded keys)
- .gitignore: kept local (comprehensive)
- test/*.sh: kept local (executable permissions)

Includes: Flutter app, design system, templates, static assets
2026-02-01 04:00:45 -05:00
Johan Jongsma dd160f8451 Initial commit from dev 2026-02-01 08:03:12 +00:00
Johan 94946baf00 Initial commit 2026-02-01 02:43:27 -05:00