fix(web): theme-aware manage page, proper i18n keys, remove dead code#76
Merged
Merged
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
slate/Tailwind colors that ignored the light/dark theme toggle)
(theme_light/theme_dark -> show_password/hide_password)
(were hardcoded English strings)
https://claude.ai/code/session_011hi4i5yS2jZwA74WwtZnw4