Prevent settings target navigation from flashing #194

Closed
opened 2026-06-01 09:39:19 +00:00 by steve · 0 comments
Owner

Clicking a settings gear/icon that deep-links to a concrete settings row can make
the settings panel visibly flash or remount. Settings navigation should switch or
scroll to the target without blanking the panel.

Problem

The Obsidian-style settings navigation has canonical surfaces, but some target
navigation paths still appear to tear down and rebuild the visible content when
the user clicks a settings icon/gear. That makes the whole settings panel flash
instead of feeling like an in-panel navigation action.

Goal

Make settings icon/gear navigation stable: opening a target setting should select
the owning surface, scroll/highlight the row when available, and preserve the
panel shell without a visible full-screen flash.

Scope

  • Trace the openPluginSettings and settings search/deep-link target paths.
  • Fix any avoidable surface remount, selection reset, or search/scroll timing
    that causes a blank panel flash.
  • Add regression coverage for gear/icon navigation to a settings target.
  • Keep the existing Obsidian-style grouping and schema section card styling.

Non-goals

  • Redesign the settings sidebar model.
  • Replace existing schema controls or plugin SettingTab controls.
  • Change persisted configuration keys or plugin data.

Acceptance Criteria

  • Clicking a plugin settings gear/icon navigates to the plugin settings surface
    without blanking or remounting the whole settings panel.
  • Navigating to a schema row target selects the canonical surface and scrolls or
    highlights that row without clearing the selected surface.
  • Search-driven settings targets still work after the fix.
  • E2E coverage detects the absence of a transient blank/settings-panel flash for
    the affected navigation path.

Implementation Notes

  • Prefer stabilizing target resolution and lifecycle timing over adding delays.
  • Inspect keyed Svelte blocks and onDestroy/mount probes around settings
    surfaces before changing render structure.
  • If the issue is caused by route state changing through an intermediate empty
    value, coalesce updates so navigation moves directly to the final surface.

Suggested Files or Specs To Inspect

  • packages/workspace/src/lib/components/configuration/configuration.svelte
  • packages/workspace/src/lib/components/configuration/configuration.ts
  • packages/workspace/e2e/core-plugin-settings.spec.ts
  • spec/src/30-cross-package-contracts/configuration-and-settings.md

Validation Commands

  • pnpm --filter @lapis-notes/workspace check:all
  • pnpm --filter @lapis-notes/workspace test:e2e -- e2e/core-plugin-settings.spec.ts --project chromium
  • pnpm test:smoke

Follow-up Tasks

Implementation Summary

Removed the forced settings close/reopen when opening a target settings surface, added a regression sampler around the plugin gear navigation path, updated the plugin settings target unit coverage, and documented that in-panel settings target navigation must preserve the mounted settings shell.

Clicking a settings gear/icon that deep-links to a concrete settings row can make the settings panel visibly flash or remount. Settings navigation should switch or scroll to the target without blanking the panel. ## Problem The Obsidian-style settings navigation has canonical surfaces, but some target navigation paths still appear to tear down and rebuild the visible content when the user clicks a settings icon/gear. That makes the whole settings panel flash instead of feeling like an in-panel navigation action. ## Goal Make settings icon/gear navigation stable: opening a target setting should select the owning surface, scroll/highlight the row when available, and preserve the panel shell without a visible full-screen flash. ## Scope - Trace the `openPluginSettings` and settings search/deep-link target paths. - Fix any avoidable surface remount, selection reset, or search/scroll timing that causes a blank panel flash. - Add regression coverage for gear/icon navigation to a settings target. - Keep the existing Obsidian-style grouping and schema section card styling. ## Non-goals - Redesign the settings sidebar model. - Replace existing schema controls or plugin `SettingTab` controls. - Change persisted configuration keys or plugin data. ## Acceptance Criteria - Clicking a plugin settings gear/icon navigates to the plugin settings surface without blanking or remounting the whole settings panel. - Navigating to a schema row target selects the canonical surface and scrolls or highlights that row without clearing the selected surface. - Search-driven settings targets still work after the fix. - E2E coverage detects the absence of a transient blank/settings-panel flash for the affected navigation path. ## Implementation Notes - Prefer stabilizing target resolution and lifecycle timing over adding delays. - Inspect keyed Svelte blocks and `onDestroy`/mount probes around settings surfaces before changing render structure. - If the issue is caused by route state changing through an intermediate empty value, coalesce updates so navigation moves directly to the final surface. ## Suggested Files or Specs To Inspect - `packages/workspace/src/lib/components/configuration/configuration.svelte` - `packages/workspace/src/lib/components/configuration/configuration.ts` - `packages/workspace/e2e/core-plugin-settings.spec.ts` - `spec/src/30-cross-package-contracts/configuration-and-settings.md` ## Validation Commands - `pnpm --filter @lapis-notes/workspace check:all` - `pnpm --filter @lapis-notes/workspace test:e2e -- e2e/core-plugin-settings.spec.ts --project chromium` - `pnpm test:smoke` ## Related Issues - Follow-up to #192 — [Adopt Obsidian-style settings navigation](../closed/192-adopt-obsidian-style-settings-navigation.md) ## Follow-up Tasks ## Implementation Summary Removed the forced settings close/reopen when opening a target settings surface, added a regression sampler around the plugin gear navigation path, updated the plugin settings target unit coverage, and documented that in-panel settings target navigation must preserve the mounted settings shell. <!-- backlog:task_id=TASK-SETTINGS-NAV-NO-FLASH source_spec=spec/src/30-cross-package-contracts/configuration-and-settings.md related_issue=192 -->
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lapis-notes/lapis#194
No description provided.