Skip to content

fix(web): theme-aware manage page, proper i18n keys, remove dead code#76

Merged
louisbels merged 4 commits into
mainfrom
claude/project-optimization-review-OJjfP
Jun 1, 2026
Merged

fix(web): theme-aware manage page, proper i18n keys, remove dead code#76
louisbels merged 4 commits into
mainfrom
claude/project-optimization-review-OJjfP

Conversation

@louisbels
Copy link
Copy Markdown
Member

  • Rewrite note manage page with CSS variable theming (was hardcoded
    slate/Tailwind colors that ignored the light/dark theme toggle)
  • Fix password visibility toggle using wrong i18n keys
    (theme_light/theme_dark -> show_password/hide_password)
  • Localize the password generate button and Markdown toolbar titles
    (were hardcoded English strings)
  • Add the new keys to all 10 locales (key parity preserved)
  • Remove duplicate maxTotalSize derived value (identical to maxFileSize)
  • Remove unused SkeletonLoader component

https://claude.ai/code/session_011hi4i5yS2jZwA74WwtZnw4

claude added 4 commits June 1, 2026 20:14
- Rewrite note manage page with CSS variable theming (was hardcoded
  slate/Tailwind colors that ignored the light/dark theme toggle)
- Fix password visibility toggle using wrong i18n keys
  (theme_light/theme_dark -> show_password/hide_password)
- Localize the password generate button and Markdown toolbar titles
  (were hardcoded English strings)
- Add the new keys to all 10 locales (key parity preserved)
- Remove duplicate maxTotalSize derived value (identical to maxFileSize)
- Remove unused SkeletonLoader component

https://claude.ai/code/session_011hi4i5yS2jZwA74WwtZnw4
…a with Zod

- Add isValidNoteId() and uploadSessionMetadataSchema to @secret/shared:
  the note ID format and upload session metadata shape are now defined
  in a single place
- openapi-routes.ts reuses the shared noteIdSchema instead of
  redefining the regex/length
- /raw and /stream routes use isValidNoteId() instead of inline regexes
- /upload/:id/complete validates persisted session metadata with Zod
  instead of a blind type cast — corrupted rows (bad JSON or wrong
  shape) now consistently return 500 instead of inserting malformed notes
- chunkedUploadInitSchema is now derived from uploadSessionMetadataSchema
  (extend) to avoid duplicating field definitions
- Add tests for isValidNoteId, uploadSessionMetadataSchema, and the
  wrong-shape metadata path

https://claude.ai/code/session_011hi4i5yS2jZwA74WwtZnw4
…er chunk deletion

- /notes/:id/stream now prefetches up to 4 chunk reads in parallel
  (read-ahead window) so per-chunk storage latency - one round-trip per
  chunk on S3 - overlaps with decryption/streaming instead of adding up
  sequentially. Chunk order is preserved; prefetch rejections are
  captured as values so they can never become unhandled rejections.
- Rate limiter evicts every expired entry in one sweep when the store is
  full, instead of one entry per request, so sustained traffic cannot
  starve new clients.
- LocalStorage.deleteChunks uses a single recursive directory removal
  instead of N unlink calls plus a directory removal.
- Add tests: chunk ordering with more chunks than the prefetch window,
  and mid-stream chunk read failure.

https://claude.ai/code/session_011hi4i5yS2jZwA74WwtZnw4
…ted utils

The create page (1113 lines) and view page (641 lines) mixed form UI,
clipboard handling, password logic, file previews, and success display
in single components. Split into:

Components:
- SuccessView.svelte - share link / QR / password / facts screen
- FileDropZone.svelte - drag & drop file picker (also fixes the nested
  <button> hydration warning by using a div[role=button])
- SecuritySettings.svelte - password + expiry + max reads settings
- FileCard.svelte - decrypted file preview/download card

Utilities (pure, unit-tested):
- utils/fileType.ts - MIME type categorization for previews
- utils/password.ts - password generation + strength scoring
- utils/clipboard.ts - copy-with-feedback helper (replaces 4 duplicated
  copy/timeout implementations)

Pages now only orchestrate state and compose components:
- create page: 1113 -> 367 lines
- view page: 641 -> 547 lines

All behavior preserved; 37 web unit tests (22 new).

https://claude.ai/code/session_011hi4i5yS2jZwA74WwtZnw4
@louisbels louisbels merged commit 7a599ee into main Jun 1, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants