Global Editor: full editor experience — LSP, search, fullscreen, working tabs (#513)#515
Open
Juliusolsson05 wants to merge 15 commits into
Open
Global Editor: full editor experience — LSP, search, fullscreen, working tabs (#513)#515Juliusolsson05 wants to merge 15 commits into
Juliusolsson05 wants to merge 15 commits into
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… highlighting (#513) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…hlighting (#513) Leaner than the planned full controller-module consolidation: the existing renderer test pins the split-listener contract (editor module never touches setTheme while inactive), so instead of merging the two theme owners we give them one shared refcount (monacoThemeState) and stop getMonaco() from re-asserting the slab theme on every call. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…tructive save-error banner (#513) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…switches (#513) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ferences/symbols (#513) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… completions (#513) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ck-open/search backend (#513) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…en toggle (#513) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…creen (alt+cmd+E) (#513) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…tents never persisted (#513) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…lscreen commands (#513) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…fix stale store comments (#513) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…results (#513) Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Closes #513.
Turns the Global Editor overlay from a half-wired file viewer into a real editor. Full plan (with WHY per task) in
docs/superpowers/plans/2026-07-09-global-editor-full-experience.md.Root-cause fixes
.tsx/.jsxhighlighting —normalizeCodeLanguageproducedtypescriptreact/javascriptreact, which are VS Code language IDs Monaco doesn't ship; models silently fell back to the plaintext tokenizer. NewmonacoLanguageId()translates at every Monaco boundary (models + providers); TS worker gets JSX compiler options; worker semantic validation off (LSP owns semantics).closeFile()refused dirty buffers and every caller dropped thefalse; no confirm dialog existed. Now:EditorWorkbench-owned ConfirmCloseDialog (Save & Close / Discard / Cancel),{ force }close in both hosts, and save errors render as a banner above the editor instead of replacing the pane (a failed save used to hide your unsaved text).semanticHighlightingoff; now enabled at both editor-creation sites.getMonaco()re-asserted the slab theme on every CodeBlock mount, yanking the open editor's theme. Shared refcount (monacoThemeState.ts) gives the two theme owners one answer to "who owns the global theme" (kept the existing renderer test's contract; see plan execution notes).MonacoEnvironmentinstalls at module scope (was post-lazy-import), CSP gainsworker-src 'self' blob:.LSP in the real editor (was CodeBlock-only)
LspManagerrefactored onto a pluggable server registry (src/main/lsp/serverRegistry.ts): tsserver stays the bundled npm dep; pyright / rust-analyzer / gopls are detected on PATH and fail open. One server per (root × spec), single-flight spawn. No bundled binaries (third_party policy).MonacoFileEditornow does full document sync (debounced didChange), diagnostics markers, semantic tokens, hover, completions, and cross-file go-to-definition viaregisterEditorOpener→openFileInGlobalEditor(root containment enforced in main; definitions outside the active cwd fail closed).Editor experience
Isolation
workspace/commands/layoutCommands.tsinto an editor-owned palette module (features/global-editor/commands/), plus new quick-open / search / fullscreen commands.bufferOps(pure buffer transitions) ends the Global-Editor-vs-AI-Workspace buffer-lifecycle duplication; AI Workspace also gained the confirm-dialog/conflict-banner behaviors.features/editor/store.tsrewritten.Verification
npx tsc --noEmiton both projects (node + web): clean.npm run test: 481/481 passing (one pre-existingagent-voice-dictationsubmodule suite failure, byte-identical onmain).npm run build(electron-vite production bundle): succeeds..tsx→ colors + semantic sharpening; type error → squiggle + hover; ⌘-click import → cross-file jump; dirty close → dialog; external write → live refresh / conflict banner; ⌘P / ⌘⇧F; ⌥⌘E + Esc; restart → tabs restored; ⌘Z after tab switch.🤖 Generated with Claude Code