Commit Graph

17 Commits

Author SHA1 Message Date
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 7cbca827b3 Translation pipeline: translate tool, YAML-driven language infrastructure, auto-dispatch
- Add tools/translate: MiniMax/GPT-oss draft → GLM 5 review pipeline via OpenRouter
  Supports 10 templates + YAML, 21 languages, provider routing (Fireworks/Groq)
- portal/main.go: render() auto-picks localized templates (page_xx.tmpl)
  Removes per-handler Lookup boilerplate from landing/pricing/faq handlers
- base.tmpl: dynamic language dropdown from {{.Languages}}, current lang first
- en.yaml: lang_* keys define all 22 languages (YAML-driven, no hardcoded lists)
- All existing YAMLs: added language_name key
- New: tr.yaml (Turkish), translated templates for de/es/nl/da/ja
- Makefile: translate build target

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 23:34:09 -04:00
James ee40b3a81b import-renpho, v2 readings API, dashboard lab chips, portal updates
- Add import-renpho: Go binary to sync Renpho body composition data
  into inou vitals via direct EntryWrite (AES-128/ECB Renpho API client,
  13 body metrics, dedup, auto RBAC grants, -setup/-discover modes)
- Add POST /api/v2/readings endpoint for batch vital ingest
- Fix dashboard lab chip: filter by lab_order not lab_report
- Portal: upload handler, dossier page rework, dashboard updates
- Remove tools/fix-lang (replaced by toolkit translate)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 04:54:58 -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 715fdb9ba6 Fix misleading auth docs and Grok token instruction
api-docs.txt: token is NOT the dossier ID — it's a time-limited encrypted
string. Point users to /connect for token generation.

install_public.tmpl: Grok prompt now points to /connect (Grok tab) for
the token, not /dashboard which doesn't show it.
2026-02-23 02:21:57 -05:00
James d25725b208 Replace legacy bridge flow in install_public.tmpl with OAuth MCP setup
- Remove inou_bridge downloads, Desktop Commander step, manual config editing
- Claude tab now: OAuth connector setup, Sign In, Allow Tools, Custom Instructions, Test
- Fix Grok tab: /api/dossiers → /api/v1/dossiers
- No bridge references remain
2026-02-23 02:01:15 -05:00
James 432c6f80ea Replace legacy bridge download instructions with web MCP setup in NL and RU templates
- Remove inou_bridge_win/darwin download links (fully web-based MCP now)
- Mirror English connect.tmpl structure exactly
- Proper Dutch and Russian translations throughout
- Claude Desktop, Grok, ChatGPT, and Other AI tabs all translated
- Functional prompts (custom instructions, Grok API prompt) kept in English
2026-02-23 01:59:07 -05:00
James 96fec23e22 refactor: rename prompt to tracker everywhere
- Rename prompts table to trackers
- Rename all Prompt types/functions to Tracker
- Rename prompt_id to tracker_id throughout
- Rename API endpoints /api/prompts -> /api/trackers
- Rename URL paths /dossier/{id}/prompts -> /dossier/{id}/trackers
- Rename template files and references
- Add migration script for schema changes
- Next: implement self-contained entries with metadata
2026-02-09 02:05:17 -05:00
James 9781b31c7d feat: fix year interpretation, new schedule format, exclude today from backfill 2026-02-09 02:00:18 -05:00
James 3014f21d72 refactor: prompts UI and LLM API cleanup 2026-02-08 08:30:27 -05:00
James 37b7602027 chore: update DPO contact information across legal pages
- Replace specific DPO name with generic privacy email across all legal templates
- Update DPA to clarify third-party services vs sub-processors distinction
- Add privacy policy and DPA cross-references in Terms
- Add intellectual property section to Terms
- Improve prompts UI with Yes/No buttons, section headers, and better visual hierarchy

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-08 05:13:31 -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 7cd450cb49 feat: link RBAC editor from dossier privacy section
Updated "Edit" button in dossier Privacy section to open new RBAC editor
instead of old access editor. Users can now access granular per-category
permissions directly from the dossier page.

Location: Privacy section → Edit button next to each person with access

Route changed: /dossier/{id}/access/{grantee_id} → /dossier/{id}/rbac/{grantee_id}

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-07 17:39:08 -05:00
James 6980827fa2 feature: add RBAC editor with role templates and per-category permissions
Added comprehensive RBAC editor accessible from dossier permissions page.
Supports quick role presets and granular per-category permission control.

Features:
- Role template dropdown (Family, Doctor, Caregiver, Trainer, Friend, Researcher)
- Automatic checkbox population from role selection
- Base permissions: Read, Write, Delete, Manage
- Per-category permissions for 9 data types
- Manual checkbox override after role selection
- Save/Cancel buttons with confirmation
- Revoke all access option
- Matches existing design system

Components:
- templates/edit_rbac.tmpl: New RBAC editor page
- portal/main.go: handleEditRBAC() handler
- portal/main.go: CategoryRBACView type for per-category ops
- portal/main.go: Updated RoleView with GrantsJSON for JavaScript
- templates/base.tmpl: Added edit_rbac case
- templates/permissions.tmpl: Edit button now links to RBAC editor

UI Design:
- Follows styleguide patterns (data-card, form-group, sg-select)
- Checkbox grid layout for base ops
- Category blocks with 4 operation checkboxes each
- JavaScript for role template application
- Success/error message display

Routing: /dossier/{id}/rbac/{grantee_id}

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-07 17:35:42 -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 94946baf00 Initial commit 2026-02-01 02:43:27 -05:00