Commit Graph
69 Commits
Author SHA1 Message Date
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 265edc9009 refactor(admin): drop duplicate users card, full-width panels, demo rebuild copy matches new dataset 2026-10-17 17:04:38 +08:00
root 0fdba1944e feat(assessment): evidence image gallery with lightbox, word export redesigned (A4/tables/annex grid), normGrade maps gold/silver/bronze medals 2026-10-17 17:04:38 +08:00
root b7ad7ef5dc feat(demo): 25 footprints w/ 10 competition awards + real drawn certificate attachments, grade data aligned to gpa formula, seed.mjs reuses demo_seed command layer 2026-10-17 17:04:37 +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 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 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 10fa64b5c8 test: fix raw upload assertions 2026-10-17 09:57:43 +08:00
root 2bba3be08e feat: Lsky/COS gateway - attachments upload direct to object storage (remote_url/remote_thumb), preview loads from COS, graceful local fallback 2026-10-17 01:16:59 +08:00
root a94c1f6e25 ui: mobile-first records card list, responsive filters/paddings across pages, grades table scroll guard 2026-10-16 23:52:58 +08:00
root 275a0313e1 perf+ui: gzip (api/static precompressed), immutable attachment cache, responsive dialogs/header, safe-area + dynamic theme-color, mobile tuning 2026-10-16 23:34:36 +08:00
root 3ba44aa2de feat: unified in-app attachment preview (image/PDF/text/docx via mammoth/xlsx via SheetJS/audio/video) with lazy-loaded renderers 2026-10-16 23:23:08 +08:00
root c25c39a0aa test: adjust restart count after cascade delete 2026-10-16 23:15:02 +08:00
root 07f7cd51b2 feat: server-side attachment thumbnails (480px webp at upload) + session caches - detail grids no longer download full originals 2026-10-16 23:10:44 +08:00