Feat/phase0 quick wins - #8
Merged
Merged
Conversation
…dupe Five pure text→text tools added to the TEXT_TOOLS registry (utils/devTools.js), so each is a validate/format pair that plugs into the existing tool dialog with no new component: - JWT Decode — header + payload as one JSON object (signature never verified) - Epoch / Date — Unix s/ms ↔ ISO 8601 UTC - URL Encode / Decode — toggles on percent-encoding, survives malformed input - HTML Entities Encode / Decode — named, decimal and hex entities - Sort & Dedupe Lines Wired into MENU_ACTIONS + both menus (app + MenuBar); they also appear in the sidebar Tools list automatically (derived from TEXT_TOOLS keys). Hash/checksum and a regex tester are intentionally out of scope here — they need async / a second input, which the single-input sync dialog can't host. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds applyUnifiedDiff(base, patch) — a pure, exact-match unified-diff applier that rejects (never silently misapplies) hunks whose context doesn't match, and returns the rejected indices. Property-tested by round-tripping every patch toUnifiedDiff produces back to the changed side (add/delete/replace, EOF-newline and multi-hunk cases). UX is option A: "Apply Patch…" picks a base file and a .patch, then opens base ↔ patched in the normal diff view so the change is shown, not just written. Wired as diffStore.applyPatch() + the 'apply-patch' action, in the Edit menu (next to Copy Diff as Patch), the MenuBar, and a pinned sidebar Tools button. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A fuzzy palette over every menu command, built by flattening the SAME
buildMenus() the menu bar uses — no duplicated action list. Submenu labels fold
into their leaves ("JSON · Format / Validate") so each command reads on its own;
matching reuses rank() and the keyboard driver is useQuickLookKeys with its
list-only defaults, so all event logic stays in tested composables. Backdrop
dismiss goes through useBackdropClose.
flattenCommands is pure and unit-tested; the overlay styles through design
tokens only. Opens from View → Command Palette… and the MenuBar.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
File → Export Diff as HTML… writes the current comparison (files or paste mode) as a single self-contained document — inline CSS, no external assets, so it opens anywhere and can't phone home — for pasting into a ticket or PR. diffToHtml is pure and unit-tested: it reuses the new diffLines() (factored out of toUnifiedDiff so both share one aligned line list) and escapes every piece of user text and both names, so content can never inject markup. Main only writes the document the renderer built (diff:exportHtml → save dialog). PDF/image can follow later by printing this same HTML. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
File → Import Snippets… reads a chosen file and adds snippets to the encrypted library. A VS Code .code-snippets JSON becomes one snippet per entry; any other file is imported verbatim as a single snippet named after it. parseSnippetImport is a pure, size-capped, shape-validated untrusted-input surface (CLAUDE.md #6) — it only produces drafts; the snippet store re-encrypts each through the existing add()/vault path before anything is stored, so an import can never write undecryptable or unvalidated data. The diff store orchestrates and reports the count via the shared notice. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
mindaugaskasp
added a commit
that referenced
this pull request
Jul 31, 2026
Main brought PRs #8 (phase0 quick wins) and #9 (brand/monoline icon). The merge base was old enough that git saw both sides adding the same features independently, so every conflict was one architecture against its successor. Resolved to this branch's side throughout, because each conflict was the tools rework against what it replaced: - CommandPalette: ours is a strict superset — main's version plus the tools scope (Recent/Other sections, action dispatch, tools-aware placeholder). - textTools.js / devTools.js: main extended the TEXT_TOOLS table with JWT, Epoch, URL, HTML entities and sort-dedupe. All of those exist here as rich panels, and HTML entities and the standalone sort-dedupe were deliberately dropped, so both files stay deleted along with their tests. Nothing imports them (src/main/textTools.js is the unrelated encryption IPC). - diffStore / menus / menu: the same story — showBase64Dialog, showFindReplaceDialog and tools-html are gone here on purpose. - SavedDiffs: main's inline TOOLS array against the extracted ToolsShelf. Main's non-conflicting work is kept: the HTML export, snippet import, unified-diff apply, and commandPalette flattening are all present and their tests run. Conflicts were resolved hunk by hunk rather than with --ours, so main's cleanly-merged changes to those same files survived. 837 unit and 104 e2e pass on the merged tree. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
No description provided.