Skip to content

Desktop bug sweep and UX stabilisation#196

Merged
ScottMorris merged 29 commits intomainfrom
fix/bug-sweep-2026-02-11
Feb 12, 2026
Merged

Desktop bug sweep and UX stabilisation#196
ScottMorris merged 29 commits intomainfrom
fix/bug-sweep-2026-02-11

Conversation

@ScottMorris
Copy link
Copy Markdown
Owner

@ScottMorris ScottMorris commented Feb 12, 2026

Summary

This PR contains the desktop bug-sweep fixes from fix/bug-sweep-2026-02-11.

Scope includes settings defaults/alignment, editor/preview behaviours, context menus, file-tree drag/drop UX, Linux startup hardening, and title-bar Always on Top state/indicator fixes.

Included

Issues

Resolves #159
Resolves #160
Resolves #161
Resolves #162
Resolves #163
Resolves #164
Resolves #165
Resolves #166
Resolves #167
Resolves #168
Resolves #169
Resolves #170
Refs #171
Resolves #172
Resolves #173
Resolves #174
Resolves #175
Resolves #176
Resolves #177
Resolves #178
Resolves #179
Resolves #180
Resolves #181
Resolves #182
Resolves #183
Resolves #184
Resolves #185
Resolves #186
Resolves #187
Resolves #188
Resolves #189
Refs #190
Resolves #191
Refs #192
Resolves #193
Resolves #194
Resolves #195

Unresolved Follow-ups

  • Refs #171 context-menu/scrollbar occlusion remains environment-specific and unresolved
  • Refs #190 top-level drop-hover precision follow-up remains open
  • Refs #192 subtree drag-start reliability remains open

…tion

## Summary
Fix two appearance settings bugs in desktop:
1. align first-run Font size slider value with app default font size
2. show system accent colour option only on Linux and use Canadian spelling

## Changes
- add shared `DEFAULT_FONT_SIZE` constant and use it for app fallback rendering
- extend slider control with `defaultValue` support and apply it to `appearance.fontSize`
- gate `Use system accent colour` row to Linux only in settings schema
- pass Linux platform context into settings schema generation in settings modal
- add schema tests for Linux gating, Canadian spelling, and font-size default alignment
- update triage log entries for both bugs with repro, scope, and verification notes

## Verification
- `pnpm --filter @liminal-notes/desktop test -- src/components/Settings/schemas.test.ts` (pass)
- `pnpm --filter @liminal-notes/desktop lint` (pass)

## Notes
The triage log remains a temporary branch artefact and will be cleaned from final PR history.

Resolves #159
Resolves #160
## Summary
Fix three desktop Editor settings regressions:
1. restore missing Highlight active line setting (default off)
2. make Word wrap default on
3. make Enable spellcheck default on in settings UI

## Changes
- add `Highlight active line` row to Settings -> Editor behaviour controls
- wire active-line highlighting in `CodeMirrorEditor` to `editor.highlightActiveLine` instead of always-on
- default word-wrap runtime behaviour to enabled when setting is unset
- add boolean `defaultValue` support in settings controls so first-run toggle states are accurate
- set schema defaults: `editor.wordWrap=true`, `editor.spellcheck.enabled=true`, `editor.highlightActiveLine=false`
- add schema tests for restored control and default values
- append triage log entries for BUG-20260211-03/04/05

## Verification
- `pnpm --filter @liminal-notes/desktop test -- src/components/Settings/schemas.test.ts` (pass)
- `pnpm --filter @liminal-notes/desktop lint` (pass)

## Notes
The triage log remains a temporary branch artefact and will be cleaned from final PR history.

Resolves #161
Resolves #162
Resolves #163
## Summary
Align `Show line numbers` defaults between Settings UI and editor runtime.

## Changes
- set `editor.showLineNumbers` schema default to `false`
- change editor runtime fallback so line numbers are shown only when setting is explicitly `true`
- add schema test to enforce default-off behaviour
- add triage entry `BUG-20260211-06` with issue-draft metadata

## Verification
- `pnpm --filter @liminal-notes/desktop test -- src/components/Settings/schemas.test.ts` (pass)
- `pnpm --filter @liminal-notes/desktop lint` (pass)

## Notes
The triage log remains a temporary branch artefact and will be cleaned from final PR history.

Resolves #164
## Summary
Restore the missing left frame border around the desktop editor area.

## Changes
- add `.document-column { border-left: 1px solid var(--ln-border); }` to align frame edges visually
- add triage entry `BUG-20260211-07` with screenshot evidence path
- record that `docs/bug-triage-screenshots/` is a temporary triage artefact to be cleaned with the triage log

