James
20c33d2fb2
Document processing pipeline: OpenRouter OCR + Stepfun extraction
...
- Switch OCR from Fireworks Qwen to Gemini 3 Flash via OpenRouter
- Switch extraction/translation to Stepfun Step 3.5 Flash via OpenRouter
- Add CallOpenRouter() to lib/llm.go (OpenAI-compatible API)
- Add OpenRouter API key support to lib/config.go
- Fix extraction preamble causing Stepfun reasoning model to return null content
(heavy user-message preamble → short system message)
- Fix timestamp fallback: no date = 0, not today
- Fix document type: use file extension instead of hardcoded "pdf"
- Fix findUploadByFilename: Value filter was silently ignored, returning all uploads
- Fix entryQuery: skip category filter when EntryID is specified
- Fix extraction prompt contamination: replace real patient examples with generic ones
- Add reprocess button (↻) for document uploads
- Add delete cascade for upload entries (removes created document/extraction entries)
- Add upload/reprocess/delete logging throughout pipeline
- Consolidated templates, translations, email templates, landing pages
- Portal: defense, genome, dossier sections, MCP, OAuth updates
- Tools: translate pipeline improvements
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 05:28:05 -04: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