Skip to content

Add spellcheck status label with language picker - #234

Merged
bholmesdev merged 8 commits into
bholmesdev:mainfrom
JoeJoeflyn:feat/spellcheck-label-187
Aug 10, 2026
Merged

Add spellcheck status label with language picker#234
bholmesdev merged 8 commits into
bholmesdev:mainfrom
JoeJoeflyn:feat/spellcheck-label-187

Conversation

@JoeJoeflyn

@JoeJoeflyn JoeJoeflyn commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Description

Add a dropdown next to the word count in the editor footer that shows the active spellcheck language and lets the user switch languages or turn spellcheck off. Choice persists across restarts via spellcheck.json in userData, mirroring the themeSource pattern. Uses Electron's built-in spellchecker; the existing right-click suggestions continue to work.

Closes #187

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation update

Testing

  • Existing tests pass
  • Added new tests for changes
  • Tested manually (describe below)

Manual Testing Details:

  • pnpm build passes (biome, all packages, typecheck)
  • Label appears in footer; dropdown lists available languages
  • Switching language applies underlines; "Off" removes them
  • Choice persists across restarts

Checklist

  • I discussed this change in a GitHub issue before submitting this PR
  • I have run the linter, formatter, and tests to ensure my code is ready for review
screenrecording-2026-08-06_21-16-05-ezgif com-video-to-gif-converter

@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

@JoeJoeflyn is attempting to deploy a commit to the bholmesdev's projects Team on Vercel.

A member of the Team first needs to authorize it.

@JoeJoeflyn
JoeJoeflyn force-pushed the feat/spellcheck-label-187 branch from a913f19 to e742de2 Compare August 6, 2026 14:22

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

Adds a footer spellcheck language picker wired through desktop IPC + spellcheck.json persistence, reusing Electron's built-in spellchecker and existing context-menu suggestions.

Concerns

  • Startup restore and set IPC call setSpellCheckerLanguages without filtering to availableSpellCheckerLanguages. Electron throws on unsupported codes; bad/stale spellcheck.json can crash launch.
  • Set handler trusts renderer payload shape; no runtime type/allowlist check.
  • Renderer optimistically updates UI without handling IPC failure.
  • Diff also includes large unrelated Tailwind class churn (outline-noneoutline-hidden, text-[12px]text-xs) across www/desktop/ui — prefer split or drop from this PR.
  • Product note (no inline): on macOS language list APIs are largely no-ops (OS spellchecker); picker may not change language there even though Off/on can still matter.

Verdict

Found: 1 critical, 2 important, 1 suggestions

Request changes


Reviewed by a Warp Factory agent.

Comment thread apps/desktop/electron/main.ts Outdated
Comment thread apps/desktop/electron/main.ts Outdated
Comment thread apps/desktop/src/App.tsx Outdated
Comment thread apps/desktop/src/App.tsx Outdated
@JoeJoeflyn
JoeJoeflyn force-pushed the feat/spellcheck-label-187 branch from 8827221 to 22fa0cd Compare August 6, 2026 14:34
Closes bholmesdev#187. Adds a dropdown next to the word count in the editor
footer that shows the active spellcheck language and lets the user
switch languages or turn spellcheck off. Choice persists across
restarts via spellcheck.json in userData, mirroring the themeSource
pattern. Languages are validated against availableSpellCheckerLanguages
before being applied to prevent crashes from stale configs. Also
replaces arbitrary Tailwind values with built-in utilities
(text-[12px] → text-xs, rounded-[2px] → rounded-xs,
outline-none → outline-hidden).
@JoeJoeflyn
JoeJoeflyn force-pushed the feat/spellcheck-label-187 branch from 22fa0cd to eacdaaf Compare August 6, 2026 14:34

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

Adds a footer spellcheck language picker (incl. Off), persists via spellcheck.json, and wires desktop IPC → FormattingStatusBar. Matches #187 intent and mirrors the themeSource persistence pattern.

Concerns

  • State desync: startup filters saved languages against availableSpellCheckerLanguages before applying, but desktop:get-spellcheck-state returns the unfiltered saved list. UI can show a language that is not actually active (missing dictionary / platform mismatch / empty valid set).
  • Prefer returning live session state (or the filtered applied config) from get, and only fall back to defaults when nothing is saved.
  • Large unrelated Tailwind churn (outline-noneoutline-hidden, text-[12px]text-xs, etc.) makes the feature harder to review; split or drop if not required.
  • V0 gaps (optional): friendly language labels, source-mode coverage, tests.