## Verification
- `pnpm --filter @liminal-notes/desktop lint` (pass)

## Notes
This is a visual CSS fix; no dedicated automated visual regression test exists yet.
The triage log and screenshot folder remain temporary branch artefacts and will be cleaned from final PR history.

Resolves #165
## Summary
Address two desktop editor issues:
1. YAML front matter appears in markdown preview and should be hidden by default
2. desktop lacks a Developer `Show front matter` toggle available on mobile

## Changes
- add `buildPreviewContent` utility to strip front matter by default before preview rendering
- keep a developer-controlled escape hatch: when `developer.showFrontmatter` is enabled, preview keeps front matter visible
- add desktop Developer settings section with `Show front matter` (default `false`)
- wire CodeMirror front matter hider to `developer.showFrontmatter` so editor and preview stay aligned
- include developer section in Settings modal Developer group
- add persistent tests for preview content processing and developer schema defaults
- add triage entries `BUG-20260211-08` and `BUG-20260211-09` with screenshot evidence reference

## Verification
- `pnpm --filter @liminal-notes/desktop test -- src/components/Editor/previewContent.test.ts src/components/Settings/schemas.test.ts` (pass)
- `pnpm --filter @liminal-notes/desktop lint` (pass)

## Notes
`docs/bug-triage-screenshots/` remains a temporary local artefact for later GitHub issue attachment and is not included in this commit.
The triage log remains a temporary branch artefact and will be cleaned from final PR history.

Resolves #166
Resolves #167
## Summary
Address desktop right-click behaviour issues by suppressing native webview context menus and adding file explorer empty-space actions.

## Changes
- add global app-level `contextmenu` suppression to prevent native webview menu popups
- add file-tree empty-space context menu using project `ContextMenu`
- include `Add New Note` and `Add New Folder` entries in empty-space menu
- wire folder creation to persist `<folder>/.keep` marker and refresh tree
- add `createEmptySpaceMenuModel` helper with unit coverage
- add triage entries `BUG-20260211-10` and `BUG-20260211-11`

## Verification
- `pnpm --filter @liminal-notes/desktop test -- src/components/FileTree.test.ts` (pass)
- `pnpm --filter @liminal-notes/desktop lint` (pass)

## Notes
`docs/bug-triage-screenshots/` remains an untracked temporary artefact for later issue attachments.
The triage log remains a temporary branch artefact and will be cleaned from final PR history.

Resolves #168
Resolves #169
## Summary
Make file explorer empty-space context menu available across the full visible pane.

## Changes
- set `.file-tree` to `min-height: 100%` so its context-menu handler covers lower open space
- add follow-up triage entry `BUG-20260211-12` documenting the hit-area regression and fix

## Verification
- `pnpm --filter @liminal-notes/desktop lint` (pass)

## Notes
This is a follow-up to BUG-20260211-11 after confirming menu visibility in real UI interaction.
The triage log remains a temporary branch artefact and will be cleaned from final PR history.

Resolves #170
## Summary
Prevent project context menus from rendering beneath overlay scrollbars.

## Changes
- raise context menu and submenu z-index to near-max stack levels
- add scrollbar-gutter-aware viewport clamping for main context menu positioning
- add equivalent gutter-aware clamping for submenu positioning
- log issue details in triage as `BUG-20260211-13`

## Verification
- `pnpm --filter @liminal-notes/desktop lint` (pass)

## Notes
User-reported screenshot capture is difficult because menu closes on capture interaction.
The triage log remains a temporary branch artefact and will be cleaned from final PR history.

Refs #171
## Summary
Mitigate Linux container/X11 startup failures that abort with `MIT-SHM` `BadAccess`.

## Changes
- add `GDK_DISABLE_XSHM=1` in Linux container+X11 bootstrap path
- ensure `GDK_DISABLE` includes `shm` for GTK-level shared memory disablement
- keep existing `GDK_DISABLE_SHM=1` and WebKit software/container flags
- extend bootstrap diagnostic log with `GDK_DISABLE_XSHM` and `GDK_DISABLE`
- add triage entry `BUG-20260211-14` with reproducible error details

## Verification
- `cargo check` in `apps/desktop/src-tauri` (pass)

## Notes
This is a runtime environment hardening fix for dev-container X11 flows where `GDK_DISABLE_SHM` alone is insufficient.
The triage log remains a temporary branch artefact and will be cleaned from final PR history.

Resolves #172
## Summary
Address two desktop UX gaps:
1. file-tree inline new-note input did not create notes on enter/blur
2. tab headers lacked a right-click context menu

