(landing) Always-visible workflow bar, first-run welcome card and Help fix#242
Merged
Conversation
The StartupLanding welcome card was a full-viewport overlay (position: fixed; inset: 0; z-index: 1000, left over from before the persistent WorkflowBar existed), so on a normal start it painted over the bar and only the card was visible. Move the card inside the layout host (.workspace-layout-host, the area below the bar) and switch its CSS to an absolute fill with z-index: var(--z-sticky) — above module content, below modals. The bar now stays visible and clickable while the card is up; ShortcutsHelp and confirm dialogs still paint above it as higher-z siblings of the shell.
The welcome card appeared on every non-CLI start. It is now first-run only: a persistent localStorage flag (ansikten-welcomed, welcomeFlag.js) is set the first time the card is dismissed — opening a step, loading an image, or closing it from the menu — routed through a single dismissLanding() helper. Later launches drop straight into the workspace with the WorkflowBar and no card; an emptied workspace no longer brings the card back for a returning user. The flag fails open toward showing (missing/corrupt counts as not yet welcomed), and CLI launches (willLaunch) still never show it. A new Help ▸ "Visa välkomstguiden" menu item (show-welcome) re-shows it on demand, wired through the menu-command table. Tests: welcomeFlag unit tests, plus workspace tests for visibility structure, first-run set/skip, corrupt fail-open, CLI suppression, and the show-welcome re-show.
… fallback The first-run flag should govern only the at-start card shown over the non-empty default layout. Closing every view is a separate trigger: the empty model must always bring the card back so the workspace is never a dead end, regardless of whether the user has been welcomed. Drop the !hasBeenWelcomed() guard on the empty-workspace re-show; the card fills the host under the always-visible WorkflowBar. Add a test for the unconditional fallback and document the two-trigger semantics in ux-principles and the workspace guide.
The show-keyboard-shortcuts menu command (and its Cmd+/ accelerator) had no renderer handler and fell through to a no-op moduleAPI broadcast, so the menu item did nothing — only the `?` key opened the overlay. Add a toggleShortcutsHelp callback to the menu-command context and map show-keyboard-shortcuts to it, matching the `?`-key toggle. The menu item now opens (and closes) the ShortcutsHelp overlay.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
A CLI launch (willLaunch) renders no card, but its launch command opens a step/module that still reaches dismissLanding — which unconditionally set the welcomed flag, silently burning the first-run guide for a CLI-first user on their later normal start. Gate markWelcomed on the card being visible at dismissal: dismissLanding now uses a functional setShowLanding updater to read the live value and marks welcomed only when it was showing. markWelcomed stays idempotent so a StrictMode double-invoke is harmless. Add a test asserting a CLI-launch dismissal leaves the flag unset and a later normal start still shows the card; normal dismissal still sets the flag.
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.
Summary
Follow-up from the owner's visual pass of the navigation series.
position:fixed; inset:0; z-index:1000overlay — a leftover from before the WorkflowBar existed — covering the always-rendered bar entirely. The card now renders inside the workspace surface below the bar (absolute,var(--z-sticky)); ShortcutsHelp and modals still paint above.ansikten-welcomedflag, fail-open). Emptying the workspace (closing all views) still brings the card back unconditionally — two distinct triggers, documented. CLI launches never show it. New Hjälp → "Visa välkomstguiden" menu entry re-opens it on demand.show-keyboard-shortcutshad no renderer handler); now wired to the same toggle as the?key.Testing
npm test: 90 files / 850 tests passed (new: welcomeFlag, workspace structure/first-run/fallback/CLI-suppression, shortcuts overlay)npm run build:workspace: OK