Verdict

Found: 0 critical, 1 important, 2 suggestions

Request changes


Reviewed by a Warp Factory agent.

Comment thread apps/desktop/electron/main.ts Outdated
Comment thread apps/desktop/src/App.tsx Outdated
Comment thread apps/desktop/src/components/TerminalPanel.tsx Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

Follow-up reworks spellcheck UX: Settings toggle + multi-language picker (Win/Linux), footer mismatch chip when active language ≠ system, live session state via IPC, restore after app.whenReady() with allowlisted setSpellCheckerLanguages.

Prior findings

  • Addressed: module-load restore crash; unfiltered get vs applied langs; allowlist before setSpellCheckerLanguages; macOS language picker no-op called out in UI; large Tailwind churn largely walked back.
  • Open (non-blocking): optimistic renderer updates still ignore IPC failure; IPC setters still trust payload shape.

Concerns

  • set-spellcheck-languages / applySpellcheckLanguages assume languages is an array — bad payload throws.
  • changeSpellcheck* still updates UI before await.
  • Mismatch label still falls back to hardcoded en-US if languages is empty.

Verdict

Found: 0 critical, 0 important, 4 suggestions

Approve with nits


Reviewed by a Warp Factory agent.

Comment thread apps/desktop/electron/main.ts Outdated
Comment thread apps/desktop/electron/main.ts Outdated
Comment thread apps/desktop/src/App.tsx Outdated
Comment thread apps/desktop/src/App.tsx Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

Follow-up polish on spellcheck settings: multi-language footer status, stricter isDefaultLanguage (single system-base lang hides chip), picker UX, and unit tests. Prior blockers remain fixed — restore after whenReady, allowlisted setSpellCheckerLanguages, live session state from get.

Prior findings

  • Addressed: startup crash, unfiltered get vs applied langs, allowlist before set, macOS no-op called out, Tailwind churn gone, multi-lang footer label.
  • Still open (non-blocking): IPC payload coercion; optimistic renderer updates; empty-languages en-US label fallback.

Delta

  • isDefaultLanguage + tests look correct for “one regional variant = default”.
  • Status chip multi-lang formatting is fine.
  • No new correctness/security regressions in the delta.

Verdict

Found: 0 critical, 0 important, 4 suggestions

Approve with nits


Reviewed by a Warp Factory agent.

Comment thread apps/desktop/electron/main.ts Outdated
Comment thread apps/desktop/electron/main.ts Outdated
Comment thread apps/desktop/src/App.tsx Outdated
Comment thread apps/desktop/src/App.tsx Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

Spellcheck settings + footer mismatch chip for Win/Linux: persist via spellcheck.json, live session state over IPC, restore after app.whenReady() with allowlisted setSpellCheckerLanguages. Latest delta closes remaining nits (IPC coercion, await+refetch UI, drop en-US fallback).

Prior findings

  • Addressed: startup crash; unfiltered get vs applied langs; allowlist before set; macOS no-op called out; Tailwind churn gone; payload coercion; optimistic UI; empty-languages label.
  • Delta: getPreferredSystemLanguages()[0] for system lang; chip gated on non-empty languages; helper copy trimmed.

Concerns

None blocking. Optional later: source-mode chip, friendlier multi-lang picker copy.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve


Reviewed by a Warp Factory agent.

@bholmesdev

Copy link
Copy Markdown
Owner

Thanks for contributing @JoeJoeflyn! I've refined the implementation to match Obsidian's defaults:

  • Add a spellcheck global setting to enable / disable, with a dropdown to select dictionaries
  • Show the charm in the footer only when dictionaries differ from your system defaults (not possible on macOS, only on Windows and Linux)

@bholmesdev
bholmesdev merged commit fc2eb4b into bholmesdev:main Aug 10, 2026
5 of 6 checks passed
@JoeJoeflyn

Copy link
Copy Markdown
Contributor Author

Thanks for contributing @JoeJoeflyn! I've refined the implementation to match Obsidian's defaults:

  • Add a spellcheck global setting to enable / disable, with a dropdown to select dictionaries
  • Show the charm in the footer only when dictionaries differ from your system defaults (not possible on macOS, only on Windows and Linux)

thanks again, Ben!

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.

Add autocorrect status label (with language & disable option) next to word count

2 participants