## Changes
- implement `handleCreateCommit` in app shell to persist/open uniquely named notes from inline create flow
- update FileTree inline input behaviour:
  - submit non-empty value on Enter
  - submit non-empty value on blur
  - avoid duplicate submit after Enter-triggered blur
- add tab right-click context menu with actions:
  - Copy note path
  - Close tab
  - Close other tabs
  - Close tabs to the right
  - Close all tabs
- add pure model builder `createTabContextMenuModel` and unit coverage
- add triage entries `BUG-20260211-15` and `BUG-20260211-16`

## Verification
- `pnpm --filter @liminal-notes/desktop test -- src/components/Editor/TabBar.test.ts src/components/FileTree.test.ts` (pass)
- `pnpm --filter @liminal-notes/desktop lint` (pass)

## Notes
The triage log remains a temporary branch artefact and will be cleaned from final PR history.

Resolves #173
Resolves #174
## Summary
Add explicit copy options to markdown preview right-click menu.

## Changes
- add preview-pane context menu integration in `EditorPane`
- add menu actions:
  - `Copy` (selected text)
  - `Copy as HTML` (rich clipboard when available, plain-text fallback)
- scope selection extraction to preview DOM only to avoid cross-surface copy confusion
- add pure model builder `createPreviewContextMenuModel`
- add unit tests for preview context menu model enable/disable states
- add triage entry `BUG-20260211-17`

## Verification
- `pnpm --filter @liminal-notes/desktop test -- src/components/Editor/previewContextMenu.test.ts src/components/Editor/TabBar.test.ts src/components/FileTree.test.ts` (pass)
- `pnpm --filter @liminal-notes/desktop lint` (pass)

## Notes
Screenshot triage folder remains local/untracked for later issue attachment.
The triage log remains a temporary branch artefact and will be cleaned from final PR history.

Resolves #175
## Summary
Prevent accidental text selection in non-content desktop interface areas.

## Changes
- add a scoped no-selection policy for UI chrome regions:
  - title bar
  - sidebar
  - tab bar
  - editor header
  - backlinks panel
- include both `user-select: none` and `-webkit-user-select: none` for WebKitGTK consistency
- explicitly preserve text selection in content/editing surfaces:
  - CodeMirror editor
  - markdown preview
  - inputs/textareas/contenteditable
- make editable title input non-selectable by default, selectable while focused
- add triage entry `BUG-20260211-18`

## Verification
- `pnpm --filter @liminal-notes/desktop lint` (pass)

## Notes
This aims to keep chrome interaction clean without sacrificing selection in editor/preview or form controls.
The triage log remains a temporary branch artefact and will be cleaned from final PR history.

Resolves #176
## Summary
Normalise navigation targets before tab lookup/open so backlink navigation works when paths are provided without a `.md` suffix.

## Changes
- add `resolveNavigablePath` helper for navigation-path normalisation
- route `EditorPane.handleNavigate` through the helper
- add unit coverage for resolve, passthrough, and fallback behaviour
- record the bug and resolution details in `docs/BUG_TRIAGE_LOG.md`

## Verification
- `pnpm --filter @liminal-notes/desktop test -- src/components/Editor/navigationPath.test.ts`
- `pnpm --filter @liminal-notes/desktop lint`

Resolves #177
## Summary
Prevent tab reordering during note rename by renaming tabs in place instead of closing and reopening them.

## Changes
- add `RENAME_TAB` action and `renameTab` helper in tabs context
- update file-explorer rename flow to call `renameTab`
- update editor-title rename flow to call `renameTab`
- add reducer tests for in-place rename order preservation and conflict merge behaviour
- record bug details in `docs/BUG_TRIAGE_LOG.md`

## Verification
- `pnpm --filter @liminal-notes/desktop test -- src/contexts/TabsContext.test.ts`
- `pnpm --filter @liminal-notes/desktop lint`

Resolves #178
## Summary
Align folder workflows in file explorer by replacing prompt-based creation with inline input, adding a toolbar folder action, and enabling drag-and-drop moves into folders.

## Changes
- add inline folder-creation state in file tree and remove `window.prompt` flow
- add `New Folder` toolbar button to the left of `New Note`
- implement folder-target drag/drop handlers in file tree with move guards
- wire move operations in app shell through vault rename and refresh
- update open tab paths when moved file/folder items are currently open
- add helper tests for move-path construction and drop eligibility guards
- add triage entries for the three related bugs in `docs/BUG_TRIAGE_LOG.md`

## Verification
- `pnpm --filter @liminal-notes/desktop test -- src/components/FileTree.test.ts`
- `pnpm --filter @liminal-notes/desktop lint`

