Commit Graph
76 Commits
Author SHA1 Message Date
root a5e976fee6 polish(ui): design language uplift - press feedback, brand gradient, header glass, route icon chips, empty states
- button: unified press scale (active:scale-[0.97]), primary gets vertical
  brand gradient + tighter shadow, secondary gains subtle hover shadow
- input/select/textarea: consistent focus border + 1.5px brand ring
- empty states: icon in circular tinted badge with soft ring, larger rhythm
- header: translucent frosted-glass surface (color-mix + backdrop blur),
  per-route lucide icon chip beside page title (desktop), subtitle hidden
  on phones to declutter
- sidebar: active nav icon tinted brand via .nav-active > svg; user card
  avatar gets brand gradient + ring
- dark theme: text-3 contrast raised (#68707e -> #747c8a)
- verified live (headless): h1/chips/glass render on dashboard/timeline/
  assessment/resume; tsc + vite build green; temp instrumentation reverted
2026-10-17 22:33:39 +08:00
root 8cdf8b44fa docs: refresh public docs for current codebase, add SECURITY.md
- README: real counts (44 commands, 61 integration asserts, demo=25 records
  + 4 semesters + 7 attachments), add resume/assessment module features,
  env vars incl. LSKY, doc navigation table, done-roadmap items checked
- docs/api.md: /auth/logout, admin users/demo-rebuild/sync-lsky routes,
  attachment thumb/download channels, profile_upsert top-key merge
  semantics, full footprint_list query reference, 44-command table
- sync-server/README: replace stale ADMIN_TOKEN/X-Admin-Token admin section
  (actual is_admin Bearer model), add go-live checklist, backup note for WAL
- CHANGELOG: add Unreleased section (resume/assessment modules, security
  fixes, perf tuning)
- CONTRIBUTING: 61 asserts, security-sensitive-change guidance, perf baseline
  table, security issue routing
- docs/SECURITY.md: new - report channel, threat model table, hardening
  summary, known tradeoffs
- LICENSE: ensure MIT file matches README badge
2026-10-17 22:27:56 +08:00
root 88525a3f9f perf(db): WAL + synchronous=NORMAL + 8MB page cache for per-user dbs, throttled device last_seen writes
- openDb pragmas: journal_mode=WAL, synchronous=NORMAL, temp_store=MEMORY,
  cache_size=-8000; 3000-record stress write throughput 9514ms -> 1241ms
  (7.7x), single upsert ~0.3ms; read paths unchanged (<=22ms)
- authUser: devices.last_seen_at now written only when stale > 60s,
  removing one write per authenticated request (write amplification)
2026-10-17 22:09:48 +08:00
root 17ab5f0390 security(review): fix invite bypass via smuggled seed flag, login rate limit, server-side logout, attachment preview XSS hardening
- /auth/register: strip client-supplied seed flag (PoC confirmed it bypassed
  invite code, MAX_USERS quota AND first-user auto-admin, granting admin
  without any credential); demo-rebuild internal path unaffected
- /auth/login: per-IP+username of 5 consecutive failures gets a 10-minute
  cooldown against in-memory counter (brute-force guard)
- /auth/logout: new endpoint revokes the current Bearer token server-side;
  frontend calls it (best-effort) before local clearToken on sidebar logout
- attachment docx/xlsx preview: sanitize generated HTML (strip scripts,
  event handlers, dangerous protocols) before dangerouslySetInnerHTML
  render, preventing token theft via malicious previewed documents

PoC suite: seed smuggling rejected, 429 on 6th login attempt, token dead
after logout, per-user isolation intact (403/401/404 as before);
integration 61/61 green
2026-10-17 21:18:55 +08:00
root 3613b9f5e1 polish(ui): full-system layout audit, header titles for all routes, dialog title truncation
- headless DOM audit (Edge dump, 1440/390 x 10 routes): no real horizontal page overflow on any screen size; timeline bleed & drawer offsets are intentional and verified benign
- header now labels profile/resume/assessment/admin routes (was blank h1 on those pages)
- dialog header truncates long titles instead of pushing controls out
- page containers audited for consistent rhythm (1080/1280/880 widths share identical paddings)
- www rebuilt, temp instrumentation removed
2026-10-17 19:51:52 +08:00
root a668647f35 fix(audit): profile_upsert top-key merge, scoring badge recordIds, zc item contract
- profile_upsert now merges top-level keys (info/resume/zongce are independent sub-documents); previously any page saving its own slice silently wiped the other two (profile save lost zongce rules, assessment save lost resume, resume save lost zongce)
- ZcItem gains recordIds: aggregated cap items (wcap/ccap/kcap/gcap/hcap) expose the records they aggregate, so the evidence gallery scored/unscored badge works (matchedIds was always empty before)
- add regression coverage notes; www rebuilt
2026-10-17 19:13:58 +08:00
root ba448946c9 fix(assessment): clickable rules panel at top, print-layout word doc polish
- scoring rules panel moved above the sheet and auto-scrolls into view on toggle (was rendered at the very bottom, felt unresponsive)
- word export: unified single spec table with numbered section rows (one/two/three...), subtotal and total rows, editorial heading fonts
- standardized fonts and metrics: body SimSun 10.5pt, headings SimHei, numerals Times New Roman, line-height, A4 margins 72/78/66pt
- footer with PAGE/NUMPAGES fields via mso-element footer, Word opens in Print layout view
- evidence captions and rules annex restyled to match; www rebuilt
2026-10-17 17:48:16 +08:00
root 11cfeeb3a6 feat(assessment): unified GPA source, full evidence gallery, editable scoring rules, 3x3 info with phone
- fix per-year computation: termYearOf parses semester terms (2023-2024-1) so year Scots no longer skipped the semester filter (previous bug made yearly score empty)
- academic score now uses semester.gpa shown on grades page (single source of truth); fallback recalculates with the same band-linear + category weights formula
- gradeLabel infers grade year (freshman/sophomore) from eduStart, falls back to earliest semester year
- info grid 3x3 with phone number as the 9th cell (page + word export)
- evidence gallery shows every activity/competition record with attachments in scope (no 2-image cap), records marked scored/unscored
- scoring rules reference panel: default rules editable and persisted with profile; restore-default button; no college/school names in citations
- word export mirrors all of the above, adds rules annex table; removed dead zongceWord.ts with school citation
- sync-server/www rebuilt
2026-10-17 17:33:49 +08:00
root d534cae0e1 feat(admin): delete user wipes all remote/local data (blobs + sqlite + changes), invite holder_gone mark
\u9080\u8bf7\u7801\u5df2\u7528\u4f46\u6301\u6709\u4eba\u88ab\u6ce8\u9500\u65f6\u7ba1\u7406\u9875\u5c55\u793a\u5df2\u9500\u6237\u5f82\u7ae0\u4e0e\u7b5b\u9009\u3002
2026-10-17 17:04:51 +08:00
root 48aa5dc07f feat(admin): account deletion wipes all remote/local data (blobs+sqlite+changes), invites mark holder_gone; UI: invite \u5df2\u9500\u6237 badge + filter 2026-10-17 17:04:37 +08:00
root 3d2d064920 fix(assessment): academic year selector derived correct year from term (was breaking range filter) 2026-10-17 16:13:41 +08:00
root 595be0d928 fix: DEMO_RESUME declared before use 2026-10-17 16:08:55 +08:00
root caa5cac7b7 test: demo seed now 18 footprints across two academic years 2026-10-17 16:05:34 +08:00
root 49d8400722 feat(assessment): auto comprehensive assessment - rules engine from college scoring standard, per-semester stats, manual overrides, word export 2026-10-17 15:40:07 +08:00
root a0e2ded426 feat(grades): gpa formula system - linear per-band gp (start~top), course category weights (editable), formula display, seed aligned to school standard 2026-10-17 15:30:15 +08:00
root f075f45b7c test: move demo-rebuild assertion to end of phase A (reseed invalidates earlier fixture) 2026-10-17 15:11:50 +08:00
root 216d18c843 fix: lazy DATA_DIR in sync db (multi-instance safe), demo never admin, first real user auto-promoted 2026-10-17 14:59:23 +08:00
root e5269a23ac feat(resume): clear-all option in initialize dialog (structure kept, content emptied) 2026-10-17 14:44:03 +08:00
root a0dc671006 feat(resume): initialize (reset to defaults with confirmation) and reload actions 2026-10-17 14:39:12 +08:00
root 5f3482538f feat(resume): v3 flexibility - custom list sections, item reorder, info field visibility, header toggles, config io, migration persistence fix 2026-10-17 14:34:06 +08:00
root 40661aa685 feat: editable gpa formula via bands, resume edu format per template, dedupe sections, word photo size, text justify 2026-10-17 14:17:43 +08:00
root b48c36fdb3 feat(admin): demo account rebuild button + user asset registry (photo keys cascade-deleted with user) 2026-10-17 13:59:18 +08:00
root 6a97590f90 fix(profile): photo upload no longer wipes saved info; mobile layout polish for profile and resume 2026-10-17 13:43:09 +08:00
root 78bfe188b6 fix(admin): cascade delete user tokens; test invite cleanup 2026-10-17 13:40:45 +08:00
root 5452611a63 feat(admin): user management - list + high-risk delete with full cascade (lsky, user db, attachments, auth) 2026-10-17 13:37:15 +08:00
root 68043d309e feat: fictional demo persona (profile seed), word export mirrors preview layout, print scrollbar fix 2026-10-17 13:23:36 +08:00
root 603e39d2bd feat(resume): editable dates (items + education), profile-field quick save, panel independent scroll 2026-10-17 13:15:13 +08:00
root 4f7978b129 feat(resume): education section from profile + click-to-edit inline editing + overrides 2026-10-17 13:01:54 +08:00
root 9d2e14b72a fix(resume): remove shadowing local ResumeSectionCfg (use types.ts with edu kind) 2026-10-17 12:48:13 +08:00
root f95efd481f fix(resume): remove toast line from ListSectionEditor type 2026-10-17 12:31:33 +08:00
root 013c9fb929 feat: profile page + resume builder (section reorder/enable, word/pdf export) 2026-10-17 12:14:01 +08:00
root 500d59ba58 fix: profile_upsert payload binding 2026-10-17 12:05:56 +08:00
root 7331111379 fix(grades): semester card header wraps on mobile - badges and buttons no longer overflow card width 2026-10-17 11:58:37 +08:00
root 0905cebb02 ui(grades): mobile course cards + inline add/edit forms (table desktop-only), band row range-pill redesign 2026-10-17 11:55:24 +08:00
root 07b3a0490e fix(mobile): timeline filter bar restructure (grid closes properly, responsive selects) 2026-10-17 11:42:23 +08:00
root 0eef3724bb fix: rewrite RecordsPage - mobile card list no longer nested in hidden desktop container (was invisible on phones) 2026-10-17 11:38:07 +08:00
root 58db8652c8 ui: responsive proportions - implicit column overflow fixes, meta grid single-col on mobile, consistent page max-widths, admin rows wrap 2026-10-17 11:28:32 +08:00
root 5ad9e8db64 ui: uniform badge sizing across record rows + fixed-width right-aligned label column in detail meta grid 2026-10-17 11:25:49 +08:00
root e0fcca75b1 ui: dialogs vertically centered (my-auto, no top-clipping), record title promoted as emphasized heading in detail 2026-10-17 11:18:25 +08:00
root a0aa77dfda feat: filename-aware attachment download endpoint (Content-Disposition), preview download uses it (no popup flash) 2026-10-17 11:07:00 +08:00
root 6d686c1d69 fix: attachment download - remote opens in new tab (sync, no CORS fetch), local downloads get toast feedback 2026-10-17 11:02:53 +08:00
root cf4647f706 chore: remove dead code (lib/file.ts, unused attachmentAdd export) 2026-10-17 10:48:52 +08:00
root 74884ce73a feat: custom types can bind a field layout (profile) - layout select in type editor, respected in record form 2026-10-17 10:45:04 +08:00
root 79dada4226 ui: type-aware editor form + detail reordered by importance 2026-10-17 10:39:01 +08:00
root 4a73fddd0c ui: portal-based dropdown (no clipping in scroll containers, viewport-aware flip/clamp, close on scroll) 2026-10-17 10:18:42 +08:00
root c39a4c80d5 feat: delete remote images from Lsky when record/attachment is deleted (keys stored at upload, legacy URLs resolved via pathname) 2026-10-17 10:10:19 +08:00
root fdf383a832 fix: trim LSKY env values and strip accidental Bearer prefix 2026-10-17 10:02:35 +08:00
root 10fa64b5c8 test: fix raw upload assertions 2026-10-17 09:57:43 +08:00
root f24088f359 fix: add sync-lsky to admin route gate (404 on migrate call) 2026-10-17 09:35:04 +08:00
root 102a55d010 fix: lsky gateway reads links.url + strategy_id support (COS strategy verified end-to-end: https cos url, public access ok) 2026-10-17 09:26:06 +08:00