UI/UX improvements: reorderable sidebar, richer search, partial paste, settings & theme system#1
Conversation
…search - Fix Mermaid "Expand": close the snippet editor first and raise the viewer above all dialogs, so the diagram window actually appears - Restructure Tools into per-format submenus (Base64 / JSON / XML / SQL / Text Encryption) in both the native menu and the in-app menu bar - Add Help → Keyboard Shortcuts listing every shortcut for the host OS, backed by a shared utils/shortcuts.js (also feeds the floating hint bar) - Suppress the macOS-injected Edit → AutoFill item - Remove the redundant "Diff Bro" toolbar title - Diff search: add match-case and whole-word toggles, and guard regex search against ReDoS/over-long patterns (utils/searchRegex.js) - Align the "Saved diffs" header with the Left/Right file-slot labels and add bottom spacing beneath the Snippets section Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6QHAnibiPenmyN7q3Rh4m
- New settingsStore persisted to settings.json (unencrypted): section order, shelf order, shortcut-bar visibility, and user-raisable comparison-file and snippet size limits with safe defaults and hard ceilings - Settings dialog gains an Interface section for the shortcut bar and the two size limits; the shortcut bar now reads its visibility from settings - Enforce the comparison-file limit in the main process (read fresh from settings.json) and the snippet-size limit at save time - Save dialog no longer offers a category when saving as part of a share: categories are a local organizing tool and never travel to a recipient Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6QHAnibiPenmyN7q3Rh4m
- Split the sidebar into self-contained SavedDiffs / External / Snippets sections behind a shared SectionHeader with up/down move controls; the section order persists in settings.json - Saved-diff categories are now drag-reorderable, persisted per-section in settings.shelfOrder and reconciled against the categories that exist - SavedDiffs.vue becomes a thin ordering container; header band styles move into SectionHeader so every section reads and behaves identically Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6QHAnibiPenmyN7q3Rh4m
- Each paste side is independently a textarea or a loaded file (drop onto the pane, or "load file…"), so typed text on one side can be compared against a real file on the other; Compare and snapshot/restore honor both - Paste panes capture their own drops; the window-level diff drop stands down in paste mode - Rework the paste layout with per-side headers and keep the Compare/Cancel actions centered under the two panes Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6QHAnibiPenmyN7q3Rh4m
- Move the color palette into styles/themes.css; tokens.css now holds only the theme-independent scale (radius/type/spacing/control heights), so a future color theme can be added without touching structure or alignment - Add app-wide .section-actions / .section-inset classes and section-rhythm tokens; every sidebar section's action row (+ New category, Import, + New snippet) now draws its inset from one place instead of restating pixel padding, fixing the buttons that sat too close to the section header Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6QHAnibiPenmyN7q3Rh4m
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6QHAnibiPenmyN7q3Rh4m
The viewer's zoom/pan .transform wrapper shrink-wrapped to 0×0, so the diagram rendered into the DOM but collapsed to nothing (the other half of the "Expand shows nothing" report — the first half was the editor covering it). Give .transform a definite box (fill the stage, center its content) so the diagram fits and scales; verified rendering in Chromium. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6QHAnibiPenmyN7q3Rh4m
UI/UX validationThe noVNC/Electron route isn't reachable from CI here (the Docker registry and the Electron binary download are both blocked), so I validated the renderer — where all these changes live — by loading the production build in headless Chromium (Playwright) with a stubbed Verified working, no console errors (only a harmless
One extra bug found and fixed during validationThe Mermaid Expand viewer opened but the diagram was invisible. Root cause: the zoom/pan Generated by Claude Code |
The ReDoS heuristic treated ']' like a group close, so safe patterns such as [-+]+, [ab*]+ and [/*]+ were refused as nested quantifiers. A '*'/'+' before a character-class close is a literal; only a quantified group ')...' can backtrack catastrophically. Narrow the signature to ')' and cover it with a test. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6QHAnibiPenmyN7q3Rh4m
Tests - E2E (Playwright _electron): paste-compare diff stats, save + relaunch reopen (vault encrypt/decrypt round-trip), Share first-time key setup, Mermaid viewer + editor preview SVGs, real OS-clipboard write, on-the-fly category creation, and the editor's live auto-detect indicator. - Unit: useTagInput (commit/dedupe/cap/backspace event logic) and useSnippetFilters (name/tag search, AND-composition, DEFAULT, favorites) — the previously untested composables CLAUDE.md flags as the home for this interaction logic. Auto-detect - detectSnippetLanguage now covers every offered syntax (adds YAML/K8s, Python, shell, PHP, JS, TS, XML, HTML, CSS, Dockerfile, Go, Rust, Java), ordered most-distinctive-first with anti-false-positive guards (fenced block is Markdown not its inner code; TS before JS; HTML-only tags before generic XML; code braces disqualify CSS/YAML). Best-effort — a miss lands on plaintext rather than mis-coloring. Positive + negative test matrix. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A batch of UI/UX improvements. Every commit passes
npm run check(lint + style-token guard + 275 tests) and a fullnpm run build.Menu / toolbar
utils/shortcuts.js(also feeds the floating hint bar).Diff & paste
utils/searchRegex.jsrefuses over-long / catastrophic-backtracking patterns before Monaco ever runs them).Sidebar, settings & sharing
SectionHeader; each section extracted into its own component.settings.jsonstore (stores/settingsStore.js): section order, shelf order, shortcut-bar visibility, and user-raisable comparison-file / snippet size limits with safe defaults and hard ceilings. Main reads it fresh to enforce the large-file threshold; the Settings dialog gains an Interface section.Design system
styles/themes.css;tokens.csskeeps only the theme-independent scale, so a future color theme can't disturb structure/alignment..section-actionsspacing + rhythm tokens, so a section's buttons (+ New category,Import,+ New snippet) can't drift out of alignment again.Notes
.vuefiles are verified there, not in unit tests) — screenshots to follow in the thread.🤖 Generated with Claude Code
Generated by Claude Code