Resolves #179
Resolves #180
Resolves #181
## Summary
Make drag-and-drop in the file explorer clearer and complete by highlighting landing targets and allowing moves back to vault root.

## Changes
- add explicit folder drop-target highlight styling
- add root drop-zone indicator while dragging nested items
- implement root-level drop handling in file tree
- add app-level move-to-root behaviour using vault rename
- remap open tab paths after move operations via shared remap helper
- add `canDropPathToRoot` helper coverage in file-tree tests
- record both bugs and resolutions in `docs/BUG_TRIAGE_LOG.md`

## Verification
- `pnpm --filter @liminal-notes/desktop test -- src/components/FileTree.test.ts`
- `pnpm --filter @liminal-notes/desktop lint`

Resolves #182
Resolves #183
## Summary
Make folder drag-and-drop landing areas more intuitive by treating expanded subtree space as part of the folder drop target and improving nested drag-out affordance.

## Changes
- add subtree-level drag handlers for expanded folders
- highlight folder subtree area as an explicit drop target
- show root drop zone at both top and bottom while dragging nested items
- clear root-drop highlight state automatically when drag ends
- add bug log entries for subtree drop and nested drag-out UX issues

## Verification
- `pnpm --filter @liminal-notes/desktop test -- src/components/FileTree.test.ts`
- `pnpm --filter @liminal-notes/desktop lint`

Resolves #184
Refs #185
## Summary
Make drag-out-to-root reliable by accepting root drops across non-folder file-tree surfaces instead of only narrow root-zone targets.

## Changes
- update file-tree root drop handler to only exclude explicit folder drop zones
- mark folder label and subtree containers as explicit folder drop zones
- add triage log entry for this root-drop regression and resolution details

## Verification
- `pnpm --filter @liminal-notes/desktop test -- src/components/FileTree.test.ts`
- `pnpm --filter @liminal-notes/desktop lint`

Resolves #186
## Summary
Address sidebar header clipping and make subtree rows easier to drag by increasing available header space and strengthening row-level drag hit behaviour.

## Changes
- increase desktop sidebar width to prevent bell icon clipping
- make file-tree row hit area full-width for more reliable drag starts
- add WebKit drag hint and pointer-event routing for row child spans
- refactor row drag-start wiring into a dedicated handler for subtree rows
- add issue-ready triage entries for both reported regressions

## Verification
- `pnpm --filter @liminal-notes/desktop test -- src/components/FileTree.test.ts`
- `pnpm --filter @liminal-notes/desktop lint`

Resolves #187
Resolves #188
## Summary
Improve move feedback by lighting up the main top-level file list when root drop is active.

## Changes
- wrap top-level tree nodes in `tree-root-list` container
- add active root-drop styling for top-level list area
- add triage entry for missing root-list drop highlight

## Verification
- `pnpm --filter @liminal-notes/desktop test -- src/components/FileTree.test.ts`
- `pnpm --filter @liminal-notes/desktop lint`

Resolves #189
…covery

## Summary
Improve file-tree drag reliability and feedback by highlighting precise top-level landing rows, preventing stuck highlights on interrupted drags, and reinforcing nested-row drag start behaviour.

## Changes
- track hovered top-level root landing row and render `root-drop-hover` styling
- clear drag/drop UI state via robust interruption handlers and timeout fallback
- add explicit drag-start/end handlers on row child elements for nested items
- keep root and folder drop-zone routing intact with explicit target metadata
- add triage entries for hover precision, stuck highlights, and nested drag-start regressions

## Verification
- `pnpm --filter @liminal-notes/desktop test -- src/components/FileTree.test.ts`
- `pnpm --filter @liminal-notes/desktop lint`

Refs #190
Resolves #191
Refs #192
## Summary
Add a clear checked indicator for `Always on Top` in the title bar context menu while preserving two-way toggle behaviour.

## Changes
- add `checked` support to shared context-menu item model
- render trailing checkmark for checked menu items
- switch title bar menu to explicit checked state model for `Always on Top`
- resynchronise `Always on Top` state from window API after toggling
- add title-bar menu-model tests for checked/unchecked states
- add triage entry for this bug in `docs/BUG_TRIAGE_LOG.md`

## Verification
- `pnpm --filter @liminal-notes/desktop test -- src/components/TitleBar.test.ts`
- `pnpm --filter @liminal-notes/desktop lint`

Resolves #193
## Summary
Make the Always on Top menu state and toggling reliable in environments where window API readback can lag or report stale values.

## Changes
- centralise title-bar window-state synchronisation paths
- add diagnostic logging for toggle/sync flow while preserving runtime behaviour
- add an override fallback when API readback is inconsistent after toggle
- compute toggle/checkmark from effective state (override or API state) to avoid stale UI transitions

