fix(app): hide breadcrumb bar in Amicode webview (#326) - #233
Merged
Merged
Conversation
Gate the project selector + workspace selector + git status row on !inAmicode() so it never renders inside the Amicode VS Code panel. Sessions already scope to all workspace folders via the multi-directory engine (opencode#215), making the bar redundant chrome. Adds a source-assertion test following the established pattern (prompt-input-clipboard-structure.test.ts).
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe new-session view now hides the project-selected breadcrumb bar in the Amicode webview. Bun tests verify the import and combined rendering condition. ChangesNew-session breadcrumb visibility
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
jeonghun-jj-lee
added a commit
that referenced
this pull request
Sep 6, 2026
…faults CM6's built-in default uses a 5-class child-combinator selector for .cm-selectionBackground with hardcoded colors (#233 dark, #d7d4f0 light). Our theme's lower-specificity descendant selector lost, making selections invisible in dark mode. Use matching child-combinator depth so our CSS variable (--v2-background-bg-layer-03) wins. Part of #302
jeonghun-jj-lee
added a commit
that referenced
this pull request
Sep 6, 2026
…select-all) to Files Changed editor (#304) * feat(session-ui): add CM6 history, keymap, and bracketMatching extensions Add @codemirror/commands dependency and wire history(), defaultKeymap, historyKeymap, and bracketMatching() into the diff editor. - history() in editableExtensions (only when readOnly is false) - keymap + bracketMatching in baseExtensions (shared by all panes) Part of #302 * test(session-ui): verify external updates excluded from undo history updateModified and updateOriginal use addToHistory.of(false), which the new history() extension respects. These tests confirm the invariant. Part of #302 * feat(session-ui): make revert undoable via isolateHistory (D7) Use isolateHistory.of('full') on the revert dispatch so it always creates its own undo group. Cmd+Z after revert now restores the pre-revert edits. Updated docstrings to match. Part of #302 * feat(app): delegate Z/Y/A to CM6 in global clipboard handler Add CLIPBOARD_EDITOR_SELECTOR for data-amc-clipboard='codemirror'. The global handler returns early (no preventDefault) for undo/redo/ select-all when the target is inside a CM6 editor, letting CM6's own keymap handle them. Clipboard chords (C/X/V) still bridge. Part of #302 * feat(app): use execCommand('delete') for CM6 cut targets Inside a CM6 editor, cut deletion uses execCommand('delete') instead of range.deleteContents() so CM6's mutation observer creates a proper undo-tracked transaction. Non-CM6 contenteditable targets keep the existing range.deleteContents() + dispatchInput('deleteByCut') path. Part of #302 * feat(session-ui): mark diff editor container for CM6 clipboard delegation Add data-amc-clipboard='codemirror' to the EditableDiffView container div so global-clipboard.ts recognizes it and delegates Z/Y/A to CM6. Part of #302 * fix(session-ui): boost selection highlight specificity to beat CM6 defaults CM6's built-in default uses a 5-class child-combinator selector for .cm-selectionBackground with hardcoded colors (#233 dark, #d7d4f0 light). Our theme's lower-specificity descendant selector lost, making selections invisible in dark mode. Use matching child-combinator depth so our CSS variable (--v2-background-bg-layer-03) wins. Part of #302 * feat(session-ui): stash __amcEditor bridge on container for clipboard handler createDiffEditor attaches getSelectedText() and cutSelectedText() on the parent element so the global clipboard handler can read from CM6's document model without importing @codemirror packages. Cleaned up on destroy(). Part of #302 * fix(app): read copy/cut from CM6 model bridge instead of DOM selection When copying or cutting inside a CM6 editor, the global clipboard handler now reads from the __amcEditor bridge (which uses state.sliceDoc) instead of window.getSelection().toString(). This fixes two bugs: - Unified mode: DOM selection included deleted-line decoration widgets - ReadOnly mode: DOM selection might not be synced by CM6 Part of #302 * docs: add manual test plan for CM6 editing shortcuts (#302) * chore: remove test.md to rewrite via agent
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
Gate the breadcrumb bar (project selector + workspace selector + git status) on
!inAmicode()so it never renders inside the Amicode VS Code panel.Sessions already scope to all workspace folders via the multi-directory engine (opencode#215), making the bar redundant chrome in the Amicode webview. The standalone web app still shows it.
Changes
new-session-view.tsx: importinAmicode, wrap the breadcrumb<Show>with!inAmicode() &&new-session-view.test.ts: source-assertion test (same pattern asprompt-input-clipboard-structure.test.ts)Testing
bun test src/pages/new-session/new-session-view.test.ts— 2/2 passbun typecheck— cleanCloses amicode#326 (acceptance criterion: breadcrumb bar hidden).
Summary by CodeRabbit