## Verification
- `pnpm --filter @liminal-notes/desktop test -- src/components/TitleBar.test.ts`
- `pnpm --filter @liminal-notes/desktop lint`

Resolves #194
## Summary
Use the context-menu icon column for `Always on Top` state so menu alignment stays consistent.

## Changes
- render checkable items as left-slot checkbox visuals in `MenuItem`
- remove trailing right-side checkmark rendering
- add checkbox styles for empty and checked states in context-menu CSS
- add triage entry for indicator placement regression

## Verification
- `pnpm --filter @liminal-notes/desktop test -- src/components/TitleBar.test.ts`
- `pnpm --filter @liminal-notes/desktop lint`

Refs #195
## Summary
Render `Always on Top` state with mapped React SVG icons in the left icon slot to match the rest of the context-menu icon system.

## Changes
- switch title-bar menu model to `icon`-based AoT state (`checkbox-empty` / `checkbox-checked`)
- add checkbox icon mappings in context-menu `iconMapper`
- update title-bar menu-model tests for icon-based state
- update BUG-20260212-37 scope/resolution notes to reflect icon-mapper approach

## Verification
- `pnpm --filter @liminal-notes/desktop test -- src/components/TitleBar.test.ts`
- `pnpm --filter @liminal-notes/desktop lint`

Resolves #195
@ScottMorris ScottMorris changed the title fix: desktop bug sweep and UX stabilisation Desktop bug sweep and UX stabilisation Feb 12, 2026
@ScottMorris ScottMorris added bug Something isn't working desktop Desktop impact editor Editor modifications core Core component labels Feb 12, 2026
@ScottMorris ScottMorris added the build Build System label Feb 12, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 12, 2026

Desktop coverage summary

Metric Covered / Total Percent
Lines 270 / 1463 18.45%
Statements 292 / 1590 18.36%
Functions 63 / 421 14.96%
Branches 96 / 815 11.77%

…tests

## Summary
Fix CI typecheck failures introduced by strict typing around settings row composition and context-menu item unions.

## Changes
- type the Linux-only system accent row as SettingRowDef to preserve kind literal compatibility
- narrow TitleBar test menu entries before accessing id/icon on union item types

## Verification
- pnpm --filter @liminal-notes/desktop run typecheck
- pnpm --filter @liminal-notes/desktop test -- src/components/TitleBar.test.ts src/components/Settings/schemas.test.ts
@ScottMorris
Copy link
Copy Markdown
Owner Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 67d3ddc7f0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

## Summary
Use the shared icon pipeline for Always on Top checkbox rendering so it matches how other context-menu icons are defined and mapped.

## Changes
- move checkbox-empty/checkbox-checked SVG components into shared `Icons.tsx`
- update context-menu `iconMapper` to use shared checkbox icon components
- switch title-bar Always on Top icon names to shared icon keys
- update title-bar menu-model tests for renamed icon keys

## Verification
- pnpm --filter @liminal-notes/desktop run typecheck
- pnpm --filter @liminal-notes/desktop test -- src/components/TitleBar.test.ts

Refs #195
## Summary
Revert the Always on Top menu icon presentation to the prior implementation that shows `CheckIcon` only when enabled.

## Changes
- set Always on Top menu item icon to `CheckIcon` when enabled
- use no icon when disabled
- update title-bar menu-model tests to match restored behaviour

## Verification
- pnpm --filter @liminal-notes/desktop run typecheck
- pnpm --filter @liminal-notes/desktop test -- src/components/TitleBar.test.ts

Refs #195
## Summary
Prevent bulk tab close actions from dropping dirty-tab confirmation prompts by closing tabs sequentially and waiting for each close attempt to resolve.

## Changes
- add `closeTabsSequential` helper in `TabBar` to close tab IDs one-at-a-time
- stop bulk close iteration when a close returns `false` (cancel/abort)
- update `EditorPane.handleCloseTab` to resolve only after dirty-tab prompt decision
- bridge dirty-tab modal decisions back to bulk close flow with a resolver ref
- add cleanup to resolve pending prompt promise on unmount
- add regression test for sequential close ordering and cancel short-circuit behaviour

## Verification
- pnpm --filter @liminal-notes/desktop run typecheck
- pnpm --filter @liminal-notes/desktop test -- src/components/Editor/TabBar.test.ts
@ScottMorris ScottMorris merged commit 5fa2ea1 into main Feb 12, 2026
5 checks passed
@ScottMorris ScottMorris deleted the fix/bug-sweep-2026-02-11 branch February 12, 2026 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment