dsh-remote-vs 0.21.1 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/README.en.md +489 -473
  2. package/README.md +434 -424
  3. package/cordis.patch.yml +13 -5
  4. package/lib/client.js +946 -256
  5. package/lib/index.js +187 -15
  6. package/lib/p2-router-fs.js +6 -7
  7. package/lib/types/changes/recorder.d.ts +21 -0
  8. package/lib/types/changes/status.d.ts +41 -1
  9. package/lib/types/changes/text-diff.d.ts +18 -0
  10. package/lib/types/client/changes/ChangesDock.d.ts +9 -2
  11. package/lib/types/client/changes/model.d.ts +3 -1
  12. package/lib/types/client/changes/review-state.d.ts +67 -0
  13. package/lib/types/client/notices.d.ts +35 -0
  14. package/lib/types/client/store.d.ts +51 -0
  15. package/lib/types/client/vsc/change-marks.d.ts +17 -0
  16. package/lib/types/client/vsc/kit.d.ts +9 -0
  17. package/lib/types/deploy.d.ts +28 -2
  18. package/lib/types/notices.d.ts +22 -0
  19. package/lib/types/p2/router-fs.d.ts +4 -5
  20. package/lib/types/p2/worlds.d.ts +10 -0
  21. package/lib/types/protocol.d.ts +37 -1
  22. package/lib/{worlds-DSzyajOB.js → worlds-DXdP4SMn.js} +80 -4
  23. package/package.json +37 -37
  24. package/src/changes/recorder.ts +93 -28
  25. package/src/changes/status.ts +69 -2
  26. package/src/changes/text-diff.ts +42 -0
  27. package/src/client/DirectoryFlow.tsx +65 -5
  28. package/src/client/api.ts +5 -0
  29. package/src/client/changes/ChangesDock.tsx +241 -39
  30. package/src/client/changes/changes.css +122 -9
  31. package/src/client/changes/model.ts +106 -22
  32. package/src/client/changes/review-state.ts +133 -0
  33. package/src/client/i18n.ts +48 -8
  34. package/src/client/index.tsx +24 -5
  35. package/src/client/notices.ts +86 -0
  36. package/src/client/store.tsx +186 -2
  37. package/src/client/vsc/change-marks.ts +39 -6
  38. package/src/client/vsc/kit.tsx +16 -1
  39. package/src/client/vsc/vsc.css +23 -0
  40. package/src/deploy.ts +38 -2
  41. package/src/http.ts +12 -1
  42. package/src/notices.ts +37 -0
  43. package/src/p2/router-fs.ts +5 -6
  44. package/src/p2/worlds.ts +46 -2
  45. package/src/protocol.ts +37 -1
  46. package/vendor/dsh-remote-helpers/dsh-ssh-helper-0.2.2-rc.4-linux-x64.helper.json +19 -0
  47. package/vendor/dsh-remote-helpers/dsh-ssh-helper-0.2.2-rc.4-linux-x64.tar.gz +4 -0
  48. package/vendor/dsh-remote-helpers/dsh-ssh-helper-0.2.2-rc.4-linux-x64.tar.gz.sha256 +1 -0
  49. package/vendor/dsh-remote-helpers/ssh-helper-runtime-deps.patch +14 -0
  50. package/vendor/dsh-remote-helpers/dsh-ssh-helper-0.2.1-alpha.2-linux-x64.helper.json +0 -16
  51. package/vendor/dsh-remote-helpers/dsh-ssh-helper-0.2.1-alpha.2-linux-x64.tar.gz +0 -4
  52. package/vendor/dsh-remote-helpers/dsh-ssh-helper-0.2.1-alpha.2-linux-x64.tar.gz.sha256 +0 -1
package/lib/client.js CHANGED
@@ -11,7 +11,7 @@ window.__ModuleLoader__.load({
11
11
  let react_jsx_runtime = require("react/jsx-runtime");
12
12
  let react_dom = require("react-dom");
13
13
  //#region \0dsh-css:src/client/vsc/vsc.css.mjs
14
- const css$3 = "/**\n * VS Code-style design system for the remote explorer. Every surface below\n * is scoped under `.rvs-root` so the sheet can never leak into the host GUI,\n * and every host token carries a literal fallback: the plugin also renders in\n * the native right-Sidebar fallback and on hosts whose alias tokens differ.\n *\n * Palette and metrics are aligned with the reference implementation\n * (dsh-solution-explorer): 13px/20px panel type, 5px/10px tree rows with a\n * 10px radius, a 30px activity button with the badge tucked into the icon's\n * bottom-right corner, GitHub-Dark token colors, and the\n * `--e2b714 / #4ec9b0 / #f14c4c` modified/added/deleted triple.\n */\n\n.rvs-root {\n --rvs-fg: var(--dsw-alias-label-primary, #e6e6e6);\n --rvs-fg2: var(--dsw-alias-label-secondary, #b9b9b9);\n --rvs-fg3: var(--dsw-alias-label-tertiary, #8b8b8b);\n --rvs-hover: var(--dsw-alias-interactive-bg-hover, rgba(127, 127, 127, .14));\n --rvs-active: var(--dsw-alias-interactive-bg-active, rgba(77, 107, 254, .22));\n --rvs-border: var(--dsw-alias-border-l1, rgba(127, 127, 127, .25));\n --rvs-border2: var(--dsw-alias-border-l2, rgba(127, 127, 127, .38));\n --rvs-input: var(--dsw-alias-bg-input, rgba(127, 127, 127, .12));\n --rvs-overlay: var(--dsw-alias-bg-overlay, #24262e);\n --rvs-layer3: var(--dsw-alias-bg-layer-3, rgba(127, 127, 127, .16));\n --rvs-brand: var(--dsw-alias-brand-primary, #4d6bfe);\n --rvs-accent: var(--dsw-alias-button-info-fill, #4d6bfe);\n --rvs-danger: var(--dsw-alias-state-error-primary, #e05555);\n --rvs-ok: #2ea043;\n --rvs-git-m: #e2b714;\n --rvs-git-a: #4ec9b0;\n --rvs-git-d: #f14c4c;\n --rvs-git-r: #4ec9b0;\n --rvs-git-c: #58a6ff;\n --rvs-git-u: #f14c4c;\n --rvs-git-x: #6e6e6e;\n --rvs-add-bg: rgba(78, 201, 176, .15);\n --rvs-del-bg: rgba(241, 76, 76, .15);\n /* Opaque equivalents, for elements that must not show what scrolls under\n them (the pinned diff line numbers). */\n --rvs-add-solid: #e4f6f1;\n --rvs-del-solid: #fdeaea;\n --rvs-mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', Consolas, 'Courier New', monospace;\n /* Opaque code surfaces (Light+ default; the dark block below flips them). */\n --rvs-code-bg: #ffffff;\n --rvs-code-fg: #1f1f1f;\n --rvs-code-gutter-fg: #237893;\n\n display: flex;\n flex-direction: row;\n height: 100%;\n min-height: 0;\n overflow: hidden;\n color: var(--rvs-fg);\n font-size: 13px;\n line-height: 20px;\n}\n\n/**\n * Code surfaces are OPAQUE, in the editor's own palette rather than the DSH\n * skin: syntax colors need a definite background to stay readable, and the\n * app shell marks its resolved scheme on <body> (same signal theme.ts reads).\n */\nbody[data-ds-dark-theme] .rvs-root {\n --rvs-code-bg: #1e1e1e;\n --rvs-code-fg: #d4d4d4;\n --rvs-code-gutter-fg: #858585;\n --rvs-add-solid: #16332e;\n --rvs-del-solid: #3b2325;\n}\n\n.rvs-edge {\n background: var(--rvs-code-bg);\n color: var(--rvs-code-fg);\n}\n\n.rvs-root *,\n.rvs-portal * {\n box-sizing: border-box;\n}\n\n/* ------------------------------------------------------------ activity rail */\n\n.rvs-rail {\n flex: none;\n width: 38px;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 4px;\n padding: 8px 0;\n border-right: 1px solid var(--rvs-border);\n background: var(--dsw-specific-sidebar-fill, transparent);\n}\n\n.rvs-rail-btn {\n position: relative;\n flex: none;\n width: 30px;\n height: 30px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: none;\n border-radius: 6px;\n background: transparent;\n color: var(--rvs-fg3);\n cursor: pointer;\n}\n\n.rvs-rail-btn:hover {\n color: var(--rvs-fg);\n background: var(--rvs-hover);\n}\n\n.rvs-rail-btn.active {\n color: var(--rvs-fg);\n background: var(--rvs-hover);\n box-shadow: inset 2px 0 0 var(--rvs-brand);\n}\n\n.rvs-rail-btn.danger:hover {\n color: var(--rvs-danger);\n}\n\n.rvs-rail-badge {\n position: absolute;\n bottom: 1px;\n right: 1px;\n min-width: 14px;\n height: 14px;\n padding: 0 3px;\n border-radius: 7px;\n background: var(--rvs-accent);\n color: #fff;\n font-size: 9px;\n font-weight: 700;\n line-height: 14px;\n text-align: center;\n pointer-events: none;\n}\n\n.rvs-rail-sep {\n flex: none;\n width: 20px;\n height: 1px;\n margin: 4px 0;\n background: var(--rvs-border);\n}\n\n/* -------------------------------------------------------- panel + editor */\n\n.rvs-column {\n flex: 1;\n min-width: 0;\n min-height: 0;\n display: flex;\n flex-direction: column;\n}\n\n.rvs-pane {\n display: flex;\n flex-direction: column;\n min-height: 0;\n min-width: 0;\n overflow: hidden;\n}\n\n/**\n * One lazily-mounted panel slot: a visited panel stays mounted and is merely\n * hidden, so returning to the explorer (or the terminal) neither refetches nor\n * flashes a reload.\n */\n.rvs-viewslot {\n flex: 1;\n min-height: 0;\n min-width: 0;\n flex-direction: column;\n height: 100%;\n overflow: hidden;\n}\n\n/**\n * Padding for the legacy views (workspaces / terminal) that draw no chrome.\n *\n * It MUST be a flex column: the workspaces view scroller is its child and gets\n * its bounded height only from a flex parent (`flex:1; min-height:0`). As a\n * plain block it grew with its content instead, so the panel clipped at the\n * viewslot's `overflow:hidden` and the binding list could not scroll at all —\n * a seventh workspace (and the wizard under it) was simply unreachable.\n */\n.rvs-viewpad {\n display: flex;\n flex-direction: column;\n min-height: 0;\n padding: 10px 12px 14px;\n box-sizing: border-box;\n}\n\n.rvs-pane.grow {\n flex: 1;\n}\n\n.rvs-header {\n flex: none;\n display: flex;\n align-items: center;\n gap: 6px;\n height: 34px;\n padding: 0 8px 0 10px;\n border-bottom: 1px solid var(--rvs-border);\n}\n\n.rvs-header .rvs-title {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 11px;\n font-weight: 700;\n letter-spacing: .04em;\n text-transform: uppercase;\n color: var(--rvs-fg3);\n}\n\n.rvs-hbtn {\n flex: none;\n width: 22px;\n height: 22px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: none;\n border-radius: 5px;\n background: transparent;\n color: var(--rvs-fg3);\n cursor: pointer;\n}\n\n.rvs-hbtn:hover {\n color: var(--rvs-fg);\n background: var(--rvs-hover);\n}\n\n.rvs-hbtn.danger:hover {\n color: #fff;\n background: var(--rvs-danger);\n}\n\n.rvs-hbtn:disabled {\n opacity: .4;\n cursor: default;\n}\n\n.rvs-scroll {\n flex: 1;\n min-height: 0;\n overflow: auto;\n scrollbar-width: thin;\n}\n\n.rvs-globalbar {\n flex: none;\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 4px 8px;\n border-bottom: 1px solid var(--rvs-border);\n font-size: 11px;\n}\n\n/*\n * Connection chip: the Host's SSH link health for the workspace on screen.\n * Lives in the top bar and, compact, in the editor info bar. Only the errored\n * state is interactive (retry); the others are a status read-out.\n */\n.rvs-conn {\n flex: none;\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 1px 6px 1px 5px;\n border: 1px solid transparent;\n border-radius: 9px;\n background: transparent;\n color: var(--rvs-fg2);\n font: inherit;\n font-size: 11px;\n line-height: 16px;\n cursor: default;\n}\n\n.rvs-conn.compact {\n padding: 0 2px;\n border: none;\n background: none;\n}\n\n.rvs-conn.clickable {\n cursor: pointer;\n}\n\n.rvs-conn.clickable:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-conn-dot {\n flex: none;\n width: 7px;\n height: 7px;\n border-radius: 50%;\n background: var(--rvs-fg3);\n}\n\n.rvs-conn-ok .rvs-conn-dot {\n background: var(--rvs-ok, #2ea043);\n}\n\n.rvs-conn-error {\n color: var(--rvs-danger);\n}\n\n.rvs-conn-error .rvs-conn-dot {\n background: var(--rvs-danger);\n}\n\n.rvs-conn-label {\n max-width: 9em;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.rvs-scroll::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n}\n\n.rvs-scroll::-webkit-scrollbar-thumb {\n background: var(--dsw-alias-scrollbar-bg-l2, rgba(127, 127, 127, .4));\n border-radius: 4px;\n}\n\n.rvs-scroll::-webkit-scrollbar-thumb:hover {\n background: var(--dsw-alias-scrollbar-hover-l2, rgba(127, 127, 127, .6));\n}\n\n.rvs-scroll::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.rvs-vsplit-handle {\n flex: none;\n position: relative;\n height: 7px;\n cursor: row-resize;\n touch-action: none;\n}\n\n.rvs-vsplit-handle::after {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n top: 3px;\n height: 1px;\n background: var(--rvs-border);\n}\n\n.rvs-vsplit-handle:hover::after,\n.rvs-vsplit-handle[data-dragging='true']::after {\n top: 2px;\n height: 3px;\n border-radius: 2px;\n background: var(--rvs-brand);\n}\n\n/* ------------------------------------------------------------------ tree */\n\n.rvs-tree {\n padding: 4px 6px 12px;\n min-width: 0;\n}\n\n.rvs-node {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n width: 100%;\n padding: 4px 8px;\n border: none;\n background: transparent;\n border-radius: 8px;\n color: var(--rvs-fg);\n font: inherit;\n font-size: 13px;\n line-height: 18px;\n text-align: left;\n cursor: pointer;\n}\n\n.rvs-node:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-node.selected {\n background: var(--rvs-active);\n}\n\n.rvs-node.cut {\n opacity: .5;\n}\n\n.rvs-node.drop-target {\n background: var(--rvs-active);\n outline: 1px solid var(--rvs-brand);\n outline-offset: -1px;\n}\n\n/* Where a file drag will land: a slip must not silently drop a tree into the\n wrong directory. */\n.rvs-drop-hint {\n margin: 2px 8px 4px;\n padding: 3px 8px;\n border: 1px dashed var(--rvs-brand);\n border-radius: 3px;\n font-size: 11px;\n color: var(--rvs-brand);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n direction: rtl;\n unicode-bidi: plaintext;\n}\n/* Upload progress: one line under the header. A multi-minute transfer with no\n feedback is indistinguishable from a hung explorer, so the row names the\n count and the file on the wire. */\n.rvs-upload-bar {\n flex: none;\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 3px 10px 4px;\n font-size: 11px;\n color: var(--dsw-alias-text-secondary, rgba(127, 127, 127, .95));\n}\n\n.rvs-upload-text {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n direction: rtl;\n unicode-bidi: plaintext;\n}\n\n.rvs-node-icon {\n flex: none;\n width: 16px;\n height: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--rvs-fg3);\n}\n\n.rvs-node-name {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-node-actions {\n flex: none;\n display: none;\n align-items: center;\n gap: 2px;\n}\n\n.rvs-node:hover .rvs-node-actions {\n display: flex;\n}\n\n.rvs-git-letter {\n flex: none;\n width: 14px;\n margin-left: 2px;\n font-size: 11px;\n font-weight: 700;\n text-align: center;\n}\n\n.rvs-git-M, .rvs-letter-M { color: var(--rvs-git-m); }\n.rvs-git-A, .rvs-letter-A { color: var(--rvs-git-a); }\n.rvs-git-D, .rvs-letter-D { color: var(--rvs-git-d); }\n.rvs-git-R, .rvs-letter-R { color: var(--rvs-git-r); }\n.rvs-git-C, .rvs-letter-C { color: var(--rvs-git-c); }\n.rvs-git-U, .rvs-letter-U { color: var(--rvs-git-u); }\n.rvs-git-q, .rvs-letter-q, .rvs-git-\\\\? { color: var(--rvs-git-a); }\n.rvs-git-x, .rvs-letter-x { color: var(--rvs-git-x); }\n.rvs-git-T, .rvs-letter-T { color: var(--rvs-git-m); }\n\n.rvs-rename-input {\n flex: 1;\n min-width: 0;\n padding: 0 4px;\n border: 1px solid var(--rvs-brand);\n border-radius: 4px;\n background: var(--rvs-input);\n color: var(--rvs-fg);\n font: inherit;\n font-size: 13px;\n line-height: 18px;\n outline: none;\n}\n\n.rvs-empty {\n padding: 18px 14px;\n color: var(--rvs-fg3);\n font-size: 12px;\n text-align: center;\n line-height: 1.7;\n}\n\n.rvs-banner {\n margin: 6px 8px;\n padding: 6px 9px;\n border-radius: 6px;\n font-size: 12px;\n line-height: 1.5;\n word-break: break-word;\n white-space: pre-wrap;\n}\n\n.rvs-banner.info {\n background: var(--rvs-hover);\n color: var(--rvs-fg2);\n}\n\n.rvs-banner.error {\n background: rgba(200, 60, 60, .16);\n color: var(--rvs-danger);\n}\n\n.rvs-banner.warn {\n background: rgba(226, 183, 20, .14);\n color: var(--rvs-git-m);\n}\n\n/* ------------------------------------------------- save conflict (refused) */\n\n/* The banner is a decision, not a message: it stacks its text over the actions\n so a narrow sidebar cannot squeeze the buttons into one unreadable row. */\n.rvs-conflict {\n display: flex;\n flex-direction: column;\n gap: 6px;\n white-space: normal;\n}\n\n.rvs-conflict-actions {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.rvs-conflict-diff {\n margin: 6px 8px;\n max-height: 40vh;\n overflow: auto;\n border: 1px solid var(--rvs-border);\n border-radius: 6px;\n background: var(--rvs-hover);\n color: var(--rvs-fg2);\n font-family: var(--rvs-mono);\n font-size: 11.5px;\n line-height: 1.45;\n}\n\n.rvs-conflict-diff-head {\n position: sticky;\n top: 0;\n padding: 4px 8px;\n background: var(--rvs-panel, var(--rvs-hover));\n border-bottom: 1px solid var(--rvs-border);\n font-family: inherit;\n}\n\n.rvs-conflict-hunk-head {\n padding: 2px 8px;\n color: var(--rvs-fg3);\n border-bottom: 1px solid var(--rvs-border);\n}\n\n.rvs-conflict-row {\n padding: 0 8px;\n white-space: pre;\n}\n\n.rvs-conflict-row.add {\n background: rgba(78, 201, 176, .14);\n color: var(--rvs-git-a);\n}\n\n.rvs-conflict-row.del {\n background: rgba(241, 76, 76, .12);\n color: var(--rvs-git-d);\n}\n\n.rvs-conflict-more {\n padding: 4px 8px;\n color: var(--rvs-fg3);\n}\n\n/* --------------------------------------------------------- source control */\n\n.rvs-scm-section {\n border-bottom: 1px solid var(--rvs-border);\n}\n\n.rvs-scm-head {\n display: flex;\n align-items: center;\n gap: 4px;\n height: 28px;\n padding: 0 6px 0 4px;\n cursor: pointer;\n user-select: none;\n font-size: 11px;\n font-weight: 700;\n letter-spacing: .04em;\n text-transform: uppercase;\n color: var(--rvs-fg2);\n}\n\n.rvs-scm-head:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-scm-head .rvs-count {\n margin-left: 6px;\n font-size: 11px;\n font-weight: 600;\n letter-spacing: 0;\n color: var(--rvs-fg3);\n}\n\n.rvs-scm-head-actions {\n margin-left: auto;\n display: flex;\n align-items: center;\n gap: 2px;\n}\n\n.rvs-scm-section.collapsed > *:not(.rvs-scm-head) {\n display: none !important;\n}\n\n.rvs-chevron {\n flex: none;\n transition: transform .12s ease;\n}\n\n.rvs-chevron.open {\n transform: rotate(90deg);\n}\n\n.rvs-scm-item {\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n padding: 3px 8px 3px 22px;\n border: none;\n background: transparent;\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12.5px;\n line-height: 19px;\n text-align: left;\n cursor: pointer;\n}\n\n.rvs-scm-item:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-scm-item.selected {\n background: var(--rvs-active);\n}\n\n.rvs-scm-path {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-scm-dir {\n flex: none;\n color: var(--rvs-fg3);\n}\n\n.rvs-scm-actions {\n flex: none;\n display: none;\n align-items: center;\n gap: 1px;\n}\n\n.rvs-scm-item:hover .rvs-scm-actions {\n display: flex;\n}\n\n.rvs-commit-box {\n flex: none;\n padding: 8px 10px;\n border-bottom: 1px solid var(--rvs-border);\n}\n\n.rvs-commit-input {\n width: 100%;\n min-height: 58px;\n max-height: 180px;\n padding: 6px 8px;\n border: 1px solid var(--rvs-border2);\n border-radius: 8px;\n background: var(--rvs-input);\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12.5px;\n line-height: 18px;\n resize: vertical;\n outline: none;\n}\n\n.rvs-commit-input:focus {\n border-color: var(--rvs-brand);\n}\n\n.rvs-commit-row {\n display: flex;\n gap: 6px;\n margin-top: 6px;\n}\n\n.rvs-commit-btn {\n flex: 1;\n padding: 5px 8px;\n border: none;\n border-radius: 6px;\n background: var(--rvs-accent);\n color: #fff;\n font: inherit;\n font-size: 12.5px;\n font-weight: 600;\n cursor: pointer;\n}\n\n.rvs-commit-btn:disabled {\n opacity: .45;\n cursor: default;\n}\n\n.rvs-repo-item {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 5px 10px 5px 12px;\n cursor: pointer;\n font-size: 12.5px;\n}\n\n.rvs-repo-item:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-repo-item.active {\n background: var(--rvs-active);\n}\n\n.rvs-repo-name {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-repo-branch {\n flex: none;\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n.rvs-pill {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 1px 8px;\n border-radius: 999px;\n background: var(--rvs-hover);\n font-size: 11px;\n font-weight: 600;\n color: var(--rvs-fg);\n}\n\n/* \"cached · refreshing\" badge: quieter than a pill that carries information the\n user asked for (a branch), because it is a qualifier on the list beside it. */\n.rvs-pill-cached {\n flex: none;\n font-weight: 500;\n color: var(--rvs-fg3);\n border: 1px solid var(--rvs-border2);\n background: transparent;\n}\n\n.rvs-subpanel {\n margin: 6px 8px;\n padding: 8px;\n border: 1px solid var(--rvs-border2);\n border-radius: 8px;\n font-size: 12px;\n}\n\n.rvs-subpanel-head {\n display: flex;\n align-items: center;\n gap: 6px;\n margin-bottom: 6px;\n color: var(--rvs-fg2);\n font-weight: 600;\n}\n\n.rvs-chip {\n flex: none;\n padding: 2px 8px;\n border: 1px solid var(--rvs-border2);\n border-radius: 6px;\n background: transparent;\n color: var(--rvs-fg);\n font: inherit;\n font-size: 11.5px;\n cursor: pointer;\n}\n\n.rvs-chip:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-chip.primary {\n background: var(--rvs-accent);\n border-color: transparent;\n color: #fff;\n}\n\n.rvs-chip.danger:hover {\n background: var(--rvs-danger);\n border-color: transparent;\n color: #fff;\n}\n\n.rvs-input {\n flex: 1;\n min-width: 0;\n padding: 4px 8px;\n border: 1px solid var(--rvs-border2);\n border-radius: 6px;\n background: var(--rvs-input);\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12px;\n outline: none;\n}\n\n.rvs-input:focus {\n border-color: var(--rvs-brand);\n}\n\n.rvs-select {\n flex: 1;\n min-width: 0;\n padding: 3px 6px;\n border: 1px solid var(--rvs-border2);\n border-radius: 6px;\n background: var(--rvs-input);\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12px;\n outline: none;\n color-scheme: light dark;\n}\n\n.rvs-select option {\n background: Canvas;\n color: CanvasText;\n}\n\n/* ------------------------------------------------- conversation-view mount */\n\n/**\n * Bound the center surface to the height the host gave the slot.\n *\n * `flex: 1 1 0` is the load-bearing declaration, and BOTH halves of it matter.\n * The host's own slot rules are:\n *\n * .wSkVaW_viewArea { flex: 1; min-height: 0; overflow: hidden }\n * [data-phase=active] .viewArea { flex: 1 0 auto; min-height: auto }\n * .wSkVaW_root { height: 100%; position: relative }\n *\n * While a conversation is active the slot's flex-basis is `auto`, so the slot's\n * height is driven by its child's INTRINSIC size. A full-height editor then\n * pushed it to 5510px for a 300-line file, the outer scroller took over, and\n * the tab strip and file info bar scrolled off the top with the code.\n *\n * `flex-basis: 0` breaks that cycle: the item stops contributing its content\n * height, so the slot stays the size the host intended and `.cm-scroller`\n * becomes the only scroller. Measured in the fixture (.spike/layout-fixture.html,\n * which mirrors the slot rules above) — only the bottom row fits:\n *\n * flex: 1 1 0 + min-height: 0 -> 736px OK\n * flex: 1 1 auto (i.e. `flex: 1`) -> 5510px broken\n * height: 0 + min-height: 100% -> 5510px broken\n * max-height: 100% -> 5510px broken\n * height: 100vh -> 5510px broken\n *\n * `height: 100%` is deliberately NOT set here any more. It resolves to `auto`\n * against a slot whose height is not definite — it reads like the fix but\n * measures as a no-op, which is how this regressed once already.\n *\n * NOT `position: absolute` either — that was another failed attempt: `.viewArea`\n * is not itself positioned, so `inset: 0` escaped to the host's `.wSkVaW_root`\n * (which is `position: relative`) and the plugin's global bar floated on top of\n * the host's 对话 / 轨迹 / 远程编辑器 tab row.\n *\n * The sidebar's `.rvs-viewslot` is deliberately not covered: it has a bounding\n * parent and this bug is specific to the conversation slot's `min-height: auto`\n * phase.\n */\n.rvs-center {\n flex: 1 1 0;\n display: flex;\n flex-direction: column;\n min-height: 0;\n min-width: 0;\n overflow: hidden;\n}\n\n/* ---------------------------------------------------------------- editor */\n\n.rvs-etabs {\n flex: none;\n display: flex;\n align-items: stretch;\n gap: 2px;\n height: 32px;\n padding: 0 4px;\n overflow-x: auto;\n overflow-y: hidden;\n border-bottom: 1px solid var(--rvs-border);\n scrollbar-width: none;\n}\n\n.rvs-etabs::-webkit-scrollbar {\n height: 0;\n}\n\n.rvs-etab {\n flex: none;\n display: flex;\n align-items: center;\n gap: 5px;\n max-width: 190px;\n margin: 4px 0;\n padding: 0 4px 0 8px;\n border: none;\n border-radius: 6px;\n background: transparent;\n color: var(--rvs-fg3);\n font: inherit;\n font-size: 12px;\n cursor: pointer;\n}\n\n.rvs-etab:hover {\n background: var(--rvs-hover);\n color: var(--rvs-fg);\n}\n\n.rvs-etab.active {\n background: var(--rvs-layer3);\n color: var(--rvs-fg);\n}\n\n.rvs-etab-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-etab-dot {\n flex: none;\n font-size: 9px;\n color: var(--rvs-git-m);\n}\n\n.rvs-etab-close {\n flex: none;\n width: 16px;\n height: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: none;\n border-radius: 4px;\n background: transparent;\n color: inherit;\n cursor: pointer;\n opacity: .65;\n}\n\n.rvs-etab-close:hover {\n background: var(--rvs-hover);\n opacity: 1;\n}\n\n.rvs-einfo {\n flex: none;\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 2px 8px 2px 10px;\n border-bottom: 1px solid var(--rvs-border);\n font-size: 11px;\n line-height: 18px;\n color: var(--rvs-fg3);\n}\n\n.rvs-einfo-path {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n /* Truncate from the LEFT (keep the tail) without reordering the text:\n `plaintext` gives the content its own LTR base direction, which is what\n stops a leading \"/\" from rendering as a trailing one. */\n direction: rtl;\n unicode-bidi: plaintext;\n text-align: left;\n}\n\n.rvs-einfo-spacer {\n margin-left: auto;\n}\n\n.rvs-status.dirty { color: var(--rvs-git-m); }\n.rvs-status.saved { color: var(--rvs-git-a); }\n.rvs-status.saving { color: var(--rvs-fg2); }\n\n.rvs-body {\n flex: 1;\n min-height: 0;\n min-width: 0;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n /* Anchors portalled overlays (the find widget) outside every scroller. */\n position: relative;\n background: var(--rvs-code-bg);\n color: var(--rvs-code-fg);\n}\n\n.rvs-editor-host {\n flex: 1;\n min-height: 0;\n overflow: hidden;\n background: var(--rvs-code-bg);\n}\n\n/* Keep a panel mounted but out of layout (and out of the a11y tree). Used by\n the editor host in preview mode: unmounting it destroyed the buffer and the\n undo stack, hiding it preserves both. */\n.rvs-hidden {\n display: none !important;\n}\n\n/* Find-match marks. Painted by our own StateField (`findMatchHighlight`), and\n deliberately the SAME colours as the `.cm-searchMatch` rules below so the\n two paths cannot drift apart. */\n.rvs-find-match {\n background-color: rgba(226, 183, 20, .30);\n outline: 1px solid rgba(226, 183, 20, .55);\n border-radius: 2px;\n}\n\n.rvs-find-match.current {\n background-color: rgba(226, 183, 20, .48);\n}\n\n/* ------------------------------------------------------- preview surfaces */\n\n.rvs-preview-img {\n flex: 1;\n min-height: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: auto;\n background-color: var(--rvs-code-bg);\n background-image:\n linear-gradient(45deg, rgba(127, 127, 127, .08) 25%, transparent 25%),\n linear-gradient(-45deg, rgba(127, 127, 127, .08) 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, rgba(127, 127, 127, .08) 75%),\n linear-gradient(-45deg, transparent 75%, rgba(127, 127, 127, .08) 75%);\n background-size: 20px 20px, 20px 20px, 20px 20px, 20px 20px;\n background-position: 0 0, 0 10px, 10px -10px, -10px 0;\n}\n\n.rvs-preview-img img {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n image-rendering: auto;\n}\n\n.rvs-markdown {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 12px 14px 24px;\n font-size: 13px;\n line-height: 1.7;\n color: var(--rvs-code-fg);\n background: var(--rvs-code-bg);\n user-select: text;\n}\n\n.rvs-markdown h1, .rvs-markdown h2, .rvs-markdown h3, .rvs-markdown h4 {\n margin: 14px 0 6px;\n line-height: 1.35;\n}\n\n.rvs-markdown h1 { font-size: 19px; border-bottom: 1px solid var(--rvs-border); padding-bottom: 5px; }\n.rvs-markdown h2 { font-size: 16px; border-bottom: 1px solid var(--rvs-border); padding-bottom: 4px; }\n.rvs-markdown h3 { font-size: 14px; }\n.rvs-markdown p { margin: 6px 0; }\n.rvs-markdown ul, .rvs-markdown ol { margin: 6px 0; padding-left: 22px; }\n.rvs-markdown li { margin: 2px 0; }\n.rvs-markdown code {\n padding: 1px 5px;\n border-radius: 4px;\n background: var(--rvs-hover);\n font-family: var(--rvs-mono);\n font-size: 12px;\n}\n.rvs-markdown pre {\n margin: 8px 0;\n padding: 9px 11px;\n border-radius: 8px;\n background: var(--rvs-input);\n overflow-x: auto;\n}\n.rvs-markdown pre code { padding: 0; background: transparent; }\n.rvs-markdown blockquote {\n margin: 8px 0;\n padding: 2px 12px;\n border-left: 3px solid var(--rvs-border2);\n color: var(--rvs-fg2);\n}\n.rvs-markdown a { color: var(--dsw-alias-label-link, #58a6ff); text-decoration: none; }\n.rvs-markdown a:hover { text-decoration: underline; }\n.rvs-markdown table { border-collapse: collapse; margin: 8px 0; font-size: 12px; }\n.rvs-markdown th, .rvs-markdown td { border: 1px solid var(--rvs-border2); padding: 4px 8px; }\n.rvs-markdown hr { border: none; border-top: 1px solid var(--rvs-border); margin: 12px 0; }\n\n.rvs-html-frame {\n flex: 1;\n min-height: 0;\n width: 100%;\n border: none;\n background: #fff;\n}\n\n/* ------------------------------------------------------------------ diff */\n\n.rvs-diff {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n\n.rvs-diff-toolbar {\n flex: none;\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 3px 8px;\n border-bottom: 1px solid var(--rvs-border);\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n/**\n * Prev/next change, in the toolbar's free space.\n *\n * Two chevrons around a tabular counter: the pair then reads as \"jump to change\n * n of N\" instead of two anonymous arrows, and the counter doubles as the \"where\n * am I\" cue while scrolling by hand.\n */\n.rvs-hunknav {\n display: inline-flex;\n align-items: center;\n gap: 1px;\n margin-right: 2px;\n}\n\n.rvs-hunknav-pos {\n min-width: 30px;\n text-align: center;\n font-size: 11px;\n font-variant-numeric: tabular-nums;\n color: var(--rvs-fg3);\n user-select: none;\n}\n\n.rvs-seg {\n display: inline-flex;\n border: 1px solid var(--rvs-border2);\n border-radius: 6px;\n overflow: hidden;\n}\n\n.rvs-seg button {\n padding: 2px 9px;\n border: none;\n background: transparent;\n color: var(--rvs-fg2);\n font: inherit;\n font-size: 11px;\n cursor: pointer;\n}\n\n.rvs-seg button.active {\n background: var(--rvs-active);\n color: var(--rvs-fg);\n}\n\n.rvs-seg button:hover:not(.active) {\n background: var(--rvs-hover);\n}\n\n.rvs-diff-grid {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n overflow-x: hidden;\n font-family: var(--rvs-mono);\n font-size: 12px;\n line-height: 18px;\n scrollbar-width: thin;\n background: var(--rvs-code-bg);\n color: var(--rvs-code-fg);\n}\n\n/**\n * Top horizontal scrollbar.\n *\n * The two panes scroll horizontally on their own — so a long line can never\n * widen the layout — and this proxy bar drives both of them from the TOP of\n * the view, instead of forcing a scroll to the bottom of the file to reach a\n * horizontal bar. Its inner spacer is sized to the widest line, and the\n * component only renders it when a line really is wider than the grid.\n *\n * Sized and coloured to be SEEN: as a 13 px band with `scrollbar-width: thin`\n * and a faint thumb, it read as \"there is no horizontal scrollbar at all\".\n */\n.rvs-hbar {\n flex: none;\n height: 15px;\n overflow-x: auto;\n overflow-y: hidden;\n border-bottom: 1px solid var(--rvs-border);\n background: var(--rvs-hover);\n}\n\n.rvs-hbar-inner {\n height: 1px;\n}\n\n.rvs-hbar::-webkit-scrollbar {\n height: 11px;\n}\n\n.rvs-hbar::-webkit-scrollbar-thumb {\n background: var(--dsw-alias-scrollbar-bg-l2, rgba(150, 160, 180, .75));\n border-radius: 6px;\n border: 2px solid transparent;\n background-clip: padding-box;\n}\n\n.rvs-hbar::-webkit-scrollbar-thumb:hover {\n background: var(--dsw-alias-scrollbar-hover-l2, rgba(170, 180, 200, .95));\n background-clip: padding-box;\n}\n\n.rvs-hbar::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.rvs-diff-cols {\n display: flex;\n align-items: stretch;\n min-width: 0;\n}\n\n/**\n * One diff pane. `flex: 1 1 0` keeps the panes EXACTLY equal however long a\n * line is (the previous row markup let a long line widen its own pane, which\n * is what broke the symmetry). Each pane keeps its own horizontal scroll, and\n * its scrollbar is now VISIBLE: the top proxy remains the convenient control,\n * but the pane's own bar is what a user reaches for first, and it sits right\n * under the content when the file is shorter than the view.\n */\n.rvs-diff-col {\n flex: 1 1 0;\n min-width: 0;\n overflow-x: auto;\n overflow-y: hidden;\n}\n\n.rvs-diff-col::-webkit-scrollbar {\n height: 9px;\n width: 0;\n}\n\n.rvs-diff-col::-webkit-scrollbar-thumb {\n background: var(--dsw-alias-scrollbar-bg-l2, rgba(150, 160, 180, .6));\n border-radius: 5px;\n}\n\n.rvs-diff-col::-webkit-scrollbar-thumb:hover {\n background: var(--dsw-alias-scrollbar-hover-l2, rgba(170, 180, 200, .85));\n}\n\n.rvs-diff-col::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.rvs-dline {\n display: flex;\n align-items: flex-start;\n height: 18px;\n line-height: 18px;\n white-space: pre;\n}\n\n.rvs-dline-num {\n /* Pinned while the line scrolls sideways, so a long line never takes the\n line numbers away with it. */\n position: sticky;\n left: 0;\n z-index: 1;\n flex: none;\n width: 3.4em;\n padding-right: 6px;\n text-align: right;\n color: var(--rvs-fg3);\n opacity: .85;\n user-select: none;\n background: var(--rvs-code-bg);\n}\n\n.rvs-row-del .rvs-dline-num {\n background: var(--rvs-del-solid);\n}\n\n.rvs-row-add .rvs-dline-num {\n background: var(--rvs-add-solid);\n}\n\n.rvs-dline-text {\n flex: 1;\n padding-right: 10px;\n user-select: text;\n}\n\n.rvs-gutter-col {\n flex: none;\n width: 30px;\n border-left: 1px solid var(--rvs-border);\n border-right: 1px solid var(--rvs-border);\n user-select: none;\n}\n\n.rvs-gutter-line {\n height: 18px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.rvs-diff-grid::-webkit-scrollbar {\n width: 9px;\n height: 0;\n}\n\n.rvs-diff-grid::-webkit-scrollbar-thumb {\n background: var(--dsw-alias-scrollbar-bg-l2, rgba(127, 127, 127, .4));\n border-radius: 4px;\n}\n\n.rvs-num {\n flex: none;\n display: inline-block;\n width: 3.2em;\n padding-right: 6px;\n text-align: right;\n color: var(--rvs-fg3);\n opacity: .6;\n user-select: none;\n}\n\n.rvs-row-del {\n background: var(--rvs-del-bg);\n}\n\n.rvs-row-del .rvs-dline-text,\n.rvs-row-del .rvs-dline-num,\n.rvs-row-del .rvs-num {\n color: #f14c4c;\n}\n\n.rvs-row-add {\n background: var(--rvs-add-bg);\n}\n\n.rvs-row-add .rvs-dline-text,\n.rvs-row-add .rvs-dline-num,\n.rvs-row-add .rvs-num {\n color: #4ec9b0;\n}\n\n.rvs-row-empty {\n color: var(--rvs-fg3);\n opacity: .35;\n}\n\n.rvs-gutter {\n flex: none;\n width: 30px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-left: 1px solid var(--rvs-border);\n border-right: 1px solid var(--rvs-border);\n user-select: none;\n}\n\n.rvs-gutter-dot {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n opacity: .7;\n}\n\n.rvs-hunk-btns {\n display: flex;\n gap: 2px;\n}\n\n.rvs-hunk-btn {\n width: 13px;\n height: 15px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: none;\n border-radius: 3px;\n background: transparent;\n color: var(--rvs-fg3);\n font-size: 11px;\n line-height: 1;\n cursor: pointer;\n}\n\n.rvs-hunk-btn:hover {\n background: var(--rvs-hover);\n color: var(--rvs-fg);\n}\n\n.rvs-hunk-btn.stage:hover {\n color: var(--rvs-git-a);\n}\n\n.rvs-hunk-btn.revert:hover {\n color: var(--rvs-git-d);\n}\n\n/**\n * Token colors: VS Code Dark+ / Light+, matching the CodeMirror theme in\n * `vsc/editor-theme.ts`. Keeping ONE palette for both surfaces means a file\n * does not change colors when the diff is switched to its editable side.\n */\n.rvs-t-comment { color: #6a9955; }\n.rvs-t-string { color: #ce9178; }\n.rvs-t-keyword { color: #569cd6; }\n.rvs-t-number { color: #b5cea8; }\n.rvs-t-func { color: #dcdcaa; }\n.rvs-t-type { color: #4ec9b0; }\n.rvs-t-attr { color: #9cdcfe; }\n.rvs-t-variable { color: #9cdcfe; }\n.rvs-t-operator { color: #d4d4d4; }\n.rvs-t-punct { color: #d4d4d4; }\n.rvs-t-tag { color: #569cd6; }\n.rvs-t-meta { color: #c586c0; }\n.rvs-t-insert { color: #4ec9b0; }\n.rvs-t-delete { color: #f14c4c; }\n\nbody:not([data-ds-dark-theme]) .rvs-t-comment { color: #008000; }\nbody:not([data-ds-dark-theme]) .rvs-t-string { color: #a31515; }\nbody:not([data-ds-dark-theme]) .rvs-t-keyword { color: #0000ff; }\nbody:not([data-ds-dark-theme]) .rvs-t-number { color: #098658; }\nbody:not([data-ds-dark-theme]) .rvs-t-func { color: #795e26; }\nbody:not([data-ds-dark-theme]) .rvs-t-type { color: #267f99; }\nbody:not([data-ds-dark-theme]) .rvs-t-attr,\nbody:not([data-ds-dark-theme]) .rvs-t-variable { color: #001080; }\nbody:not([data-ds-dark-theme]) .rvs-t-operator,\nbody:not([data-ds-dark-theme]) .rvs-t-punct { color: #1f1f1f; }\nbody:not([data-ds-dark-theme]) .rvs-t-meta { color: #af00db; }\n\n/**\n * CodeMirror token colors, applied through FIXED class names emitted by the\n * highlight style (`vsc/editor-palette.ts`). Fixed names mean the colors come\n * from this stylesheet — the same one that paints the rest of the UI — so a\n * code file can never go monochrome because a generated class name changed or\n * an injected style failed. Same Dark+ / Light+ palette as the diff panes\n * above, so a file keeps its colors when switching between the two views.\n */\n.rvs-ck-comment { color: #6a9955; }\n.rvs-ck-keyword { color: #569cd6; }\n.rvs-ck-control { color: #c586c0; }\n.rvs-ck-string { color: #ce9178; }\n.rvs-ck-regexp { color: #d16969; }\n.rvs-ck-number { color: #b5cea8; }\n.rvs-ck-constant { color: #569cd6; }\n.rvs-ck-func { color: #dcdcaa; }\n.rvs-ck-type { color: #4ec9b0; }\n.rvs-ck-variable { color: #9cdcfe; }\n.rvs-ck-attr { color: #9cdcfe; }\n.rvs-ck-meta { color: #c586c0; }\n.rvs-ck-punct { color: #d4d4d4; }\n.rvs-ck-op { color: #d4d4d4; }\n.rvs-ck-heading { color: #569cd6; font-weight: 700; }\n.rvs-ck-em { font-style: italic; }\n.rvs-ck-link { color: #9cdcfe; text-decoration: underline; }\n.rvs-ck-strike { text-decoration: line-through; }\n.rvs-ck-invalid { color: #f44747; }\n\nbody:not([data-ds-dark-theme]) .rvs-ck-comment { color: #008000; }\nbody:not([data-ds-dark-theme]) .rvs-ck-keyword { color: #0000ff; }\nbody:not([data-ds-dark-theme]) .rvs-ck-control { color: #af00db; }\nbody:not([data-ds-dark-theme]) .rvs-ck-string { color: #a31515; }\nbody:not([data-ds-dark-theme]) .rvs-ck-regexp { color: #811f3f; }\nbody:not([data-ds-dark-theme]) .rvs-ck-number { color: #098658; }\nbody:not([data-ds-dark-theme]) .rvs-ck-constant { color: #0070c1; }\nbody:not([data-ds-dark-theme]) .rvs-ck-func { color: #795e26; }\nbody:not([data-ds-dark-theme]) .rvs-ck-type { color: #267f99; }\nbody:not([data-ds-dark-theme]) .rvs-ck-variable { color: #001080; }\nbody:not([data-ds-dark-theme]) .rvs-ck-attr { color: #e50000; }\nbody:not([data-ds-dark-theme]) .rvs-ck-meta { color: #0000ff; }\nbody:not([data-ds-dark-theme]) .rvs-ck-punct,\nbody:not([data-ds-dark-theme]) .rvs-ck-op { color: #1f1f1f; }\nbody:not([data-ds-dark-theme]) .rvs-ck-heading { color: #0000ff; }\nbody:not([data-ds-dark-theme]) .rvs-ck-link { color: #001080; }\nbody:not([data-ds-dark-theme]) .rvs-ck-invalid { color: #cd3131; }\n\n/**\n * Opaque editor surface, also as plain CSS: the CodeMirror theme paints it too\n * (following the scheme through a Compartment), but a transparent editor is\n * the one failure a user notices immediately, so the container states it as\n * well.\n */\n.rvs-edge .cm-editor,\n.rvs-edge .cm-scroller,\n.rvs-edge .cm-gutters {\n background-color: var(--rvs-code-bg);\n}\n\n.rvs-edge .cm-editor {\n color: var(--rvs-code-fg);\n}\n\n.rvs-edge .cm-gutters {\n color: var(--rvs-code-gutter-fg, var(--rvs-fg3));\n border-right: 1px solid var(--rvs-border);\n}\n\n.rvs-edge .cm-activeLine {\n background-color: rgba(127, 127, 127, .08);\n}\n\n.rvs-edge .cm-activeLineGutter {\n background-color: rgba(127, 127, 127, .12);\n}\n\n/**\n * The code editor's own scrollbars.\n *\n * These had NO rule at all: CodeMirror's scroller is `.cm-scroller`, which is\n * none of `.rvs-scroll` / `.rvs-diff-grid` / `.rvs-hbar`, so the editor fell\n * back to the browser default — too thin to hit with a mouse.\n *\n * Both notations are needed and must stay in step: Chromium honours\n * `scrollbar-width` over `::-webkit-scrollbar` when both apply, so setting\n * only the webkit half would silently have no effect. Keep the numbers equal.\n */\n.rvs-edge .cm-scroller {\n scrollbar-width: auto;\n}\n\n.rvs-edge .cm-scroller::-webkit-scrollbar {\n width: 14px;\n height: 14px;\n}\n\n.rvs-edge .cm-scroller::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.rvs-edge .cm-scroller::-webkit-scrollbar-thumb {\n /* Opaque, not a translucent token: a thin wash over code is exactly the\n low-contrast target that is hard to grab. */\n background: rgba(121, 121, 121, .8);\n border: 3px solid transparent;\n border-radius: 7px;\n background-clip: padding-box;\n min-height: 36px;\n}\n\n.rvs-edge .cm-scroller::-webkit-scrollbar-thumb:hover {\n background: rgba(150, 150, 150, .95);\n border: 3px solid transparent;\n background-clip: padding-box;\n}\n\n.rvs-edge .cm-scroller::-webkit-scrollbar-corner {\n background: transparent;\n}\n\n/* ------------------------------------------------------------ find widget */\n\n/**\n * \"You landed here\": the transient highlight on the line a jump landed on\n * (search hit, @-reference).\n *\n * Deliberately NOT a warm/amber wash: over the dark editor that muddies into a\n * brown-black band that reads as a shadow and swallows annotation colors. This\n * is the accent blue instead — a tinted band with a bright edge on the left and\n * hairlines top/bottom, so it reads as a marked region while every token keeps\n * its own colour and contrast.\n */\n.rvs-reveal-line {\n background-color: rgba(88, 166, 255, .22);\n box-shadow:\n inset 3px 0 0 0 #58a6ff,\n inset 0 1px 0 0 rgba(88, 166, 255, .38),\n inset 0 -1px 0 0 rgba(88, 166, 255, .38);\n}\n\nbody:not([data-ds-dark-theme]) .rvs-reveal-line {\n background-color: rgba(77, 107, 254, .14);\n box-shadow:\n inset 3px 0 0 0 #4d6bfe,\n inset 0 1px 0 0 rgba(77, 107, 254, .35),\n inset 0 -1px 0 0 rgba(77, 107, 254, .35);\n}\n\n/* --------------------------------------------------------- session changes */\n\n/**\n * 「本会话改了什么」:代码行背景 + 左侧改动栏(Cursor 风格)。\n *\n * 三种形态必须**一眼分得开**,光靠绿/红两个色相不够(色弱用户看新增行和删除行\n * 会糊成同一片),所以每种的左侧色条宽度/花样的语义也不同:\n * - 新增:实心绿条;\n * - 修改:实心蓝条(不是绿:修改块里既有留下的行也有新写的行,用\"中性的已变更\"\n * 色不会误导读者以为整块都是新内容);\n * - 删除:**斜纹**红底 + 更粗的红条 —— 这一行其实已经不存在了,只在中止位置上\n * 留个锚点,斜纹是这一层\"虚\"的信息里最不容易被当成真内容的花样。\n *\n * 选择器带上 `.cm-line`:`.cm-activeLine` 由 CodeMirror 的主题注入(运行时\n * `<style>`,通常排在本文档之后),只写 `.rvs-change-*` 两者同权重时会输给它,\n * 光标所在的那一行改动就会消失。\n */\n.rvs-edge .cm-line.rvs-change-add {\n background-color: rgba(46, 160, 67, .17);\n box-shadow:\n inset 3px 0 0 0 #2ea043,\n inset 0 -1px 0 0 rgba(46, 160, 67, .28);\n}\n\n.rvs-edge .cm-line.rvs-change-mod {\n background-color: rgba(56, 139, 253, .15);\n box-shadow:\n inset 3px 0 0 0 #388bfd,\n inset 0 -1px 0 0 rgba(56, 139, 253, .28);\n}\n\n.rvs-edge .cm-line.rvs-change-del {\n background-color: rgba(248, 81, 73, .09);\n background-image: repeating-linear-gradient(135deg, rgba(248, 81, 73, .17) 0 6px, transparent 6px 12px);\n box-shadow: inset 4px 0 0 0 #f85149;\n}\n\n/* 改动栏本身:符号 + 一列与行背景同色的窄条,读起来才是一条\"改动边\"。 */\n.rvs-edge .cm-gutterElement.rvs-change-gutter-add {\n box-shadow: inset 2px 0 0 0 #2ea043;\n}\n\n.rvs-edge .cm-gutterElement.rvs-change-gutter-mod {\n box-shadow: inset 2px 0 0 0 #388bfd;\n}\n\n.rvs-edge .cm-gutterElement.rvs-change-gutter-del {\n box-shadow: inset 2px 0 0 0 #f85149;\n}\n\n.rvs-edge .rvs-change-mark {\n display: inline-block;\n width: 12px;\n font-family: var(--rvs-mono);\n font-size: 12px;\n line-height: 1;\n text-align: center;\n user-select: none;\n}\n\n.rvs-edge .rvs-change-mark-add { color: #2ea043; }\n.rvs-edge .rvs-change-mark-mod { color: #388bfd; }\n.rvs-edge .rvs-change-mark-del { color: #f85149; }\n\n/**\n * 行内(字符级)差异:上面那三种底色回答\"哪几行变了\",这两条回答\"那一行的哪几个\n * 字变了\"。只改一个词的编辑,整行同色时完全看不出改了什么。\n *\n * `rvs-change-word-add` 刻意**只给背景、不给 `color`**:代码有自己的语法着色,\n * 覆盖前景色会把关键字/字符串/注释染成同一种颜色,比不标还难读。透明度压在行\n * 底色之上一点点,叠起来仍读得出\"整块改动\"的边界,又能看出块内哪几个字是新的。\n */\n.rvs-edge .rvs-change-word-add {\n background-color: rgba(46, 160, 67, .22);\n border-radius: 2px;\n}\n\n/**\n * 被删掉、在新文件里已经不存在的内容:零宽 widget,红底 + 删除线。\n *\n * 删除线画在 chip 自己身上(chip 是独立元素,不会波及周围代码);`white-space:\n * pre` 保留被删文本自己的缩进 —— 截断/去空白都会让 chip 谎报\"删了什么\"。\n * 字号略小 + 降一点不透明度,是让它读起来像\"残留物\"而不是一行真代码。\n */\n.rvs-edge .rvs-change-word-del {\n padding: 0 3px;\n margin: 0 1px;\n border-radius: 3px;\n background-color: rgba(248, 81, 73, .18);\n font-size: .92em;\n text-decoration: line-through;\n opacity: .85;\n white-space: pre;\n}\n\n/**\n * 撑宽度的隐形符号:只用它占位,绝不显示(见 `change-marks.ts` 的 SpacerMarker,\n * CodeMirror 会给这个 spacer 元素加 `visibility: hidden`,这里不重复声明)。\n */\n.rvs-edge .rvs-change-spacer {\n opacity: 0;\n}\n\n/* 浅色主题:同样的色相,压暗 + 提高不透明度,在近白底上才看得清。 */\nbody:not([data-ds-dark-theme]) .rvs-edge .cm-line.rvs-change-add {\n background-color: rgba(31, 136, 61, .13);\n box-shadow:\n inset 3px 0 0 0 #1f883d,\n inset 0 -1px 0 0 rgba(31, 136, 61, .22);\n}\n\nbody:not([data-ds-dark-theme]) .rvs-edge .cm-line.rvs-change-mod {\n background-color: rgba(9, 105, 218, .12);\n box-shadow:\n inset 3px 0 0 0 #0969da,\n inset 0 -1px 0 0 rgba(9, 105, 218, .22);\n}\n\nbody:not([data-ds-dark-theme]) .rvs-edge .cm-line.rvs-change-del {\n background-color: rgba(207, 34, 46, .07);\n background-image: repeating-linear-gradient(135deg, rgba(207, 34, 46, .14) 0 6px, transparent 6px 12px);\n box-shadow: inset 4px 0 0 0 #cf222e;\n}\n\nbody:not([data-ds-dark-theme]) .rvs-edge .cm-gutterElement.rvs-change-gutter-add {\n box-shadow: inset 2px 0 0 0 #1f883d;\n}\n\nbody:not([data-ds-dark-theme]) .rvs-edge .cm-gutterElement.rvs-change-gutter-mod {\n box-shadow: inset 2px 0 0 0 #0969da;\n}\n\nbody:not([data-ds-dark-theme]) .rvs-edge .cm-gutterElement.rvs-change-gutter-del {\n box-shadow: inset 2px 0 0 0 #cf222e;\n}\n\nbody:not([data-ds-dark-theme]) .rvs-edge .rvs-change-mark-add { color: #1f883d; }\nbody:not([data-ds-dark-theme]) .rvs-edge .rvs-change-mark-mod { color: #0969da; }\nbody:not([data-ds-dark-theme]) .rvs-edge .rvs-change-mark-del { color: #cf222e; }\n\n/* 浅色主题的行内差异:同样的色相压暗,在近白底上才看得清(暗色那套会糊成一片)。 */\nbody:not([data-ds-dark-theme]) .rvs-edge .rvs-change-word-add {\n background-color: rgba(26, 127, 55, .18);\n}\n\nbody:not([data-ds-dark-theme]) .rvs-edge .rvs-change-word-del {\n background-color: rgba(207, 34, 46, .14);\n}\n\n/**\n * 改动跳转按钮:浮在编辑器右上角。\n *\n * 放在编辑器上而不是面板里 —— 文件打开后光标就在这里,而面板可能被收起、被滚走。\n * 容器 `.rvs-body` 已经是 `position: relative`(它本来用于挂 find 浮层),所以这里\n * 只做绝对定位,不引入新的定位上下文。`pointer-events` 只开在按钮上:这块区域压在\n * 编辑器文字上方,整块可点会把右上角那几行变成死区。\n */\n.rvs-change-nav {\n position: absolute;\n top: 8px;\n right: 14px;\n z-index: 5;\n display: flex;\n align-items: center;\n gap: 2px;\n padding: 3px 4px;\n border: 1px solid var(--rvs-border2);\n border-radius: 8px;\n background: Canvas;\n box-shadow: 0 2px 8px rgba(0, 0, 0, .28);\n pointer-events: none;\n}\n\n/* The counter is what makes this read as \"3 of 7 changes\" rather than two\n anonymous arrows — and it keeps the buttons from looking like decoration. */\n.rvs-change-nav-count {\n padding: 0 6px 0 4px;\n color: var(--rvs-fg2);\n font-size: 11px;\n font-variant-numeric: tabular-nums;\n line-height: 22px;\n white-space: nowrap;\n}\n\n.rvs-change-nav-btn {\n width: 26px;\n height: 22px;\n padding: 0;\n border: 1px solid transparent;\n border-radius: 5px;\n background: transparent;\n color: var(--rvs-fg);\n font-size: 13px;\n font-weight: 600;\n line-height: 20px;\n text-align: center;\n cursor: pointer;\n pointer-events: auto;\n}\n\n.rvs-change-nav-btn:hover {\n border-color: var(--rvs-border2);\n background: var(--rvs-hover);\n color: var(--rvs-brand);\n}\n\n.rvs-change-nav-btn:active { background: var(--rvs-active); }\n\n/**\n * 悬浮在改动行上出现的「撤销这处改动」按钮。\n *\n * 它**不在编辑器的 DOM 里**:`undo-affordance.ts` 把它当 `position: fixed` 的元素挂到\n * `document.body`(和「添加到对话」那个浮层同一套做法),所以这里的选择器不带\n * `.rvs-edge` —— 带上了就一条都不生效。固定定位 + 高 z-index 是刻意的:宿主容器有\n * `overflow: hidden`,挂在里面会被 CodeMirror 的滚动层裁掉。\n *\n * 颜色按\"危险动作\"给:默认红边红字、悬停实心红。底色不透明(不用半透明的 overlay\n * token),否则后面的代码文字会透出来。\n */\n.rvs-undo-affordance {\n position: fixed;\n z-index: 2100;\n display: inline-flex;\n align-items: center;\n gap: 4px;\n max-width: 220px;\n padding: 3px 9px;\n border: 1px solid #f85149;\n border-radius: 6px;\n background-color: #1e2229;\n color: #ffb4ae;\n /* 按钮挂在 body 上,没有 .rvs-edge 的字体上下文:跟随宿主页面字体。 */\n font-family: inherit;\n font-size: 12px;\n line-height: 1.5;\n white-space: nowrap;\n cursor: pointer;\n box-shadow: 0 6px 18px rgba(0, 0, 0, .45);\n /* 纵向以悬停行的中线对齐(横向坐标由 JS 按行尾算好)。 */\n transform: translateY(-50%);\n}\n\n.rvs-undo-affordance:hover {\n background-color: #f85149;\n border-color: #f85149;\n color: #fff;\n}\n\n.rvs-undo-affordance:active {\n transform: translateY(-50%) scale(.97);\n}\n\n.rvs-undo-affordance:focus-visible {\n outline: 2px solid #58a6ff;\n outline-offset: 1px;\n}\n\n/* 删除锚点:这一行其实已经不在了,虚线边框把它和\"真实存在的行\"分开。 */\n.rvs-undo-affordance[data-kind=\"del\"] {\n border-style: dashed;\n}\n\nbody:not([data-ds-dark-theme]) .rvs-undo-affordance {\n border-color: #cf222e;\n background-color: #ffffff;\n color: #a40e26;\n box-shadow: 0 6px 18px rgba(31, 35, 40, .18);\n}\n\nbody:not([data-ds-dark-theme]) .rvs-undo-affordance:hover {\n background-color: #cf222e;\n border-color: #cf222e;\n color: #fff;\n}\n\nbody:not([data-ds-dark-theme]) .rvs-undo-affordance:focus-visible {\n outline-color: #4d6bfe;\n}\n\n/**\n * CodeMirror's own search decorations, also stated here: the editor's theme is\n * injected by the library, and these must stay readable even when only this\n * stylesheet is in play.\n */\n.rvs-edge .cm-searchMatch {\n background-color: rgba(226, 183, 20, .30);\n outline: 1px solid rgba(226, 183, 20, .55);\n}\n\n.rvs-edge .cm-searchMatch-selected {\n background-color: rgba(226, 183, 20, .48);\n}\n\n.rvs-edge .cm-selectionBackground,\n.rvs-edge .cm-content ::selection {\n background-color: rgba(58, 110, 165, .55) !important;\n}\n\n/** Build stamp in the editor info bar: identifies the loaded client bundle. */\n.rvs-build {\n flex: none;\n padding: 0 5px;\n border: 1px solid var(--rvs-border);\n border-radius: 4px;\n color: var(--rvs-fg3);\n font-size: 10px;\n font-family: var(--rvs-mono);\n opacity: .85;\n user-select: text;\n}\n\n.rvs-find {\n position: absolute;\n top: 6px;\n right: 18px;\n z-index: 30;\n display: flex;\n align-items: center;\n gap: 3px;\n padding: 3px 4px 3px 7px;\n border: 1px solid var(--rvs-border2);\n border-radius: 8px;\n background-color: Canvas;\n background-image: linear-gradient(var(--dsw-alias-bg-overlay, transparent), var(--dsw-alias-bg-overlay, transparent));\n color: var(--rvs-fg);\n box-shadow: 0 4px 14px rgba(0, 0, 0, .28);\n font-size: 12px;\n}\n\n.rvs-find-input {\n width: 170px;\n padding: 2px 6px;\n border: 1px solid var(--rvs-border2);\n border-radius: 5px;\n background: var(--rvs-input);\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12px;\n outline: none;\n}\n\n.rvs-find-input:focus {\n border-color: var(--rvs-brand);\n}\n\n.rvs-find-count {\n flex: none;\n min-width: 54px;\n text-align: center;\n color: var(--rvs-fg3);\n font-size: 11px;\n white-space: nowrap;\n}\n\n.rvs-find-count.none {\n color: var(--rvs-git-d);\n}\n\n.rvs-code {\n flex: 1;\n min-height: 0;\n overflow: auto;\n margin: 0;\n padding: 6px 0 16px;\n font-family: var(--rvs-mono);\n font-size: 12.5px;\n line-height: 18px;\n white-space: pre;\n scrollbar-width: thin;\n background: var(--rvs-code-bg);\n color: var(--rvs-code-fg);\n}\n\n.rvs-code-line {\n display: flex;\n align-items: flex-start;\n min-width: max-content;\n}\n\n.rvs-code-line:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-code-text {\n flex: 1;\n padding-right: 10px;\n white-space: pre-wrap;\n word-break: break-word;\n user-select: text;\n}\n\n/* ---------------------------------------------------------- history list */\n\n.rvs-commit-item {\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n padding: 4px 8px 4px 4px;\n border: none;\n background: transparent;\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12.5px;\n line-height: 18px;\n text-align: left;\n cursor: pointer;\n}\n\n.rvs-commit-item:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-commit-item.selected {\n background: var(--rvs-active);\n}\n\n.rvs-graph-svg {\n flex: none;\n display: block;\n}\n\n.rvs-commit-hash {\n flex: none;\n font-family: var(--rvs-mono);\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n.rvs-commit-msg {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-commit-date {\n flex: none;\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n.rvs-ref-badge {\n flex: none;\n padding: 0 5px;\n border-radius: 8px;\n border: 1px solid var(--rvs-border2);\n font-size: 10px;\n line-height: 15px;\n color: var(--rvs-fg2);\n}\n\n.rvs-ref-badge.head {\n border-color: var(--rvs-brand);\n background: rgba(77, 107, 254, .2);\n color: var(--rvs-fg);\n}\n\n.rvs-ref-badge.tag {\n border-color: rgba(226, 183, 20, .55);\n background: rgba(226, 183, 20, .16);\n color: var(--rvs-git-m);\n}\n\n.rvs-detail {\n margin: 0 6px 8px;\n padding: 8px 10px;\n border: 1px solid var(--rvs-border2);\n border-left: 3px solid var(--rvs-accent);\n border-radius: 8px;\n background: var(--rvs-layer3);\n font-size: 12px;\n}\n\n.rvs-detail-meta {\n color: var(--rvs-fg3);\n font-size: 11px;\n margin-bottom: 6px;\n white-space: pre-wrap;\n}\n\n.rvs-file-row {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 2px 4px;\n border-radius: 5px;\n cursor: pointer;\n}\n\n.rvs-file-row:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-file-path {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n /* Same tail-first truncation as the info bar; `plaintext` keeps the path's\n own LTR order (see .rvs-einfo-path). */\n direction: rtl;\n unicode-bidi: plaintext;\n text-align: left;\n}\n\n.rvs-file-status {\n flex: none;\n width: 16px;\n text-align: center;\n font-weight: 700;\n font-size: 11px;\n}\n\n/* ------------------------------------------------------- commit pane */\n\n/**\n * The history panel's bottom half: the graph keeps the top, the selected\n * commit takes this pane below the drag handle (same gesture and styling as\n * the editor split, so `.rvs-vsplit-handle` is reused rather than copied).\n */\n.rvs-history-body {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n}\n\n.rvs-hpane {\n flex: none;\n min-height: 140px;\n max-height: 82%;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n border-top: 1px solid var(--rvs-border);\n /* Same glass as the graph above (the sidebar's own backdrop shows through):\n an opaque `.rvs-code-bg` here read as a separate dark slab glued under the\n list. Patch rows already carry their own translucent add/del washes, so the\n diff stays legible without a filled background. */\n background: transparent;\n}\n\n/* Full-height mode: the graph is hidden by the panel, so the pane takes the\n remaining column instead of its persisted pixel height. */\n.rvs-hpane.expanded {\n flex: 1;\n max-height: none;\n}\n\n/* A toolbar toggle that is currently ON (wrap, for example). */\n.rvs-hbtn.active {\n color: var(--rvs-brand);\n}\n\n.rvs-hpane-body {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n}\n\n/* Tab strip: same underline idiom as the editor's diff/worktree switch, but\n scoped so the pane's three views cannot be confused with editor tabs. */\n.rvs-htabs {\n flex: none;\n display: flex;\n align-items: center;\n gap: 2px;\n height: 30px;\n padding: 0 6px;\n border-bottom: 1px solid var(--rvs-border);\n}\n\n/* The tabs themselves live in their own role=tablist element: the strip also\n carries the hash, expand and close buttons, and those must NOT inherit the\n tablist's arrow-key handling (ArrowRight on \"close\" used to switch tabs). */\n.rvs-hpane-tablist {\n flex: none;\n display: flex;\n align-items: center;\n gap: 2px;\n}\n\n.rvs-htab {\n appearance: none;\n border: none;\n border-bottom: 2px solid transparent;\n background: transparent;\n color: var(--rvs-fg3);\n font: inherit;\n font-size: 12px;\n padding: 5px 8px 4px;\n cursor: pointer;\n}\n\n.rvs-htab:hover {\n color: var(--rvs-fg);\n}\n\n.rvs-htab.active {\n color: var(--rvs-fg);\n border-bottom-color: var(--rvs-brand);\n}\n\n.rvs-htabs-spacer {\n flex: 1;\n min-width: 0;\n}\n\n.rvs-hhash-mini {\n flex: none;\n margin-right: 2px;\n font-family: var(--rvs-mono);\n font-size: 10.5px;\n color: var(--rvs-fg3);\n}\n\n/**\n * Every tab body stays mounted (the patch's scroll position and parse survive\n * a look at 提交详情) and is hidden with the `hidden` attribute. The class\n * declares `flex`, which outranks the UA `[hidden]` rule, so hiding needs an\n * explicit rule of its own.\n */\n.rvs-hbody {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 10px 12px 14px;\n}\n\n.rvs-hbody[hidden] {\n display: none;\n}\n\n/* -- 提交详情 -- */\n\n.rvs-hsubject {\n font-size: 13px;\n font-weight: 600;\n line-height: 1.45;\n margin-bottom: 8px;\n white-space: pre-wrap;\n word-break: break-word;\n user-select: text;\n}\n\n.rvs-hmeta {\n display: flex;\n align-items: center;\n gap: 6px;\n min-height: 21px;\n font-size: 11.5px;\n color: var(--rvs-fg3);\n}\n\n.rvs-hmeta-icon {\n flex: none;\n display: flex;\n width: 13px;\n align-items: center;\n color: var(--rvs-fg3);\n}\n\n.rvs-hmeta-value {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-hmeta-label {\n flex: none;\n}\n\n.rvs-hhash {\n font-family: var(--rvs-mono);\n font-size: 11px;\n line-height: 16px;\n padding: 0 5px;\n border: 1px solid var(--rvs-border);\n border-radius: 4px;\n background: var(--rvs-input);\n color: var(--rvs-fg2);\n user-select: all;\n}\n\n.rvs-hparent {\n font-family: var(--rvs-mono);\n font-size: 11px;\n line-height: 16px;\n padding: 0 4px;\n border: 1px solid var(--rvs-border2);\n border-radius: 4px;\n color: var(--rvs-fg2);\n}\n\n.rvs-hdash {\n color: var(--rvs-fg3);\n}\n\n.rvs-hrefs {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n margin-top: 6px;\n}\n\n.rvs-hmsg {\n margin-top: 10px;\n padding-top: 8px;\n border-top: 1px dashed var(--rvs-border);\n font-size: 12px;\n line-height: 1.55;\n color: var(--rvs-fg2);\n white-space: pre-wrap;\n word-break: break-word;\n user-select: text;\n}\n\n.rvs-hfooter {\n display: flex;\n gap: 6px;\n margin-top: 14px;\n}\n\n/* -- 内容 -- */\n\n.rvs-hhint {\n margin-bottom: 6px;\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n/* One line: how many files, and the path filter that makes a 60-file commit\n narrowable without scrolling. */\n.rvs-hcontent-head {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-bottom: 6px;\n}\n\n.rvs-hcount {\n flex: none;\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n.rvs-hfilter {\n flex: 1;\n min-width: 0;\n}\n\n.rvs-hfiles {\n display: flex;\n flex-direction: column;\n gap: 1px;\n}\n\n/* Directory row of the 内容 tree: chevron + folder glyph + path + count. */\n.rvs-hfolder {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 2px 4px;\n border-radius: 4px;\n color: var(--rvs-fg2);\n font-size: 12px;\n cursor: pointer;\n user-select: none;\n}\n\n.rvs-hfolder:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-hfolder-name {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-family: var(--rvs-mono);\n font-size: 11.5px;\n}\n\n.rvs-hfolder-count {\n flex: none;\n font-size: 10.5px;\n color: var(--rvs-fg3);\n}\n\n/* Files under a folder keep the editor tree's indent idiom. */\n.rvs-file-row.indent {\n padding-left: 18px;\n}\n\n.rvs-file-row.active {\n background: var(--rvs-active);\n}\n\n/* The row's quick \"open in editor\" affordance: invisible until the row is\n hovered/focused, so the path keeps the whole width at rest. */\n.rvs-file-open {\n opacity: 0;\n}\n\n.rvs-file-row:hover .rvs-file-open,\n.rvs-file-row:focus-within .rvs-file-open,\n.rvs-file-row:focus .rvs-file-open {\n opacity: 1;\n}\n\n/* Keyboard focus must be visible on the pane's role=button rows (a bare\n browser default is nearly invisible on this dark chrome). */\n.rvs-file-row:focus-visible,\n.rvs-hfolder:focus-visible,\n.rvs-commit-item:focus-visible,\n.rvs-patch-chevron:focus-visible,\n.rvs-vsplit-handle:focus-visible {\n outline: 2px solid var(--rvs-brand);\n outline-offset: -2px;\n}\n\n/* -- 差异 -- */\n\n/**\n * The diff tab is a column: a PINNED tool row, then the one scroller. The\n * reference pane made the whole tab a scroll area, so the file you were in and\n * the controls both disappeared on a long patch.\n */\n.rvs-hdiff {\n display: flex;\n flex-direction: column;\n padding: 0;\n overflow: hidden;\n}\n\n.rvs-hdiff[hidden] {\n display: none;\n}\n\n.rvs-ptoolbar {\n flex: none;\n display: flex;\n align-items: center;\n gap: 3px;\n height: 30px;\n padding: 0 6px;\n border-bottom: 1px solid var(--rvs-border);\n background: var(--rvs-layer3);\n}\n\n.rvs-pfile-index {\n flex: none;\n min-width: 32px;\n font-family: var(--rvs-mono);\n font-size: 10.5px;\n color: var(--rvs-fg3);\n}\n\n.rvs-pfile-name {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 11.5px;\n color: var(--rvs-fg2);\n}\n\n.rvs-pscroll {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 10px 12px 14px;\n}\n\n.rvs-patch-file {\n margin-bottom: 10px;\n border: 1px solid var(--rvs-border);\n border-radius: 6px;\n}\n\n.rvs-patch-file.folded .rvs-patch-head {\n border-bottom: none;\n border-radius: 6px;\n}\n\n.rvs-patch-file.active {\n border-color: var(--rvs-brand);\n}\n\n/* Sticky per-file header: scrolling a 3000-line hunk keeps saying which file\n it belongs to. `position: sticky` needs the nearest scrollport, which is\n `.rvs-pscroll` — no `overflow` on the section itself. */\n.rvs-patch-head {\n position: sticky;\n top: 0;\n z-index: 1;\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 3px 6px;\n border-bottom: 1px solid var(--rvs-border);\n border-radius: 6px 6px 0 0;\n background: var(--rvs-layer3);\n cursor: pointer;\n}\n\n.rvs-patch-head:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-patch-chevron {\n flex: none;\n display: flex;\n align-items: center;\n color: var(--rvs-fg3);\n cursor: pointer;\n transform: rotate(0deg);\n}\n\n.rvs-patch-chevron.open {\n transform: rotate(90deg);\n}\n\n.rvs-patch-path {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n}\n\n.rvs-patch-letter {\n flex: none;\n font-size: 11px;\n font-weight: 700;\n}\n\n.rvs-patch-counts {\n flex: none;\n display: flex;\n gap: 5px;\n font-family: var(--rvs-mono);\n font-size: 10.5px;\n}\n\n.rvs-patch-add-count {\n color: var(--rvs-git-a);\n}\n\n.rvs-patch-del-count {\n color: var(--rvs-git-d);\n}\n\n.rvs-patch-rows {\n padding: 2px 0 6px;\n font-family: var(--rvs-mono);\n font-size: 11.5px;\n line-height: 17px;\n}\n\n.rvs-patch-row {\n display: flex;\n align-items: stretch;\n min-width: max-content;\n white-space: pre;\n}\n\n/* Wrap mode: the row gives up its horizontal runway and the text wraps under\n the gutter instead (the whole point on a narrow sidebar). */\n.rvs-patch-rows.wrap .rvs-patch-row {\n min-width: 0;\n white-space: pre-wrap;\n word-break: break-word;\n}\n\n.rvs-patch-rows.wrap .rvs-patch-text {\n white-space: pre-wrap;\n word-break: break-word;\n}\n\n/* A block whose raw patch text could not be paired with the parsed model\n (defensive: block count and model count disagreed) is dimmed instead of\n silently looking complete. */\n.rvs-patch-rows.partial {\n opacity: .62;\n}\n\n/* Truncation marker in the pinned toolbar: the cut point can be thousands of\n rows away, so the bottom note is not where a reader learns about it. */\n.rvs-ptruncated {\n flex: none;\n font-size: 12px;\n color: var(--rvs-git-m);\n}\n\n.rvs-patch-row.add {\n background: var(--rvs-add-bg);\n}\n\n.rvs-patch-row.del {\n background: var(--rvs-del-bg);\n}\n\n.rvs-patch-num {\n flex: none;\n width: 42px;\n padding-right: 6px;\n text-align: right;\n color: var(--rvs-fg3);\n user-select: none;\n}\n\n.rvs-patch-sign {\n flex: none;\n width: 14px;\n text-align: center;\n color: var(--rvs-fg3);\n user-select: none;\n}\n\n.rvs-patch-text {\n flex: 1;\n padding-right: 12px;\n user-select: text;\n}\n\n/* One \"the hunk jumped ahead\" marker, so a patch never pretends its line\n numbers are contiguous. */\n.rvs-patch-skip {\n margin: 2px 0;\n border-top: 1px dashed var(--rvs-border);\n border-bottom: 1px dashed var(--rvs-border);\n color: var(--rvs-fg3);\n font-size: 11px;\n text-align: center;\n user-select: none;\n}\n\n.rvs-patch-note {\n padding: 6px 8px;\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n/* ---------------------------------------------------- floating editor window */\n\n/**\n * The floating editor lives in the host's frame-wide overlay layer\n * (`position: absolute; inset: 0; z-index: 20`, click-through, children opt\n * back into pointer events). It is placed with viewport coordinates, so it\n * floats above every column without joining any of their stacking contexts.\n *\n * `.rvs-root` carries the whole design-system token set and is row-flex by\n * default; this frame overrides the direction to a column and takes its size\n * from the inline rect the component keeps.\n */\n.rvs-float-window {\n position: fixed;\n flex-direction: column;\n /* The rect maths (clamp/persist) is in border-box terms; without this the\n painted border would sit one pixel outside the computed rectangle. */\n box-sizing: border-box;\n min-width: 360px;\n min-height: 220px;\n overflow: hidden;\n border: 1px solid var(--rvs-border2);\n border-radius: 10px;\n background: var(--rvs-code-bg);\n color: var(--rvs-code-fg);\n box-shadow: 0 18px 60px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .28);\n z-index: 30;\n /* The overlay layer itself is click-through; the window opts back in even if\n the host wraps each overlay entry in its own element. */\n pointer-events: auto;\n}\n\n/* Minimized: the frame IS the ball (see `.rvs-float-mini`); the body stays\n mounted but hidden, and it must not impose a minimum height. */\n.rvs-float-window[data-rvs-float=\"collapsed\"] {\n min-height: 0;\n}\n\n/**\n * Minimized window = floating ball.\n *\n * A full-width 34px bar was too long: it read as a broken window and covered a\n * whole strip. The ball is a small circle at the window's own corner, draggable\n * anywhere, restored by a click (or Enter/Space). It keeps the dirty dot, so\n * \"the editor is out and has unsaved edits\" is still one glance away.\n */\n.rvs-float-window.rvs-float-mini {\n min-width: 0;\n min-height: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n cursor: move;\n touch-action: none;\n}\n\n.rvs-float-ball {\n flex: 1;\n /* Stretch to the circle: the frame is a COLUMN flex box with centred items,\n so without this the hit area (and the absolutely positioned dot) would be\n sized by the 16px glyph instead of the 44px ball. */\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n border-radius: 50%;\n color: var(--rvs-brand);\n font-size: 16px;\n line-height: 1;\n cursor: move;\n outline: none;\n}\n\n.rvs-float-ball:hover,\n.rvs-float-ball:focus-visible {\n background: var(--rvs-hover);\n}\n\n.rvs-float-ball-glyph {\n pointer-events: none;\n}\n\n/* Unsaved edits stay visible while minimized. */\n.rvs-float-ball-dot {\n position: absolute;\n top: 8px;\n right: 8px;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: var(--rvs-git-m);\n box-shadow: 0 0 0 2px var(--rvs-code-bg);\n pointer-events: none;\n}\n\n/* While a drag/resize gesture runs the pointer must not select editor text. */\n.rvs-float-window.dragging {\n user-select: none;\n}\n\n.rvs-float-titlebar {\n flex: none;\n display: flex;\n align-items: center;\n gap: 7px;\n height: 34px;\n padding: 0 6px 0 10px;\n border-bottom: 1px solid var(--rvs-border);\n background: var(--rvs-layer3);\n cursor: move;\n user-select: none;\n touch-action: none;\n}\n\n.rvs-float-glyph {\n color: var(--rvs-brand);\n font-size: 11px;\n}\n\n.rvs-float-title {\n flex: none;\n font-size: 12px;\n font-weight: 600;\n color: var(--rvs-fg2);\n}\n\n.rvs-float-file {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 11.5px;\n color: var(--rvs-fg3);\n direction: rtl;\n unicode-bidi: plaintext;\n text-align: left;\n}\n\n.rvs-float-spacer {\n flex: 1;\n}\n\n.rvs-float-btn {\n flex: none;\n width: 22px;\n height: 22px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: none;\n border-radius: 5px;\n background: transparent;\n color: var(--rvs-fg3);\n font: inherit;\n font-size: 12px;\n line-height: 1;\n cursor: pointer;\n}\n\n.rvs-float-btn:hover {\n background: var(--rvs-hover);\n color: var(--rvs-fg);\n}\n\n.rvs-float-close:hover {\n background: rgba(241, 76, 76, .18);\n color: var(--rvs-danger);\n}\n\n.rvs-float-body {\n flex: 1 1 0;\n min-height: 0;\n min-width: 0;\n display: flex;\n overflow: hidden;\n background: var(--rvs-code-bg);\n}\n\n/* Keep the height chain pinned: the editor pane grows inside this box. */\n.rvs-float-body > .rvs-pane {\n flex: 1 1 0;\n min-height: 0;\n min-width: 0;\n}\n\n/* Eight grips, placed INSIDE the border box: the window clips overflow (rounded\n corners), so grips hanging outside would lose half their hit area. Corners\n are larger so they can actually be hit. */\n.rvs-float-resize {\n position: absolute;\n z-index: 3;\n}\n\n.rvs-float-resize-n { top: 0; left: 10px; right: 10px; height: 6px; cursor: ns-resize; }\n.rvs-float-resize-s { bottom: 0; left: 10px; right: 10px; height: 6px; cursor: ns-resize; }\n.rvs-float-resize-e { top: 10px; bottom: 10px; right: 0; width: 6px; cursor: ew-resize; }\n.rvs-float-resize-w { top: 10px; bottom: 10px; left: 0; width: 6px; cursor: ew-resize; }\n.rvs-float-resize-ne { top: 0; right: 0; width: 12px; height: 12px; cursor: nesw-resize; }\n.rvs-float-resize-nw { top: 0; left: 0; width: 12px; height: 12px; cursor: nwse-resize; }\n.rvs-float-resize-se { bottom: 0; right: 0; width: 12px; height: 12px; cursor: nwse-resize; }\n.rvs-float-resize-sw { bottom: 0; left: 0; width: 12px; height: 12px; cursor: nesw-resize; }\n\n/* Shown by whichever surface the single editor left behind (centre tab or the\n sidebar's editor panel). */\n.rvs-float-placeholder {\n flex: 1;\n min-height: 0;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 10px;\n padding: 24px;\n text-align: center;\n color: var(--rvs-fg3);\n font-size: 12.5px;\n}\n\n.rvs-float-placeholder-title {\n color: var(--rvs-fg2);\n font-size: 13px;\n font-weight: 600;\n}\n\n.rvs-float-placeholder-text {\n max-width: 360px;\n line-height: 1.6;\n}\n\n/* --------------------------------------------------------- context menu */\n\n.rvs-portal {\n font-family: inherit;\n}\n\n/**\n * Floating surfaces (menu / modal / toast) paint an OPAQUE base first and then\n * lay the skin's overlay token on top. The token is frequently translucent, so\n * using it alone let the panel's own text bleed through the menu and overlap\n * the entries; `Canvas` follows the resolved light/dark scheme, so the base is\n * correct in either theme.\n */\n.rvs-menu,\n.rvs-modal-box,\n.rvs-toast {\n background-color: Canvas;\n background-image: linear-gradient(var(--dsw-alias-bg-overlay, transparent), var(--dsw-alias-bg-overlay, transparent));\n color: var(--rvs-fg);\n}\n\n.rvs-menu {\n position: fixed;\n z-index: 1000;\n min-width: 172px;\n max-height: calc(100vh - 16px);\n overflow-y: auto;\n padding: 4px;\n border: 1px solid var(--rvs-border2);\n border-radius: 8px;\n box-shadow: 0 6px 20px rgba(0, 0, 0, .35);\n font-size: 12.5px;\n line-height: 18px;\n}\n\n.rvs-menu-sep {\n height: 1px;\n margin: 4px 6px;\n background: var(--rvs-border);\n}\n\n.rvs-menu-item {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n padding: 5px 10px;\n border: none;\n border-radius: 6px;\n background: transparent;\n color: inherit;\n font: inherit;\n text-align: left;\n cursor: pointer;\n}\n\n.rvs-menu-item:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-menu-item.danger {\n color: var(--vsc-danger, #f14c4c);\n}\n\n.rvs-menu-item.danger:hover {\n background: rgba(241, 76, 76, .16);\n}\n\n.rvs-menu-item:disabled {\n opacity: .45;\n cursor: default;\n}\n\n.rvs-menu-item:disabled:hover {\n background: transparent;\n}\n\n.rvs-menu-hint {\n margin-left: auto;\n font-size: 11px;\n opacity: .6;\n}\n\n/* ------------------------------------------------------- modal + toast */\n\n.rvs-modal-mask {\n position: fixed;\n inset: 0;\n z-index: 100000;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(0, 0, 0, .45);\n backdrop-filter: blur(2px);\n animation: rvsFade .12s ease;\n}\n\n.rvs-modal-box {\n width: min(420px, calc(100vw - 40px));\n padding: 16px 18px;\n border: 1px solid var(--rvs-border2);\n border-radius: 10px;\n color: var(--rvs-fg);\n box-shadow: 0 12px 40px rgba(0, 0, 0, .38);\n font-size: 13px;\n animation: rvsPop .14s ease;\n}\n\n.rvs-modal-title {\n margin-bottom: 8px;\n font-size: 14px;\n font-weight: 600;\n}\n\n.rvs-modal-text {\n margin-bottom: 12px;\n color: var(--rvs-fg2);\n font-size: 12.5px;\n line-height: 1.6;\n word-break: break-word;\n white-space: pre-wrap;\n}\n\n.rvs-modal-row {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n margin-top: 14px;\n}\n\n.rvs-modal-btn {\n padding: 5px 14px;\n border: 1px solid var(--rvs-border2);\n border-radius: 7px;\n background: transparent;\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12.5px;\n cursor: pointer;\n}\n\n.rvs-modal-btn:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-modal-btn.primary {\n border-color: transparent;\n background: var(--rvs-accent);\n color: #fff;\n}\n\n.rvs-modal-btn.danger {\n border-color: transparent;\n background: var(--rvs-danger);\n color: #fff;\n}\n\n.rvs-toasts {\n position: fixed;\n right: 16px;\n bottom: 18px;\n z-index: 100001;\n display: flex;\n flex-direction: column;\n gap: 8px;\n align-items: flex-end;\n pointer-events: none;\n}\n\n.rvs-toast {\n max-width: 340px;\n padding: 7px 12px;\n border: 1px solid var(--rvs-border2);\n border-radius: 8px;\n color: var(--rvs-fg);\n box-shadow: 0 6px 20px rgba(0, 0, 0, .35);\n font-size: 12.5px;\n line-height: 1.5;\n word-break: break-word;\n white-space: pre-wrap;\n animation: rvsPop .14s ease;\n}\n\n.rvs-toast.error {\n border-color: rgba(241, 76, 76, .6);\n background-image: linear-gradient(rgba(58, 31, 34, .92), rgba(58, 31, 34, .92));\n}\n\n/* ------------------------------------------------------------- terminal */\n\n.rvs-term-tabs {\n flex: none;\n display: flex;\n align-items: stretch;\n gap: 2px;\n height: 32px;\n padding: 0 4px;\n overflow-x: auto;\n overflow-y: hidden;\n border-bottom: 1px solid var(--rvs-border);\n scrollbar-width: none;\n}\n\n.rvs-term-tabs::-webkit-scrollbar {\n height: 0;\n}\n\n.rvs-term-tab {\n flex: none;\n display: flex;\n align-items: center;\n gap: 6px;\n max-width: 180px;\n margin: 4px 0;\n padding: 0 6px 0 9px;\n border: none;\n border-radius: 6px;\n background: transparent;\n color: var(--rvs-fg3);\n font: inherit;\n font-size: 12px;\n cursor: pointer;\n}\n\n/* Wrapper that pairs a tab with its close button. The two are siblings so the\n ✕ can be a real focusable <button> (a nested one is invalid HTML and left\n keyboard users no way to close a tab). */\n.rvs-term-tabwrap {\n position: relative;\n flex: none;\n display: flex;\n align-items: center;\n}\n\n.rvs-term-tabwrap .rvs-term-tab {\n padding-right: 22px;\n}\n\n.rvs-term-tabwrap .rvs-etab-close {\n position: absolute;\n right: 3px;\n opacity: 0;\n}\n\n.rvs-term-tabwrap:hover .rvs-etab-close,\n.rvs-term-tabwrap:focus-within .rvs-etab-close {\n opacity: .8;\n}\n\n.rvs-term-tab:hover {\n background: var(--rvs-hover);\n color: var(--rvs-fg);\n}\n\n.rvs-term-tab.active {\n background: var(--rvs-layer3);\n color: var(--rvs-fg);\n}\n\n.rvs-term-tab.dead {\n color: var(--rvs-git-d);\n}\n\n.rvs-term-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-term-body {\n flex: 1;\n min-height: 0;\n position: relative;\n overflow: hidden;\n}\n\n.rvs-term-slot {\n position: absolute;\n inset: 0;\n}\n\n.rvs-term-dead {\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background: var(--rvs-code-bg);\n color: var(--rvs-code-fg);\n}\n\n/* `.rvs-toast.error` is styled with the overlay form further up, so the popup\n opacity convention (an opaque Canvas base plus a token layer) still governs\n it. A flat `background: #3a1f22` shorthand sat here and overrode that chain —\n same opaque result, but outside the convention. */\n\n@keyframes rvsFade {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n@keyframes rvsPop {\n from { opacity: 0; transform: scale(.97) translateY(3px); }\n to { opacity: 1; transform: none; }\n}\n\n.rvs-search-row {\n display: flex;\n gap: 6px;\n padding: 6px 8px;\n border-bottom: 1px solid var(--rvs-border);\n}\n\n/* --------------------------------------------------------- search options */\n\n.rvs-toggles {\n flex: none;\n display: inline-flex;\n border: 1px solid var(--rvs-border2);\n border-radius: 6px;\n overflow: hidden;\n}\n\n.rvs-toggle {\n min-width: 26px;\n height: 22px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 5px;\n border: none;\n border-right: 1px solid var(--rvs-border);\n background: transparent;\n color: var(--rvs-fg3);\n font: inherit;\n cursor: pointer;\n}\n\n.rvs-toggle:last-child {\n border-right: none;\n}\n\n.rvs-toggle:hover {\n background: var(--rvs-hover);\n color: var(--rvs-fg);\n}\n\n.rvs-toggle.active {\n background: var(--rvs-active);\n color: var(--rvs-fg);\n box-shadow: inset 0 0 0 1px var(--rvs-brand);\n}\n\n.rvs-glyph {\n font-family: var(--rvs-mono);\n font-weight: 600;\n line-height: 1;\n letter-spacing: -0.02em;\n}\n\n.rvs-glyph-underline {\n text-decoration: underline;\n}\n\n.rvs-scope-label {\n flex: none;\n align-self: center;\n font-size: 11px;\n color: var(--rvs-fg3);\n white-space: nowrap;\n}\n\n/* --------------------------------------------------------- search results */\n\n.rvs-hit {\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n padding: 3px 10px;\n border: none;\n background: transparent;\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12.5px;\n text-align: left;\n cursor: pointer;\n}\n\n.rvs-hit:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-hit-file {\n font-weight: 600;\n}\n\n.rvs-hit-line {\n padding-left: 30px;\n align-items: flex-start;\n font-family: var(--rvs-mono);\n font-size: 12px;\n color: var(--rvs-fg2);\n}\n\n.rvs-hit-count {\n flex: none;\n min-width: 18px;\n padding: 0 5px;\n border-radius: 9px;\n background: var(--rvs-hover);\n font-size: 10.5px;\n line-height: 15px;\n text-align: center;\n color: var(--rvs-fg3);\n}\n\n.rvs-hit-lineno {\n flex: none;\n width: 3.2em;\n text-align: right;\n color: var(--rvs-fg3);\n opacity: .8;\n font-size: 11px;\n}\n\n.rvs-hit-text {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: pre;\n direction: ltr;\n}\n\n.rvs-mark {\n padding: 0 1px;\n border-radius: 2px;\n background: rgba(226, 183, 20, .3);\n color: inherit;\n}\n\n.rvs-hit-dir {\n flex: none;\n color: var(--rvs-fg3);\n font-size: 11px;\n}\n\n.rvs-hit-name {\n flex: none;\n font-weight: 600;\n}\n\n.rvs-kbd {\n padding: 0 4px;\n border: 1px solid var(--rvs-border2);\n border-radius: 4px;\n font-size: 10px;\n color: var(--rvs-fg3);\n}\n\n/* --- SCM: repository directory row (git runs in THIS directory) ------------- */\n\n.rvs-repo-bar {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 4px 8px 4px 10px;\n border-bottom: 1px solid var(--rvs-border);\n background: var(--rvs-bg2, var(--dsw-alias-bg-layer-1, #1b1b1b));\n font-size: 11px;\n flex: none;\n}\n\n.rvs-repo-bar-label {\n color: var(--rvs-fg3);\n white-space: nowrap;\n}\n\n.rvs-repo-bar-path {\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n direction: rtl;\n unicode-bidi: plaintext;\n text-align: left;\n padding: 2px 6px;\n border: 1px solid var(--rvs-border2);\n border-radius: 4px;\n background: var(--rvs-bg3, rgba(255, 255, 255, .04));\n color: var(--rvs-fg);\n font-family: var(--rvs-mono, ui-monospace, Consolas, monospace);\n font-size: 11px;\n cursor: pointer;\n}\n\n.rvs-repo-bar-path:hover {\n border-color: var(--rvs-brand);\n color: var(--rvs-brand-fg, var(--rvs-fg));\n}\n\n.rvs-repo-bar-fix {\n margin-top: 10px;\n display: flex;\n justify-content: center;\n}\n\n/* --- SCM: repository directory picker -------------------------------------- */\n\n.rvs-repopick {\n width: min(560px, calc(100vw - 40px));\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.rvs-repopick .rvs-modal-title {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n\n.rvs-repopick-bar {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 2px;\n min-height: 22px;\n font-family: var(--rvs-mono, ui-monospace, Consolas, monospace);\n font-size: 12px;\n}\n\n.rvs-crumb-wrap {\n display: inline-flex;\n align-items: center;\n gap: 2px;\n color: var(--rvs-fg3);\n}\n\n.rvs-crumb {\n border: none;\n background: none;\n padding: 1px 3px;\n border-radius: 3px;\n color: var(--rvs-brand-fg, var(--rvs-fg));\n font: inherit;\n cursor: pointer;\n}\n\n.rvs-crumb:hover {\n background: var(--rvs-row-hover, rgba(255, 255, 255, .07));\n}\n\n.rvs-repopick-probe {\n padding: 5px 8px;\n border-radius: 4px;\n font-size: 11.5px;\n border: 1px solid var(--rvs-border2);\n background: var(--rvs-bg3, rgba(255, 255, 255, .04));\n color: var(--rvs-fg2);\n}\n\n.rvs-repopick-probe.root {\n border-color: var(--rvs-ok, #2ea043);\n color: var(--rvs-ok, #2ea043);\n}\n\n.rvs-repopick-probe.inside {\n border-color: var(--rvs-brand);\n color: var(--rvs-brand-fg, var(--rvs-fg));\n}\n\n.rvs-repopick-found {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 4px;\n padding-bottom: 2px;\n}\n\n.rvs-repopick-found-label {\n color: var(--rvs-fg3);\n font-size: 11px;\n white-space: nowrap;\n}\n\n.rvs-repopick-list {\n flex: 1 1 auto;\n min-height: 150px;\n max-height: 42vh;\n overflow: auto;\n border: 1px solid var(--rvs-border);\n border-radius: 5px;\n background: var(--rvs-bg-layer, rgba(0, 0, 0, .18));\n padding: 2px;\n}\n\n.rvs-repopick-row {\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n padding: 3px 6px;\n border: none;\n border-radius: 3px;\n background: none;\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12px;\n text-align: left;\n cursor: pointer;\n}\n\n.rvs-repopick-row:hover {\n background: var(--rvs-row-hover, rgba(255, 255, 255, .07));\n}\n\n.rvs-repopick-row span {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-repopick-dim {\n color: var(--rvs-fg3);\n font-size: 11.5px;\n padding: 6px;\n}\n\n.rvs-repopick-type {\n display: flex;\n gap: 6px;\n align-items: center;\n}\n\n.rvs-repopick-type .rvs-input {\n flex: 1 1 auto;\n}\n\n.rvs-repopick-error {\n color: var(--rvs-error, #f85149);\n font-size: 11.5px;\n}\n\n/* --------------------------------------------------- streaming exec panel */\n\n/**\n * Live log for the network verbs (fetch / pull / push / sync).\n *\n * Fixed to the viewport's bottom-right instead of joining the panel's own\n * column: the pane can be collapsed or scrolled away while the push runs, and a\n * dialog that vanishes with its parent would hide the cancel button exactly\n * when it matters.\n */\n.rvs-execpanel {\n /* PORTALED to <body>, i.e. OUTSIDE `.rvs-root` where these tokens are\n declared — without this block every var() below resolves to nothing and the\n panel renders transparent and borderless over the page content. Keep this\n subset in sync with `.rvs-root`; the dark code surfaces get their own\n `body[data-ds-dark-theme]` override right after this rule. */\n --rvs-fg: var(--dsw-alias-label-primary, #e6e6e6);\n --rvs-fg2: var(--dsw-alias-label-secondary, #b9b9b9);\n --rvs-fg3: var(--dsw-alias-label-tertiary, #8b8b8b);\n --rvs-hover: var(--dsw-alias-interactive-bg-hover, rgba(127, 127, 127, .14));\n --rvs-border: var(--dsw-alias-border-l1, rgba(127, 127, 127, .25));\n --rvs-border2: var(--dsw-alias-border-l2, rgba(127, 127, 127, .38));\n --rvs-overlay: var(--dsw-alias-bg-overlay, #24262e);\n --rvs-brand: var(--dsw-alias-brand-primary, #4d6bfe);\n --rvs-danger: var(--dsw-alias-state-error-primary, #e05555);\n --rvs-git-m: #e2b714;\n --rvs-git-a: #4ec9b0;\n --rvs-mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', Consolas, 'Courier New', monospace;\n --rvs-code-bg: #1e1e1e;\n --rvs-code-fg: #d4d4d4;\n position: fixed;\n right: 16px;\n bottom: 16px;\n z-index: 45;\n width: min(620px, calc(100vw - 32px));\n max-height: min(60vh, 520px);\n display: flex;\n flex-direction: column;\n overflow: hidden;\n border: 1px solid var(--rvs-border2);\n border-radius: 10px;\n background: var(--rvs-overlay);\n color: var(--rvs-fg);\n box-shadow: 0 18px 60px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .28);\n}\n\nbody[data-ds-dark-theme] .rvs-execpanel {\n --rvs-code-bg: #1e1e1e;\n --rvs-code-fg: #d4d4d4;\n}\n\n\n.rvs-execpanel-head {\n flex: none;\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 5px 6px 5px 10px;\n border-bottom: 1px solid var(--rvs-border);\n}\n\n.rvs-execpanel-title {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n font-weight: 600;\n}\n\n.rvs-execpanel-status {\n flex: none;\n font-size: 11px;\n color: var(--rvs-fg3);\n font-variant-numeric: tabular-nums;\n}\n\n.rvs-execpanel-status.done { color: var(--rvs-git-a); }\n.rvs-execpanel-status.error { color: var(--rvs-danger); }\n.rvs-execpanel-status.cancelled { color: var(--rvs-git-m); }\n\n.rvs-execpanel-spacer {\n flex: 1;\n min-width: 0;\n}\n\n.rvs-execpanel-body {\n flex: 1;\n min-height: 60px;\n margin: 0;\n padding: 8px 10px;\n overflow: auto;\n background: var(--rvs-code-bg);\n color: var(--rvs-code-fg);\n font-family: var(--rvs-mono);\n font-size: 11.5px;\n line-height: 1.45;\n white-space: pre-wrap;\n word-break: break-word;\n user-select: text;\n}\n\n.rvs-execpanel-foot {\n flex: none;\n padding: 4px 10px 6px;\n border-top: 1px solid var(--rvs-border);\n color: var(--rvs-fg3);\n font-size: 11px;\n}\n\n/* --------------------------------------------------------- download dock */\n/* PORTALed to <body>, i.e. OUTSIDE `.rvs-root` where the tokens are declared:\n declare the subset this panel uses (same rule as `.rvs-execpanel`). */\n.rvs-downloads {\n --rvs-fg: var(--dsw-alias-label-primary, #e6e6e6);\n --rvs-fg2: var(--dsw-alias-label-secondary, #b9b9b9);\n --rvs-fg3: var(--dsw-alias-label-tertiary, #8b8b8b);\n --rvs-border: var(--dsw-alias-border-l1, rgba(127, 127, 127, .25));\n --rvs-border2: var(--dsw-alias-border-l2, rgba(127, 127, 127, .38));\n --rvs-overlay: var(--dsw-alias-bg-overlay, #24262e);\n --rvs-brand: var(--dsw-alias-brand-primary, #4d6bfe);\n --rvs-danger: var(--dsw-alias-state-error-primary, #e05555);\n --rvs-git-m: #e2b714;\n --rvs-git-a: #4ec9b0;\n position: fixed;\n /* Bottom-RIGHT, not over the sidebar's own footer (first screenshot: the\n dock sat on the usage/account block). `bottom: 64px` keeps it above the\n transient toast stack (right 16 / bottom 18 / z 100001) and above the\n network exec panel (right 16 / bottom 16 / z 45), so neither covers it. */\n right: 16px;\n bottom: 64px;\n z-index: 100000;\n animation: rvsFade .12s ease;\n width: min(380px, calc(100vw - 32px));\n max-height: min(45vh, 420px);\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 8px;\n border: 1px solid var(--rvs-border2);\n border-radius: 10px;\n background: var(--rvs-overlay);\n color: var(--rvs-fg);\n box-shadow: 0 18px 60px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .28);\n}\n\n.rvs-download {\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding: 6px 8px;\n border: 1px solid var(--rvs-border);\n border-radius: 8px;\n background: rgba(127, 127, 127, .06);\n}\n\n.rvs-download-head {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n}\n\n.rvs-download-icon {\n flex: none;\n display: flex;\n align-items: center;\n color: var(--rvs-fg2);\n}\n\n.rvs-download-name {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n font-weight: 600;\n}\n\n.rvs-download-status {\n flex: none;\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n.rvs-download-status.done { color: var(--rvs-git-a); }\n.rvs-download-status.failed { color: var(--rvs-danger); }\n.rvs-download-status.cancelled { color: var(--rvs-git-m); }\n\n.rvs-download-bar {\n height: 4px;\n overflow: hidden;\n border-radius: 2px;\n background: rgba(127, 127, 127, .22);\n}\n\n.rvs-download-fill {\n height: 100%;\n width: 0;\n border-radius: 2px;\n background: var(--rvs-brand);\n transition: width .12s linear;\n}\n\n.rvs-download-fill.indeterminate {\n width: 35%;\n animation: rvs-download-slide 1.2s ease-in-out infinite;\n}\n\n@keyframes rvs-download-slide {\n from { transform: translateX(-120%); }\n to { transform: translateX(320%); }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .rvs-download-fill.indeterminate { animation-duration: 2.4s; }\n .rvs-download-fill { transition: none; }\n}\n\n.rvs-download-meta {\n overflow: hidden;\n color: var(--rvs-fg3);\n font-size: 11px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-download-meta.failed { color: var(--rvs-danger); white-space: normal; word-break: break-word; }\n.rvs-download-meta.done { color: var(--rvs-fg2); }\n.rvs-download-meta.cancelled { color: var(--rvs-git-m); }\n\n/* ----------------------------------------------------------- doctor panel */\n\n/*\n * Remote-environment report, opened from the host list (which lives in the DSH\n * Settings dialog, i.e. OUTSIDE `.rvs-root`). Fixed overlay like the input\n * dialog so the host list behind it does not move, and its own token subset for\n * the same reason as `.rvs-execpanel`: `var(--rvs-*)` resolves to nothing out\n * there without it. Three state colors, and `unknown` deliberately looks\n * neutral (not red, not green): it is ignorance, not a verdict.\n */\n.rvs-doctor {\n --rvs-fg: var(--dsw-alias-label-primary, #e6e6e6);\n --rvs-fg2: var(--dsw-alias-label-secondary, #b9b9b9);\n --rvs-fg3: var(--dsw-alias-label-tertiary, #8b8b8b);\n --rvs-border: var(--dsw-alias-border-l1, rgba(127, 127, 127, .25));\n --rvs-overlay: var(--dsw-alias-bg-overlay, #24262e);\n --rvs-git-m: #e2b714;\n --rvs-mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', Consolas, 'Courier New', monospace;\n position: fixed;\n inset: 0;\n z-index: 1000;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(0, 0, 0, .45);\n color: var(--rvs-fg);\n font-size: 13px;\n}\n\n.rvs-doctor-card {\n display: flex;\n flex-direction: column;\n width: min(860px, 92vw);\n max-height: min(80vh, 720px);\n border: 1px solid var(--rvs-border);\n border-radius: 8px;\n background: var(--rvs-overlay);\n box-shadow: 0 8px 32px rgba(0, 0, 0, .35);\n}\n\n.rvs-doctor-head {\n flex: none;\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 10px 12px;\n border-bottom: 1px solid var(--rvs-border);\n}\n\n.rvs-doctor-title {\n font-weight: 600;\n}\n\n.rvs-doctor-body {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 4px 12px 10px;\n}\n\n.rvs-doctor-loading {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 10px 0;\n color: var(--rvs-fg2);\n}\n\n.rvs-doctor-table {\n width: 100%;\n border-collapse: collapse;\n font-size: 12px;\n}\n\n.rvs-doctor-table th {\n position: sticky;\n top: 0;\n padding: 6px 8px;\n border-bottom: 1px solid var(--rvs-border);\n background: var(--rvs-overlay);\n color: var(--rvs-fg2);\n font-weight: 600;\n text-align: left;\n}\n\n.rvs-doctor-table td {\n padding: 5px 8px;\n border-top: 1px solid var(--rvs-border);\n vertical-align: top;\n}\n\n.rvs-doctor-item {\n white-space: nowrap;\n color: var(--rvs-fg2);\n}\n\n.rvs-doctor-badge {\n display: inline-block;\n padding: 0 6px;\n border: 1px solid currentColor;\n border-radius: 8px;\n font-size: 11px;\n white-space: nowrap;\n}\n\n.rvs-doctor-badge.ok { color: var(--rvs-ok, #2ea043); }\n.rvs-doctor-badge.missing { color: var(--rvs-git-m, #e2b714); }\n.rvs-doctor-badge.unknown { color: var(--rvs-fg3); }\n\n.rvs-doctor-detail {\n color: var(--rvs-fg3);\n font-family: var(--rvs-mono);\n font-size: 11px;\n word-break: break-word;\n user-select: text;\n}\n\n.rvs-doctor-hint {\n flex: none;\n padding: 8px 12px;\n border-top: 1px solid var(--rvs-border);\n color: var(--rvs-fg3);\n font-size: 11px;\n}\n\n\n\n\n/* ------------------------------------------------------------ port forwards */\n\n/**\n * The port panel: one form above two lists, all inside the sidebar column.\n *\n * The column can be dragged very narrow, so nothing here may assume a width: an\n * address/URL is ONE unbreakable token (`overflow-wrap: anywhere`), the action\n * row wraps instead of overflowing, and the form stacks vertically — a\n * three-input row is unusable at the panel's default width.\n */\n.rvs-ports-body {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 8px 8px 14px;\n}\n\n/**\n * The restore-failure banner: one sentence plus the \"forget these rules\"\n * action, side by side when there is room and stacked when the column is very\n * narrow (the action must never squeeze the explanation into a sliver).\n */\n.rvs-ports-restore {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.rvs-ports-form {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 8px;\n border: 1px solid var(--rvs-border2);\n border-radius: 8px;\n}\n\n.rvs-ports-field {\n display: flex;\n flex-direction: column;\n gap: 3px;\n min-width: 0;\n}\n\n.rvs-ports-label {\n color: var(--rvs-fg3);\n font-size: 11px;\n}\n\n/* `.rvs-input` carries `flex: 1`; in a COLUMN flex parent that would stretch\n the field's HEIGHT, so the input fills the width and keeps its own height. */\n.rvs-ports-input {\n flex: none;\n width: 100%;\n box-sizing: border-box;\n}\n\n.rvs-ports-form-actions {\n display: flex;\n justify-content: flex-end;\n}\n\n.rvs-ports-section {\n margin-top: 12px;\n border-top: 1px solid var(--rvs-border);\n}\n\n.rvs-ports-sec-head {\n display: flex;\n align-items: center;\n gap: 6px;\n height: 26px;\n padding: 0 4px;\n color: var(--rvs-fg2);\n font-size: 11px;\n font-weight: 700;\n letter-spacing: .04em;\n text-transform: uppercase;\n user-select: none;\n}\n\n.rvs-ports-count {\n padding: 0 6px;\n border-radius: 999px;\n background: var(--rvs-hover);\n color: var(--rvs-fg3);\n font-size: 10.5px;\n letter-spacing: 0;\n}\n\n.rvs-ports-row {\n display: flex;\n flex-direction: column;\n gap: 3px;\n min-width: 0;\n padding: 6px 6px 7px;\n border-radius: 6px;\n}\n\n.rvs-ports-row:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-ports-line {\n display: flex;\n align-items: baseline;\n gap: 6px;\n min-width: 0;\n}\n\n.rvs-ports-addr {\n flex: 1;\n min-width: 0;\n overflow-wrap: anywhere;\n color: var(--rvs-fg);\n font-family: var(--rvs-mono);\n font-size: 11.5px;\n line-height: 1.45;\n}\n\n.rvs-ports-proc {\n flex: 0 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--rvs-fg3);\n font-size: 11px;\n}\n\n/* State is never colour-only: the dot carries the state word as its label. */\n.rvs-ports-dot {\n flex: none;\n width: 7px;\n height: 7px;\n border-radius: 50%;\n background: var(--rvs-fg3);\n}\n\n.rvs-ports-dot.listening {\n background: var(--rvs-ok, #2ea043);\n}\n\n.rvs-ports-dot.error {\n background: var(--rvs-danger);\n}\n\n.rvs-ports-conn {\n color: var(--rvs-fg3);\n font-size: 11px;\n white-space: nowrap;\n}\n\n.rvs-ports-err {\n color: var(--rvs-danger);\n font-size: 11px;\n line-height: 1.45;\n overflow-wrap: anywhere;\n}\n\n.rvs-ports-actions {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 2px;\n min-width: 0;\n}\n\n/* The \"open\" affordance is a real link styled as a header button. */\n.rvs-ports-open {\n text-decoration: none;\n}\n\n.rvs-ports-hint {\n margin-top: 4px;\n color: var(--rvs-fg3);\n font-size: 11px;\n line-height: 1.45;\n overflow-wrap: anywhere;\n}\n\n/* --------------------------------------------------------- host monitor */\n\n/**\n * The monitor panel is cross-host (not bound to the workspace): one card for a\n * single subject, a compact clickable list for \"all hosts\". Values are\n * tabular-nums so a 5 s refresh does not make the text dance.\n */\n.rvs-monitor-body {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 8px 8px 14px;\n /* Container for the narrow-sidebar layout rules at the end of this section. */\n container-type: inline-size;\n}\n\n/* The rail title and the scope picker both wanted flex:1; the title yields so\n the picker keeps enough width for its own label at 230px. */\n.rvs-monitor-header .rvs-title {\n flex: none;\n}\n\n/* The panel's own settings (refresh interval). Shown under the header only\n while the gear is active; it is chrome, not a modal, so the live values stay\n visible above it. */\n.rvs-monitor-settings {\n flex: none;\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 8px 10px;\n border-bottom: 1px solid var(--rvs-border);\n background: var(--rvs-layer3);\n}\n\n.rvs-monitor-settings-head {\n display: flex;\n align-items: baseline;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.rvs-monitor-settings-label {\n color: var(--rvs-fg2);\n font-size: 11px;\n font-weight: 600;\n}\n\n.rvs-monitor-settings-hint {\n color: var(--rvs-fg3);\n font-size: 10.5px;\n}\n\n.rvs-monitor-settings .rvs-seg {\n align-self: flex-start;\n}\n\n.rvs-monitor-card {\n margin: 2px 0 8px;\n padding: 10px;\n border: 1px solid var(--rvs-border2);\n border-radius: 9px;\n background: var(--rvs-layer3);\n}\n\n.rvs-monitor-card.error {\n border-color: rgba(224, 85, 85, .45);\n}\n\n.rvs-monitor-head {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n}\n\n.rvs-monitor-dot {\n flex: none;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: var(--rvs-fg3);\n}\n\n.rvs-monitor-dot.ok {\n background: var(--rvs-ok, #2ea043);\n}\n\n.rvs-monitor-dot.error {\n background: var(--rvs-danger);\n}\n\n.rvs-monitor-title {\n flex: none;\n max-width: 55%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 13px;\n font-weight: 650;\n color: var(--rvs-fg);\n}\n\n.rvs-monitor-conn {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: right;\n color: var(--rvs-fg3);\n font-size: 10.5px;\n}\n\n.rvs-monitor-sub {\n display: flex;\n align-items: baseline;\n flex-wrap: wrap;\n gap: 6px;\n margin-top: 3px;\n font-size: 11px;\n}\n\n.rvs-monitor-state {\n flex: none;\n font-weight: 600;\n}\n\n.rvs-monitor-state.ok {\n color: var(--rvs-ok, #2ea043);\n}\n\n.rvs-monitor-state.error {\n color: var(--rvs-danger);\n}\n\n.rvs-monitor-state.unknown {\n color: var(--rvs-fg3);\n}\n\n.rvs-monitor-age {\n color: var(--rvs-fg3);\n font-variant-numeric: tabular-nums;\n}\n\n.rvs-monitor-reason {\n flex-basis: 100%;\n min-width: 0;\n overflow-wrap: anywhere;\n color: var(--rvs-fg2);\n line-height: 1.45;\n}\n\n.rvs-monitor-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));\n gap: 8px;\n margin-top: 10px;\n}\n\n.rvs-monitor-tile {\n display: flex;\n flex-direction: column;\n gap: 4px;\n min-width: 0;\n padding: 8px;\n border-radius: 7px;\n background: var(--rvs-hover);\n}\n\n.rvs-monitor-tile-label {\n color: var(--rvs-fg2);\n font-size: 10px;\n font-weight: 600;\n letter-spacing: .06em;\n text-transform: uppercase;\n}\n\n.rvs-monitor-tile-value {\n color: var(--rvs-fg);\n font-size: 18px;\n font-weight: 650;\n line-height: 1.1;\n font-variant-numeric: tabular-nums;\n}\n\n.rvs-monitor-tile-sub {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--rvs-fg2);\n font-size: 10.5px;\n}\n\n.rvs-monitor-bar {\n height: 4px;\n border-radius: 2px;\n background: var(--rvs-border);\n overflow: hidden;\n}\n\n.rvs-monitor-bar-fill {\n display: block;\n height: 100%;\n border-radius: inherit;\n background: var(--rvs-brand);\n transition: width .35s ease;\n}\n\n.rvs-monitor-bar-fill.warn {\n background: var(--rvs-git-m);\n}\n\n.rvs-monitor-bar-fill.hot {\n background: var(--rvs-danger);\n}\n\n/* Four facts: a 2×2 block reads calmer than three-then-one with auto-fit. */\n.rvs-monitor-facts {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 6px;\n margin-top: 8px;\n}\n\n.rvs-monitor-fact {\n min-width: 0;\n padding: 6px 8px;\n border: 1px solid var(--rvs-border);\n border-radius: 7px;\n}\n\n.rvs-monitor-fact-label {\n color: var(--rvs-fg2);\n font-size: 10px;\n font-weight: 600;\n letter-spacing: .06em;\n text-transform: uppercase;\n}\n\n.rvs-monitor-fact-value {\n color: var(--rvs-fg);\n font-size: 11.5px;\n line-height: 1.35;\n font-variant-numeric: tabular-nums;\n overflow-wrap: anywhere;\n}\n\n.rvs-monitor-sparks {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));\n gap: 8px;\n margin-top: 10px;\n}\n\n.rvs-monitor-spark {\n min-width: 0;\n padding: 6px 8px 4px;\n border: 1px solid var(--rvs-border);\n border-radius: 7px;\n}\n\n.rvs-monitor-spark-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 6px;\n min-width: 0;\n}\n\n.rvs-monitor-spark-legend {\n display: inline-flex;\n align-items: center;\n gap: 7px;\n flex: none;\n color: var(--rvs-fg3);\n font-size: 10px;\n}\n\n.rvs-monitor-spark-key {\n display: inline-flex;\n align-items: center;\n gap: 3px;\n}\n\n.rvs-monitor-spark-line {\n display: inline-block;\n width: 10px;\n height: 0;\n border-top: 2px solid currentColor;\n}\n\n.rvs-monitor-spark-line.tx {\n border-top-style: dashed;\n opacity: .7;\n}\n\n.rvs-monitor-spark-label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--rvs-fg2);\n font-size: 10px;\n font-weight: 600;\n letter-spacing: .06em;\n text-transform: uppercase;\n}\n\n.rvs-monitor-spark svg {\n display: block;\n width: 100%;\n height: 34px;\n margin-top: 2px;\n}\n\n.rvs-monitor-spark.cpu {\n color: var(--rvs-brand);\n}\n\n.rvs-monitor-spark.mem {\n color: var(--rvs-git-a);\n}\n\n.rvs-monitor-spark.net {\n color: var(--rvs-git-c);\n}\n\n.rvs-monitor-spark.temp {\n color: var(--rvs-git-m);\n}\n\n.rvs-monitor-spark-empty {\n padding: 8px 0 4px;\n text-align: center;\n color: var(--rvs-fg3);\n font-size: 10.5px;\n}\n\n.rvs-monitor-hint {\n margin-top: 8px;\n color: var(--rvs-fg3);\n font-size: 10.5px;\n line-height: 1.5;\n overflow-wrap: anywhere;\n}\n\n.rvs-monitor-list {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.rvs-monitor-summary {\n padding: 0 2px 4px;\n color: var(--rvs-fg3);\n font-size: 11px;\n}\n\n.rvs-monitor-row {\n display: flex;\n flex-direction: column;\n gap: 5px;\n width: 100%;\n padding: 8px;\n border: 1px solid var(--rvs-border);\n border-radius: 8px;\n background: var(--rvs-layer3);\n color: inherit;\n font: inherit;\n text-align: left;\n cursor: pointer;\n}\n\n.rvs-monitor-row:hover {\n border-color: var(--rvs-border2);\n background: var(--rvs-hover);\n}\n\n.rvs-monitor-row.error {\n border-color: rgba(224, 85, 85, .45);\n}\n\n.rvs-monitor-row-top {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n}\n\n.rvs-monitor-row-name {\n flex: none;\n max-width: 50%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12.5px;\n font-weight: 600;\n}\n\n.rvs-monitor-row-host {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--rvs-fg3);\n font-size: 10.5px;\n}\n\n.rvs-monitor-row-cpu {\n flex: none;\n font-size: 12px;\n font-weight: 650;\n font-variant-numeric: tabular-nums;\n}\n\n.rvs-monitor-row-bars {\n display: flex;\n gap: 4px;\n}\n\n.rvs-monitor-row-bar {\n flex: 1;\n height: 3px;\n border-radius: 2px;\n background: var(--rvs-border);\n overflow: hidden;\n}\n\n.rvs-monitor-row-facts {\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 8px;\n color: var(--rvs-fg3);\n font-size: 10.5px;\n font-variant-numeric: tabular-nums;\n}\n\n/* ------------------------------------------------- narrow sidebar (<=260px)\n Container queries, not media queries: the rail is narrow while the WINDOW is\n wide. Reactions: the three gauges stack (an orphan grid cell with ~90px of\n empty space next to it looked broken), the four curves go 2×2 instead of a\n single tall column, and the all-hosts facts become a 2×2 grid so row heights\n stay uniform. */\n@container (max-width: 260px) {\n .rvs-monitor-grid {\n grid-template-columns: minmax(0, 1fr);\n }\n\n .rvs-monitor-sparks {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n\n .rvs-monitor-row-facts {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n\n /* A 2-column spark is ~80px wide; the label must win over the legend there. */\n .rvs-monitor-spark-legend {\n display: none;\n }\n}\n\n/* ------------------------------------------------------ Ctrl+P quick open */\n\n.rvs-qo-mask {\n /* PORTALED to <body>, i.e. OUTSIDE `.rvs-root` where these tokens are\n declared — without this block every var() below resolves to nothing: the\n active row paints transparent (keyboard selection invisible), the directory\n column stops dimming, and error/warning copy comes out the same colour as\n ordinary text (so \"index failed\" looks like \"no match\"). Keep this subset in\n sync with `.rvs-root`; it lists exactly the tokens the `.rvs-qo*` rules use. */\n --rvs-fg: var(--dsw-alias-label-primary, #e6e6e6);\n --rvs-fg2: var(--dsw-alias-label-secondary, #b9b9b9);\n --rvs-fg3: var(--dsw-alias-label-tertiary, #8b8b8b);\n --rvs-hover: var(--dsw-alias-interactive-bg-hover, rgba(127, 127, 127, .14));\n --rvs-active: var(--dsw-alias-interactive-bg-active, rgba(77, 107, 254, .22));\n --rvs-border: var(--dsw-alias-border-l1, rgba(127, 127, 127, .25));\n --rvs-border2: var(--dsw-alias-border-l2, rgba(127, 127, 127, .38));\n --rvs-input: var(--dsw-alias-bg-input, rgba(127, 127, 127, .12));\n --rvs-brand: var(--dsw-alias-brand-primary, #4d6bfe);\n --rvs-danger: var(--dsw-alias-state-error-primary, #e05555);\n --rvs-git-m: #e2b714;\n --rvs-mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', Consolas, 'Courier New', monospace;\n position: fixed;\n inset: 0;\n /* The modal layer (100000), so toasts (100001) still paint above it. */\n z-index: 100000;\n display: flex;\n align-items: flex-start;\n justify-content: center;\n padding-top: 12vh;\n background: rgba(0, 0, 0, .38);\n backdrop-filter: blur(2px);\n animation: rvsFade .12s ease;\n}\n\n/**\n * Opaque base first, skin overlay on top: the overlay token is frequently\n * translucent, and using it alone let the panel's text bleed through the sheet\n * (the same fix the menu/modal layer needed).\n */\n.rvs-qo {\n width: min(680px, calc(100vw - 40px));\n max-height: min(62vh, 560px);\n display: flex;\n flex-direction: column;\n border: 1px solid var(--rvs-border2);\n border-radius: 10px;\n background-color: Canvas;\n background-image: linear-gradient(var(--dsw-alias-bg-overlay, transparent), var(--dsw-alias-bg-overlay, transparent));\n color: var(--rvs-fg);\n box-shadow: 0 16px 48px rgba(0, 0, 0, .42);\n font-size: 12.5px;\n overflow: hidden;\n animation: rvsPop .12s ease;\n}\n\n.rvs-qo-bar {\n flex: none;\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 10px 12px;\n border-bottom: 1px solid var(--rvs-border);\n}\n\n.rvs-qo-input {\n flex: 1;\n min-width: 0;\n height: 28px;\n padding: 0 8px;\n border: 1px solid var(--rvs-border);\n border-radius: 6px;\n background: var(--rvs-input);\n color: var(--rvs-fg);\n font: inherit;\n outline: none;\n}\n\n.rvs-qo-input:focus {\n border-color: var(--rvs-brand);\n}\n\n.rvs-qo-hint {\n flex: none;\n color: var(--rvs-fg3);\n font-size: 11px;\n white-space: nowrap;\n}\n\n.rvs-qo-list {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n padding: 4px;\n}\n\n.rvs-qo-row {\n display: flex;\n align-items: baseline;\n gap: 8px;\n padding: 4px 8px;\n border-radius: 5px;\n white-space: nowrap;\n overflow: hidden;\n cursor: pointer;\n}\n\n.rvs-qo-row:hover {\n background: var(--rvs-hover);\n}\n\n/* Declared AFTER :hover so a hovered active row keeps the active colour. */\n.rvs-qo-row.active {\n background: var(--rvs-active);\n}\n\n.rvs-qo-dir {\n flex: 0 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n color: var(--rvs-fg3);\n font-size: 11.5px;\n}\n\n.rvs-qo-name {\n flex: none;\n color: var(--rvs-fg);\n font-family: var(--rvs-mono);\n font-size: 12px;\n}\n\n.rvs-qo-hit {\n padding: 0;\n border-radius: 2px;\n background: rgba(77, 107, 254, .32);\n color: inherit;\n font-weight: 600;\n}\n\n.rvs-qo-foot {\n flex: none;\n display: flex;\n flex-direction: column;\n gap: 2px;\n max-height: 72px;\n overflow-y: auto;\n padding: 6px 12px;\n border-top: 1px solid var(--rvs-border);\n color: var(--rvs-fg3);\n font-size: 11px;\n}\n\n.rvs-qo-note {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.rvs-qo-note.error {\n color: var(--rvs-danger);\n}\n\n.rvs-qo-note.warn {\n color: var(--rvs-git-m);\n}\n\n";
14
+ const css$3 = "/**\n * VS Code-style design system for the remote explorer. Every surface below\n * is scoped under `.rvs-root` so the sheet can never leak into the host GUI,\n * and every host token carries a literal fallback: the plugin also renders in\n * the native right-Sidebar fallback and on hosts whose alias tokens differ.\n *\n * Palette and metrics are aligned with the reference implementation\n * (dsh-solution-explorer): 13px/20px panel type, 5px/10px tree rows with a\n * 10px radius, a 30px activity button with the badge tucked into the icon's\n * bottom-right corner, GitHub-Dark token colors, and the\n * `--e2b714 / #4ec9b0 / #f14c4c` modified/added/deleted triple.\n */\n\n.rvs-root {\n --rvs-fg: var(--dsw-alias-label-primary, #e6e6e6);\n --rvs-fg2: var(--dsw-alias-label-secondary, #b9b9b9);\n --rvs-fg3: var(--dsw-alias-label-tertiary, #8b8b8b);\n --rvs-hover: var(--dsw-alias-interactive-bg-hover, rgba(127, 127, 127, .14));\n --rvs-active: var(--dsw-alias-interactive-bg-active, rgba(77, 107, 254, .22));\n --rvs-border: var(--dsw-alias-border-l1, rgba(127, 127, 127, .25));\n --rvs-border2: var(--dsw-alias-border-l2, rgba(127, 127, 127, .38));\n --rvs-input: var(--dsw-alias-bg-input, rgba(127, 127, 127, .12));\n --rvs-overlay: var(--dsw-alias-bg-overlay, #24262e);\n --rvs-layer3: var(--dsw-alias-bg-layer-3, rgba(127, 127, 127, .16));\n --rvs-brand: var(--dsw-alias-brand-primary, #4d6bfe);\n --rvs-accent: var(--dsw-alias-button-info-fill, #4d6bfe);\n --rvs-danger: var(--dsw-alias-state-error-primary, #e05555);\n --rvs-ok: #2ea043;\n --rvs-git-m: #e2b714;\n --rvs-git-a: #4ec9b0;\n --rvs-git-d: #f14c4c;\n --rvs-git-r: #4ec9b0;\n --rvs-git-c: #58a6ff;\n --rvs-git-u: #f14c4c;\n --rvs-git-x: #6e6e6e;\n --rvs-add-bg: rgba(78, 201, 176, .15);\n --rvs-del-bg: rgba(241, 76, 76, .15);\n /* Opaque equivalents, for elements that must not show what scrolls under\n them (the pinned diff line numbers). */\n --rvs-add-solid: #e4f6f1;\n --rvs-del-solid: #fdeaea;\n --rvs-mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', Consolas, 'Courier New', monospace;\n /* Opaque code surfaces (Light+ default; the dark block below flips them). */\n --rvs-code-bg: #ffffff;\n --rvs-code-fg: #1f1f1f;\n --rvs-code-gutter-fg: #237893;\n\n display: flex;\n flex-direction: row;\n height: 100%;\n min-height: 0;\n overflow: hidden;\n color: var(--rvs-fg);\n font-size: 13px;\n line-height: 20px;\n}\n\n/**\n * Code surfaces are OPAQUE, in the editor's own palette rather than the DSH\n * skin: syntax colors need a definite background to stay readable, and the\n * app shell marks its resolved scheme on <body> (same signal theme.ts reads).\n */\nbody[data-ds-dark-theme] .rvs-root {\n --rvs-code-bg: #1e1e1e;\n --rvs-code-fg: #d4d4d4;\n --rvs-code-gutter-fg: #858585;\n --rvs-add-solid: #16332e;\n --rvs-del-solid: #3b2325;\n}\n\n.rvs-edge {\n background: var(--rvs-code-bg);\n color: var(--rvs-code-fg);\n}\n\n.rvs-root *,\n.rvs-portal * {\n box-sizing: border-box;\n}\n\n/* ------------------------------------------------------------ activity rail */\n\n.rvs-rail {\n flex: none;\n width: 38px;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 4px;\n padding: 8px 0;\n border-right: 1px solid var(--rvs-border);\n background: var(--dsw-specific-sidebar-fill, transparent);\n}\n\n.rvs-rail-btn {\n position: relative;\n flex: none;\n width: 30px;\n height: 30px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: none;\n border-radius: 6px;\n background: transparent;\n color: var(--rvs-fg3);\n cursor: pointer;\n}\n\n.rvs-rail-btn:hover {\n color: var(--rvs-fg);\n background: var(--rvs-hover);\n}\n\n.rvs-rail-btn.active {\n color: var(--rvs-fg);\n background: var(--rvs-hover);\n box-shadow: inset 2px 0 0 var(--rvs-brand);\n}\n\n.rvs-rail-btn.danger:hover {\n color: var(--rvs-danger);\n}\n\n.rvs-rail-badge {\n position: absolute;\n bottom: 1px;\n right: 1px;\n min-width: 14px;\n height: 14px;\n padding: 0 3px;\n border-radius: 7px;\n background: var(--rvs-accent);\n color: #fff;\n font-size: 9px;\n font-weight: 700;\n line-height: 14px;\n text-align: center;\n pointer-events: none;\n}\n\n.rvs-rail-sep {\n flex: none;\n width: 20px;\n height: 1px;\n margin: 4px 0;\n background: var(--rvs-border);\n}\n\n/* -------------------------------------------------------- panel + editor */\n\n.rvs-column {\n flex: 1;\n min-width: 0;\n min-height: 0;\n display: flex;\n flex-direction: column;\n}\n\n.rvs-pane {\n display: flex;\n flex-direction: column;\n min-height: 0;\n min-width: 0;\n overflow: hidden;\n}\n\n/**\n * One lazily-mounted panel slot: a visited panel stays mounted and is merely\n * hidden, so returning to the explorer (or the terminal) neither refetches nor\n * flashes a reload.\n */\n.rvs-viewslot {\n flex: 1;\n min-height: 0;\n min-width: 0;\n flex-direction: column;\n height: 100%;\n overflow: hidden;\n}\n\n/**\n * Padding for the legacy views (workspaces / terminal) that draw no chrome.\n *\n * It MUST be a flex column: the workspaces view scroller is its child and gets\n * its bounded height only from a flex parent (`flex:1; min-height:0`). As a\n * plain block it grew with its content instead, so the panel clipped at the\n * viewslot's `overflow:hidden` and the binding list could not scroll at all —\n * a seventh workspace (and the wizard under it) was simply unreachable.\n */\n.rvs-viewpad {\n display: flex;\n flex-direction: column;\n min-height: 0;\n padding: 10px 12px 14px;\n box-sizing: border-box;\n}\n\n.rvs-pane.grow {\n flex: 1;\n}\n\n.rvs-header {\n flex: none;\n display: flex;\n align-items: center;\n gap: 6px;\n height: 34px;\n padding: 0 8px 0 10px;\n border-bottom: 1px solid var(--rvs-border);\n}\n\n.rvs-header .rvs-title {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 11px;\n font-weight: 700;\n letter-spacing: .04em;\n text-transform: uppercase;\n color: var(--rvs-fg3);\n}\n\n.rvs-hbtn {\n flex: none;\n width: 22px;\n height: 22px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: none;\n border-radius: 5px;\n background: transparent;\n color: var(--rvs-fg3);\n cursor: pointer;\n}\n\n.rvs-hbtn:hover {\n color: var(--rvs-fg);\n background: var(--rvs-hover);\n}\n\n.rvs-hbtn.danger:hover {\n color: #fff;\n background: var(--rvs-danger);\n}\n\n.rvs-hbtn:disabled {\n opacity: .4;\n cursor: default;\n}\n\n.rvs-scroll {\n flex: 1;\n min-height: 0;\n overflow: auto;\n scrollbar-width: thin;\n}\n\n.rvs-globalbar {\n flex: none;\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 4px 8px;\n border-bottom: 1px solid var(--rvs-border);\n font-size: 11px;\n}\n\n/*\n * Connection chip: the Host's SSH link health for the workspace on screen.\n * Lives in the top bar and, compact, in the editor info bar. Only the errored\n * state is interactive (retry); the others are a status read-out.\n */\n.rvs-conn {\n flex: none;\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 1px 6px 1px 5px;\n border: 1px solid transparent;\n border-radius: 9px;\n background: transparent;\n color: var(--rvs-fg2);\n font: inherit;\n font-size: 11px;\n line-height: 16px;\n cursor: default;\n}\n\n.rvs-conn.compact {\n padding: 0 2px;\n border: none;\n background: none;\n}\n\n.rvs-conn.clickable {\n cursor: pointer;\n}\n\n.rvs-conn.clickable:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-conn-dot {\n flex: none;\n width: 7px;\n height: 7px;\n border-radius: 50%;\n background: var(--rvs-fg3);\n}\n\n.rvs-conn-ok .rvs-conn-dot {\n background: var(--rvs-ok, #2ea043);\n}\n\n.rvs-conn-error {\n color: var(--rvs-danger);\n}\n\n.rvs-conn-error .rvs-conn-dot {\n background: var(--rvs-danger);\n}\n\n.rvs-conn-label {\n max-width: 9em;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.rvs-scroll::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n}\n\n.rvs-scroll::-webkit-scrollbar-thumb {\n background: var(--dsw-alias-scrollbar-bg-l2, rgba(127, 127, 127, .4));\n border-radius: 4px;\n}\n\n.rvs-scroll::-webkit-scrollbar-thumb:hover {\n background: var(--dsw-alias-scrollbar-hover-l2, rgba(127, 127, 127, .6));\n}\n\n.rvs-scroll::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.rvs-vsplit-handle {\n flex: none;\n position: relative;\n height: 7px;\n cursor: row-resize;\n touch-action: none;\n}\n\n.rvs-vsplit-handle::after {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n top: 3px;\n height: 1px;\n background: var(--rvs-border);\n}\n\n.rvs-vsplit-handle:hover::after,\n.rvs-vsplit-handle[data-dragging='true']::after {\n top: 2px;\n height: 3px;\n border-radius: 2px;\n background: var(--rvs-brand);\n}\n\n/* ------------------------------------------------------------------ tree */\n\n.rvs-tree {\n padding: 4px 6px 12px;\n min-width: 0;\n}\n\n.rvs-node {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n width: 100%;\n padding: 4px 8px;\n border: none;\n background: transparent;\n border-radius: 8px;\n color: var(--rvs-fg);\n font: inherit;\n font-size: 13px;\n line-height: 18px;\n text-align: left;\n cursor: pointer;\n}\n\n.rvs-node:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-node.selected {\n background: var(--rvs-active);\n}\n\n.rvs-node.cut {\n opacity: .5;\n}\n\n.rvs-node.drop-target {\n background: var(--rvs-active);\n outline: 1px solid var(--rvs-brand);\n outline-offset: -1px;\n}\n\n/* Where a file drag will land: a slip must not silently drop a tree into the\n wrong directory. */\n.rvs-drop-hint {\n margin: 2px 8px 4px;\n padding: 3px 8px;\n border: 1px dashed var(--rvs-brand);\n border-radius: 3px;\n font-size: 11px;\n color: var(--rvs-brand);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n direction: rtl;\n unicode-bidi: plaintext;\n}\n/* Upload progress: one line under the header. A multi-minute transfer with no\n feedback is indistinguishable from a hung explorer, so the row names the\n count and the file on the wire. */\n.rvs-upload-bar {\n flex: none;\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 3px 10px 4px;\n font-size: 11px;\n color: var(--dsw-alias-text-secondary, rgba(127, 127, 127, .95));\n}\n\n.rvs-upload-text {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n direction: rtl;\n unicode-bidi: plaintext;\n}\n\n.rvs-node-icon {\n flex: none;\n width: 16px;\n height: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--rvs-fg3);\n}\n\n.rvs-node-name {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-node-actions {\n flex: none;\n display: none;\n align-items: center;\n gap: 2px;\n}\n\n.rvs-node:hover .rvs-node-actions {\n display: flex;\n}\n\n.rvs-git-letter {\n flex: none;\n width: 14px;\n margin-left: 2px;\n font-size: 11px;\n font-weight: 700;\n text-align: center;\n}\n\n.rvs-git-M, .rvs-letter-M { color: var(--rvs-git-m); }\n.rvs-git-A, .rvs-letter-A { color: var(--rvs-git-a); }\n.rvs-git-D, .rvs-letter-D { color: var(--rvs-git-d); }\n.rvs-git-R, .rvs-letter-R { color: var(--rvs-git-r); }\n.rvs-git-C, .rvs-letter-C { color: var(--rvs-git-c); }\n.rvs-git-U, .rvs-letter-U { color: var(--rvs-git-u); }\n.rvs-git-q, .rvs-letter-q, .rvs-git-\\\\? { color: var(--rvs-git-a); }\n.rvs-git-x, .rvs-letter-x { color: var(--rvs-git-x); }\n.rvs-git-T, .rvs-letter-T { color: var(--rvs-git-m); }\n\n.rvs-rename-input {\n flex: 1;\n min-width: 0;\n padding: 0 4px;\n border: 1px solid var(--rvs-brand);\n border-radius: 4px;\n background: var(--rvs-input);\n color: var(--rvs-fg);\n font: inherit;\n font-size: 13px;\n line-height: 18px;\n outline: none;\n}\n\n.rvs-empty {\n padding: 18px 14px;\n color: var(--rvs-fg3);\n font-size: 12px;\n text-align: center;\n line-height: 1.7;\n}\n\n.rvs-banner {\n margin: 6px 8px;\n padding: 6px 9px;\n border-radius: 6px;\n font-size: 12px;\n line-height: 1.5;\n word-break: break-word;\n white-space: pre-wrap;\n}\n\n.rvs-banner.info {\n background: var(--rvs-hover);\n color: var(--rvs-fg2);\n}\n\n.rvs-banner.error {\n background: rgba(200, 60, 60, .16);\n color: var(--rvs-danger);\n}\n\n.rvs-banner.warn {\n background: rgba(226, 183, 20, .14);\n color: var(--rvs-git-m);\n}\n\n/* ------------------------------------------------- save conflict (refused) */\n\n/* The banner is a decision, not a message: it stacks its text over the actions\n so a narrow sidebar cannot squeeze the buttons into one unreadable row. */\n.rvs-conflict {\n display: flex;\n flex-direction: column;\n gap: 6px;\n white-space: normal;\n}\n\n.rvs-conflict-actions {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.rvs-conflict-diff {\n margin: 6px 8px;\n max-height: 40vh;\n overflow: auto;\n border: 1px solid var(--rvs-border);\n border-radius: 6px;\n background: var(--rvs-hover);\n color: var(--rvs-fg2);\n font-family: var(--rvs-mono);\n font-size: 11.5px;\n line-height: 1.45;\n}\n\n.rvs-conflict-diff-head {\n position: sticky;\n top: 0;\n padding: 4px 8px;\n background: var(--rvs-panel, var(--rvs-hover));\n border-bottom: 1px solid var(--rvs-border);\n font-family: inherit;\n}\n\n.rvs-conflict-hunk-head {\n padding: 2px 8px;\n color: var(--rvs-fg3);\n border-bottom: 1px solid var(--rvs-border);\n}\n\n.rvs-conflict-row {\n padding: 0 8px;\n white-space: pre;\n}\n\n.rvs-conflict-row.add {\n background: rgba(78, 201, 176, .14);\n color: var(--rvs-git-a);\n}\n\n.rvs-conflict-row.del {\n background: rgba(241, 76, 76, .12);\n color: var(--rvs-git-d);\n}\n\n.rvs-conflict-more {\n padding: 4px 8px;\n color: var(--rvs-fg3);\n}\n\n/* --------------------------------------------------------- source control */\n\n.rvs-scm-section {\n border-bottom: 1px solid var(--rvs-border);\n}\n\n.rvs-scm-head {\n display: flex;\n align-items: center;\n gap: 4px;\n height: 28px;\n padding: 0 6px 0 4px;\n cursor: pointer;\n user-select: none;\n font-size: 11px;\n font-weight: 700;\n letter-spacing: .04em;\n text-transform: uppercase;\n color: var(--rvs-fg2);\n}\n\n.rvs-scm-head:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-scm-head .rvs-count {\n margin-left: 6px;\n font-size: 11px;\n font-weight: 600;\n letter-spacing: 0;\n color: var(--rvs-fg3);\n}\n\n.rvs-scm-head-actions {\n margin-left: auto;\n display: flex;\n align-items: center;\n gap: 2px;\n}\n\n.rvs-scm-section.collapsed > *:not(.rvs-scm-head) {\n display: none !important;\n}\n\n.rvs-chevron {\n flex: none;\n transition: transform .12s ease;\n}\n\n.rvs-chevron.open {\n transform: rotate(90deg);\n}\n\n.rvs-scm-item {\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n padding: 3px 8px 3px 22px;\n border: none;\n background: transparent;\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12.5px;\n line-height: 19px;\n text-align: left;\n cursor: pointer;\n}\n\n.rvs-scm-item:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-scm-item.selected {\n background: var(--rvs-active);\n}\n\n.rvs-scm-path {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-scm-dir {\n flex: none;\n color: var(--rvs-fg3);\n}\n\n.rvs-scm-actions {\n flex: none;\n display: none;\n align-items: center;\n gap: 1px;\n}\n\n.rvs-scm-item:hover .rvs-scm-actions {\n display: flex;\n}\n\n.rvs-commit-box {\n flex: none;\n padding: 8px 10px;\n border-bottom: 1px solid var(--rvs-border);\n}\n\n.rvs-commit-input {\n width: 100%;\n min-height: 58px;\n max-height: 180px;\n padding: 6px 8px;\n border: 1px solid var(--rvs-border2);\n border-radius: 8px;\n background: var(--rvs-input);\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12.5px;\n line-height: 18px;\n resize: vertical;\n outline: none;\n}\n\n.rvs-commit-input:focus {\n border-color: var(--rvs-brand);\n}\n\n.rvs-commit-row {\n display: flex;\n gap: 6px;\n margin-top: 6px;\n}\n\n.rvs-commit-btn {\n flex: 1;\n padding: 5px 8px;\n border: none;\n border-radius: 6px;\n background: var(--rvs-accent);\n color: #fff;\n font: inherit;\n font-size: 12.5px;\n font-weight: 600;\n cursor: pointer;\n}\n\n.rvs-commit-btn:disabled {\n opacity: .45;\n cursor: default;\n}\n\n.rvs-repo-item {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 5px 10px 5px 12px;\n cursor: pointer;\n font-size: 12.5px;\n}\n\n.rvs-repo-item:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-repo-item.active {\n background: var(--rvs-active);\n}\n\n.rvs-repo-name {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-repo-branch {\n flex: none;\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n.rvs-pill {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 1px 8px;\n border-radius: 999px;\n background: var(--rvs-hover);\n font-size: 11px;\n font-weight: 600;\n color: var(--rvs-fg);\n}\n\n/* \"cached · refreshing\" badge: quieter than a pill that carries information the\n user asked for (a branch), because it is a qualifier on the list beside it. */\n.rvs-pill-cached {\n flex: none;\n font-weight: 500;\n color: var(--rvs-fg3);\n border: 1px solid var(--rvs-border2);\n background: transparent;\n}\n\n.rvs-subpanel {\n margin: 6px 8px;\n padding: 8px;\n border: 1px solid var(--rvs-border2);\n border-radius: 8px;\n font-size: 12px;\n}\n\n.rvs-subpanel-head {\n display: flex;\n align-items: center;\n gap: 6px;\n margin-bottom: 6px;\n color: var(--rvs-fg2);\n font-weight: 600;\n}\n\n.rvs-chip {\n flex: none;\n padding: 2px 8px;\n border: 1px solid var(--rvs-border2);\n border-radius: 6px;\n background: transparent;\n color: var(--rvs-fg);\n font: inherit;\n font-size: 11.5px;\n cursor: pointer;\n}\n\n.rvs-chip:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-chip.primary {\n background: var(--rvs-accent);\n border-color: transparent;\n color: #fff;\n}\n\n.rvs-chip.danger:hover {\n background: var(--rvs-danger);\n border-color: transparent;\n color: #fff;\n}\n\n.rvs-input {\n flex: 1;\n min-width: 0;\n padding: 4px 8px;\n border: 1px solid var(--rvs-border2);\n border-radius: 6px;\n background: var(--rvs-input);\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12px;\n outline: none;\n}\n\n.rvs-input:focus {\n border-color: var(--rvs-brand);\n}\n\n.rvs-select {\n flex: 1;\n min-width: 0;\n padding: 3px 6px;\n border: 1px solid var(--rvs-border2);\n border-radius: 6px;\n background: var(--rvs-input);\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12px;\n outline: none;\n color-scheme: light dark;\n}\n\n.rvs-select option {\n background: Canvas;\n color: CanvasText;\n}\n\n/* ------------------------------------------------- conversation-view mount */\n\n/**\n * Bound the center surface to the height the host gave the slot.\n *\n * `flex: 1 1 0` is the load-bearing declaration, and BOTH halves of it matter.\n * The host's own slot rules are:\n *\n * .wSkVaW_viewArea { flex: 1; min-height: 0; overflow: hidden }\n * [data-phase=active] .viewArea { flex: 1 0 auto; min-height: auto }\n * .wSkVaW_root { height: 100%; position: relative }\n *\n * While a conversation is active the slot's flex-basis is `auto`, so the slot's\n * height is driven by its child's INTRINSIC size. A full-height editor then\n * pushed it to 5510px for a 300-line file, the outer scroller took over, and\n * the tab strip and file info bar scrolled off the top with the code.\n *\n * `flex-basis: 0` breaks that cycle: the item stops contributing its content\n * height, so the slot stays the size the host intended and `.cm-scroller`\n * becomes the only scroller. Measured in the fixture (.spike/layout-fixture.html,\n * which mirrors the slot rules above) — only the bottom row fits:\n *\n * flex: 1 1 0 + min-height: 0 -> 736px OK\n * flex: 1 1 auto (i.e. `flex: 1`) -> 5510px broken\n * height: 0 + min-height: 100% -> 5510px broken\n * max-height: 100% -> 5510px broken\n * height: 100vh -> 5510px broken\n *\n * `height: 100%` is deliberately NOT set here any more. It resolves to `auto`\n * against a slot whose height is not definite — it reads like the fix but\n * measures as a no-op, which is how this regressed once already.\n *\n * NOT `position: absolute` either — that was another failed attempt: `.viewArea`\n * is not itself positioned, so `inset: 0` escaped to the host's `.wSkVaW_root`\n * (which is `position: relative`) and the plugin's global bar floated on top of\n * the host's 对话 / 轨迹 / 远程编辑器 tab row.\n *\n * The sidebar's `.rvs-viewslot` is deliberately not covered: it has a bounding\n * parent and this bug is specific to the conversation slot's `min-height: auto`\n * phase.\n */\n.rvs-center {\n flex: 1 1 0;\n display: flex;\n flex-direction: column;\n min-height: 0;\n min-width: 0;\n overflow: hidden;\n}\n\n/* ---------------------------------------------------------------- editor */\n\n.rvs-etabs {\n flex: none;\n display: flex;\n align-items: stretch;\n gap: 2px;\n height: 32px;\n padding: 0 4px;\n overflow-x: auto;\n overflow-y: hidden;\n border-bottom: 1px solid var(--rvs-border);\n scrollbar-width: none;\n}\n\n.rvs-etabs::-webkit-scrollbar {\n height: 0;\n}\n\n.rvs-etab {\n flex: none;\n display: flex;\n align-items: center;\n gap: 5px;\n max-width: 190px;\n margin: 4px 0;\n padding: 0 4px 0 8px;\n border: none;\n border-radius: 6px;\n background: transparent;\n color: var(--rvs-fg3);\n font: inherit;\n font-size: 12px;\n cursor: pointer;\n}\n\n.rvs-etab:hover {\n background: var(--rvs-hover);\n color: var(--rvs-fg);\n}\n\n.rvs-etab.active {\n background: var(--rvs-layer3);\n color: var(--rvs-fg);\n}\n\n.rvs-etab-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-etab-dot {\n flex: none;\n font-size: 9px;\n color: var(--rvs-git-m);\n}\n\n.rvs-etab-close {\n flex: none;\n width: 16px;\n height: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: none;\n border-radius: 4px;\n background: transparent;\n color: inherit;\n cursor: pointer;\n opacity: .65;\n}\n\n.rvs-etab-close:hover {\n background: var(--rvs-hover);\n opacity: 1;\n}\n\n.rvs-einfo {\n flex: none;\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 2px 8px 2px 10px;\n border-bottom: 1px solid var(--rvs-border);\n font-size: 11px;\n line-height: 18px;\n color: var(--rvs-fg3);\n}\n\n.rvs-einfo-path {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n /* Truncate from the LEFT (keep the tail) without reordering the text:\n `plaintext` gives the content its own LTR base direction, which is what\n stops a leading \"/\" from rendering as a trailing one. */\n direction: rtl;\n unicode-bidi: plaintext;\n text-align: left;\n}\n\n.rvs-einfo-spacer {\n margin-left: auto;\n}\n\n.rvs-status.dirty { color: var(--rvs-git-m); }\n.rvs-status.saved { color: var(--rvs-git-a); }\n.rvs-status.saving { color: var(--rvs-fg2); }\n\n.rvs-body {\n flex: 1;\n min-height: 0;\n min-width: 0;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n /* Anchors portalled overlays (the find widget) outside every scroller. */\n position: relative;\n background: var(--rvs-code-bg);\n color: var(--rvs-code-fg);\n}\n\n.rvs-editor-host {\n flex: 1;\n min-height: 0;\n overflow: hidden;\n background: var(--rvs-code-bg);\n}\n\n/* Keep a panel mounted but out of layout (and out of the a11y tree). Used by\n the editor host in preview mode: unmounting it destroyed the buffer and the\n undo stack, hiding it preserves both. */\n.rvs-hidden {\n display: none !important;\n}\n\n/* Find-match marks. Painted by our own StateField (`findMatchHighlight`), and\n deliberately the SAME colours as the `.cm-searchMatch` rules below so the\n two paths cannot drift apart. */\n.rvs-find-match {\n background-color: rgba(226, 183, 20, .30);\n outline: 1px solid rgba(226, 183, 20, .55);\n border-radius: 2px;\n}\n\n.rvs-find-match.current {\n background-color: rgba(226, 183, 20, .48);\n}\n\n/* ------------------------------------------------------- preview surfaces */\n\n.rvs-preview-img {\n flex: 1;\n min-height: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: auto;\n background-color: var(--rvs-code-bg);\n background-image:\n linear-gradient(45deg, rgba(127, 127, 127, .08) 25%, transparent 25%),\n linear-gradient(-45deg, rgba(127, 127, 127, .08) 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, rgba(127, 127, 127, .08) 75%),\n linear-gradient(-45deg, transparent 75%, rgba(127, 127, 127, .08) 75%);\n background-size: 20px 20px, 20px 20px, 20px 20px, 20px 20px;\n background-position: 0 0, 0 10px, 10px -10px, -10px 0;\n}\n\n.rvs-preview-img img {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n image-rendering: auto;\n}\n\n.rvs-markdown {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 12px 14px 24px;\n font-size: 13px;\n line-height: 1.7;\n color: var(--rvs-code-fg);\n background: var(--rvs-code-bg);\n user-select: text;\n}\n\n.rvs-markdown h1, .rvs-markdown h2, .rvs-markdown h3, .rvs-markdown h4 {\n margin: 14px 0 6px;\n line-height: 1.35;\n}\n\n.rvs-markdown h1 { font-size: 19px; border-bottom: 1px solid var(--rvs-border); padding-bottom: 5px; }\n.rvs-markdown h2 { font-size: 16px; border-bottom: 1px solid var(--rvs-border); padding-bottom: 4px; }\n.rvs-markdown h3 { font-size: 14px; }\n.rvs-markdown p { margin: 6px 0; }\n.rvs-markdown ul, .rvs-markdown ol { margin: 6px 0; padding-left: 22px; }\n.rvs-markdown li { margin: 2px 0; }\n.rvs-markdown code {\n padding: 1px 5px;\n border-radius: 4px;\n background: var(--rvs-hover);\n font-family: var(--rvs-mono);\n font-size: 12px;\n}\n.rvs-markdown pre {\n margin: 8px 0;\n padding: 9px 11px;\n border-radius: 8px;\n background: var(--rvs-input);\n overflow-x: auto;\n}\n.rvs-markdown pre code { padding: 0; background: transparent; }\n.rvs-markdown blockquote {\n margin: 8px 0;\n padding: 2px 12px;\n border-left: 3px solid var(--rvs-border2);\n color: var(--rvs-fg2);\n}\n.rvs-markdown a { color: var(--dsw-alias-label-link, #58a6ff); text-decoration: none; }\n.rvs-markdown a:hover { text-decoration: underline; }\n.rvs-markdown table { border-collapse: collapse; margin: 8px 0; font-size: 12px; }\n.rvs-markdown th, .rvs-markdown td { border: 1px solid var(--rvs-border2); padding: 4px 8px; }\n.rvs-markdown hr { border: none; border-top: 1px solid var(--rvs-border); margin: 12px 0; }\n\n.rvs-html-frame {\n flex: 1;\n min-height: 0;\n width: 100%;\n border: none;\n background: #fff;\n}\n\n/* ------------------------------------------------------------------ diff */\n\n.rvs-diff {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n\n.rvs-diff-toolbar {\n flex: none;\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 3px 8px;\n border-bottom: 1px solid var(--rvs-border);\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n/**\n * Prev/next change, in the toolbar's free space.\n *\n * Two chevrons around a tabular counter: the pair then reads as \"jump to change\n * n of N\" instead of two anonymous arrows, and the counter doubles as the \"where\n * am I\" cue while scrolling by hand.\n */\n.rvs-hunknav {\n display: inline-flex;\n align-items: center;\n gap: 1px;\n margin-right: 2px;\n}\n\n.rvs-hunknav-pos {\n min-width: 30px;\n text-align: center;\n font-size: 11px;\n font-variant-numeric: tabular-nums;\n color: var(--rvs-fg3);\n user-select: none;\n}\n\n.rvs-seg {\n display: inline-flex;\n border: 1px solid var(--rvs-border2);\n border-radius: 6px;\n overflow: hidden;\n}\n\n.rvs-seg button {\n padding: 2px 9px;\n border: none;\n background: transparent;\n color: var(--rvs-fg2);\n font: inherit;\n font-size: 11px;\n cursor: pointer;\n}\n\n.rvs-seg button.active {\n background: var(--rvs-active);\n color: var(--rvs-fg);\n}\n\n.rvs-seg button:hover:not(.active) {\n background: var(--rvs-hover);\n}\n\n.rvs-diff-grid {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n overflow-x: hidden;\n font-family: var(--rvs-mono);\n font-size: 12px;\n line-height: 18px;\n scrollbar-width: thin;\n background: var(--rvs-code-bg);\n color: var(--rvs-code-fg);\n}\n\n/**\n * Top horizontal scrollbar.\n *\n * The two panes scroll horizontally on their own — so a long line can never\n * widen the layout — and this proxy bar drives both of them from the TOP of\n * the view, instead of forcing a scroll to the bottom of the file to reach a\n * horizontal bar. Its inner spacer is sized to the widest line, and the\n * component only renders it when a line really is wider than the grid.\n *\n * Sized and coloured to be SEEN: as a 13 px band with `scrollbar-width: thin`\n * and a faint thumb, it read as \"there is no horizontal scrollbar at all\".\n */\n.rvs-hbar {\n flex: none;\n height: 15px;\n overflow-x: auto;\n overflow-y: hidden;\n border-bottom: 1px solid var(--rvs-border);\n background: var(--rvs-hover);\n}\n\n.rvs-hbar-inner {\n height: 1px;\n}\n\n.rvs-hbar::-webkit-scrollbar {\n height: 11px;\n}\n\n.rvs-hbar::-webkit-scrollbar-thumb {\n background: var(--dsw-alias-scrollbar-bg-l2, rgba(150, 160, 180, .75));\n border-radius: 6px;\n border: 2px solid transparent;\n background-clip: padding-box;\n}\n\n.rvs-hbar::-webkit-scrollbar-thumb:hover {\n background: var(--dsw-alias-scrollbar-hover-l2, rgba(170, 180, 200, .95));\n background-clip: padding-box;\n}\n\n.rvs-hbar::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.rvs-diff-cols {\n display: flex;\n align-items: stretch;\n min-width: 0;\n}\n\n/**\n * One diff pane. `flex: 1 1 0` keeps the panes EXACTLY equal however long a\n * line is (the previous row markup let a long line widen its own pane, which\n * is what broke the symmetry). Each pane keeps its own horizontal scroll, and\n * its scrollbar is now VISIBLE: the top proxy remains the convenient control,\n * but the pane's own bar is what a user reaches for first, and it sits right\n * under the content when the file is shorter than the view.\n */\n.rvs-diff-col {\n flex: 1 1 0;\n min-width: 0;\n overflow-x: auto;\n overflow-y: hidden;\n}\n\n.rvs-diff-col::-webkit-scrollbar {\n height: 9px;\n width: 0;\n}\n\n.rvs-diff-col::-webkit-scrollbar-thumb {\n background: var(--dsw-alias-scrollbar-bg-l2, rgba(150, 160, 180, .6));\n border-radius: 5px;\n}\n\n.rvs-diff-col::-webkit-scrollbar-thumb:hover {\n background: var(--dsw-alias-scrollbar-hover-l2, rgba(170, 180, 200, .85));\n}\n\n.rvs-diff-col::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.rvs-dline {\n display: flex;\n align-items: flex-start;\n height: 18px;\n line-height: 18px;\n white-space: pre;\n}\n\n.rvs-dline-num {\n /* Pinned while the line scrolls sideways, so a long line never takes the\n line numbers away with it. */\n position: sticky;\n left: 0;\n z-index: 1;\n flex: none;\n width: 3.4em;\n padding-right: 6px;\n text-align: right;\n color: var(--rvs-fg3);\n opacity: .85;\n user-select: none;\n background: var(--rvs-code-bg);\n}\n\n.rvs-row-del .rvs-dline-num {\n background: var(--rvs-del-solid);\n}\n\n.rvs-row-add .rvs-dline-num {\n background: var(--rvs-add-solid);\n}\n\n.rvs-dline-text {\n flex: 1;\n padding-right: 10px;\n user-select: text;\n}\n\n.rvs-gutter-col {\n flex: none;\n width: 30px;\n border-left: 1px solid var(--rvs-border);\n border-right: 1px solid var(--rvs-border);\n user-select: none;\n}\n\n.rvs-gutter-line {\n height: 18px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.rvs-diff-grid::-webkit-scrollbar {\n width: 9px;\n height: 0;\n}\n\n.rvs-diff-grid::-webkit-scrollbar-thumb {\n background: var(--dsw-alias-scrollbar-bg-l2, rgba(127, 127, 127, .4));\n border-radius: 4px;\n}\n\n.rvs-num {\n flex: none;\n display: inline-block;\n width: 3.2em;\n padding-right: 6px;\n text-align: right;\n color: var(--rvs-fg3);\n opacity: .6;\n user-select: none;\n}\n\n.rvs-row-del {\n background: var(--rvs-del-bg);\n}\n\n.rvs-row-del .rvs-dline-text,\n.rvs-row-del .rvs-dline-num,\n.rvs-row-del .rvs-num {\n color: #f14c4c;\n}\n\n.rvs-row-add {\n background: var(--rvs-add-bg);\n}\n\n.rvs-row-add .rvs-dline-text,\n.rvs-row-add .rvs-dline-num,\n.rvs-row-add .rvs-num {\n color: #4ec9b0;\n}\n\n.rvs-row-empty {\n color: var(--rvs-fg3);\n opacity: .35;\n}\n\n.rvs-gutter {\n flex: none;\n width: 30px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-left: 1px solid var(--rvs-border);\n border-right: 1px solid var(--rvs-border);\n user-select: none;\n}\n\n.rvs-gutter-dot {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n opacity: .7;\n}\n\n.rvs-hunk-btns {\n display: flex;\n gap: 2px;\n}\n\n.rvs-hunk-btn {\n width: 13px;\n height: 15px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: none;\n border-radius: 3px;\n background: transparent;\n color: var(--rvs-fg3);\n font-size: 11px;\n line-height: 1;\n cursor: pointer;\n}\n\n.rvs-hunk-btn:hover {\n background: var(--rvs-hover);\n color: var(--rvs-fg);\n}\n\n.rvs-hunk-btn.stage:hover {\n color: var(--rvs-git-a);\n}\n\n.rvs-hunk-btn.revert:hover {\n color: var(--rvs-git-d);\n}\n\n/**\n * Token colors: VS Code Dark+ / Light+, matching the CodeMirror theme in\n * `vsc/editor-theme.ts`. Keeping ONE palette for both surfaces means a file\n * does not change colors when the diff is switched to its editable side.\n */\n.rvs-t-comment { color: #6a9955; }\n.rvs-t-string { color: #ce9178; }\n.rvs-t-keyword { color: #569cd6; }\n.rvs-t-number { color: #b5cea8; }\n.rvs-t-func { color: #dcdcaa; }\n.rvs-t-type { color: #4ec9b0; }\n.rvs-t-attr { color: #9cdcfe; }\n.rvs-t-variable { color: #9cdcfe; }\n.rvs-t-operator { color: #d4d4d4; }\n.rvs-t-punct { color: #d4d4d4; }\n.rvs-t-tag { color: #569cd6; }\n.rvs-t-meta { color: #c586c0; }\n.rvs-t-insert { color: #4ec9b0; }\n.rvs-t-delete { color: #f14c4c; }\n\nbody:not([data-ds-dark-theme]) .rvs-t-comment { color: #008000; }\nbody:not([data-ds-dark-theme]) .rvs-t-string { color: #a31515; }\nbody:not([data-ds-dark-theme]) .rvs-t-keyword { color: #0000ff; }\nbody:not([data-ds-dark-theme]) .rvs-t-number { color: #098658; }\nbody:not([data-ds-dark-theme]) .rvs-t-func { color: #795e26; }\nbody:not([data-ds-dark-theme]) .rvs-t-type { color: #267f99; }\nbody:not([data-ds-dark-theme]) .rvs-t-attr,\nbody:not([data-ds-dark-theme]) .rvs-t-variable { color: #001080; }\nbody:not([data-ds-dark-theme]) .rvs-t-operator,\nbody:not([data-ds-dark-theme]) .rvs-t-punct { color: #1f1f1f; }\nbody:not([data-ds-dark-theme]) .rvs-t-meta { color: #af00db; }\n\n/**\n * CodeMirror token colors, applied through FIXED class names emitted by the\n * highlight style (`vsc/editor-palette.ts`). Fixed names mean the colors come\n * from this stylesheet — the same one that paints the rest of the UI — so a\n * code file can never go monochrome because a generated class name changed or\n * an injected style failed. Same Dark+ / Light+ palette as the diff panes\n * above, so a file keeps its colors when switching between the two views.\n */\n.rvs-ck-comment { color: #6a9955; }\n.rvs-ck-keyword { color: #569cd6; }\n.rvs-ck-control { color: #c586c0; }\n.rvs-ck-string { color: #ce9178; }\n.rvs-ck-regexp { color: #d16969; }\n.rvs-ck-number { color: #b5cea8; }\n.rvs-ck-constant { color: #569cd6; }\n.rvs-ck-func { color: #dcdcaa; }\n.rvs-ck-type { color: #4ec9b0; }\n.rvs-ck-variable { color: #9cdcfe; }\n.rvs-ck-attr { color: #9cdcfe; }\n.rvs-ck-meta { color: #c586c0; }\n.rvs-ck-punct { color: #d4d4d4; }\n.rvs-ck-op { color: #d4d4d4; }\n.rvs-ck-heading { color: #569cd6; font-weight: 700; }\n.rvs-ck-em { font-style: italic; }\n.rvs-ck-link { color: #9cdcfe; text-decoration: underline; }\n.rvs-ck-strike { text-decoration: line-through; }\n.rvs-ck-invalid { color: #f44747; }\n\nbody:not([data-ds-dark-theme]) .rvs-ck-comment { color: #008000; }\nbody:not([data-ds-dark-theme]) .rvs-ck-keyword { color: #0000ff; }\nbody:not([data-ds-dark-theme]) .rvs-ck-control { color: #af00db; }\nbody:not([data-ds-dark-theme]) .rvs-ck-string { color: #a31515; }\nbody:not([data-ds-dark-theme]) .rvs-ck-regexp { color: #811f3f; }\nbody:not([data-ds-dark-theme]) .rvs-ck-number { color: #098658; }\nbody:not([data-ds-dark-theme]) .rvs-ck-constant { color: #0070c1; }\nbody:not([data-ds-dark-theme]) .rvs-ck-func { color: #795e26; }\nbody:not([data-ds-dark-theme]) .rvs-ck-type { color: #267f99; }\nbody:not([data-ds-dark-theme]) .rvs-ck-variable { color: #001080; }\nbody:not([data-ds-dark-theme]) .rvs-ck-attr { color: #e50000; }\nbody:not([data-ds-dark-theme]) .rvs-ck-meta { color: #0000ff; }\nbody:not([data-ds-dark-theme]) .rvs-ck-punct,\nbody:not([data-ds-dark-theme]) .rvs-ck-op { color: #1f1f1f; }\nbody:not([data-ds-dark-theme]) .rvs-ck-heading { color: #0000ff; }\nbody:not([data-ds-dark-theme]) .rvs-ck-link { color: #001080; }\nbody:not([data-ds-dark-theme]) .rvs-ck-invalid { color: #cd3131; }\n\n/**\n * Opaque editor surface, also as plain CSS: the CodeMirror theme paints it too\n * (following the scheme through a Compartment), but a transparent editor is\n * the one failure a user notices immediately, so the container states it as\n * well.\n */\n.rvs-edge .cm-editor,\n.rvs-edge .cm-scroller,\n.rvs-edge .cm-gutters {\n background-color: var(--rvs-code-bg);\n}\n\n.rvs-edge .cm-editor {\n color: var(--rvs-code-fg);\n}\n\n.rvs-edge .cm-gutters {\n color: var(--rvs-code-gutter-fg, var(--rvs-fg3));\n border-right: 1px solid var(--rvs-border);\n}\n\n.rvs-edge .cm-activeLine {\n background-color: rgba(127, 127, 127, .08);\n}\n\n.rvs-edge .cm-activeLineGutter {\n background-color: rgba(127, 127, 127, .12);\n}\n\n/**\n * The code editor's own scrollbars.\n *\n * These had NO rule at all: CodeMirror's scroller is `.cm-scroller`, which is\n * none of `.rvs-scroll` / `.rvs-diff-grid` / `.rvs-hbar`, so the editor fell\n * back to the browser default — too thin to hit with a mouse.\n *\n * Both notations are needed and must stay in step: Chromium honours\n * `scrollbar-width` over `::-webkit-scrollbar` when both apply, so setting\n * only the webkit half would silently have no effect. Keep the numbers equal.\n */\n.rvs-edge .cm-scroller {\n scrollbar-width: auto;\n}\n\n.rvs-edge .cm-scroller::-webkit-scrollbar {\n width: 14px;\n height: 14px;\n}\n\n.rvs-edge .cm-scroller::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.rvs-edge .cm-scroller::-webkit-scrollbar-thumb {\n /* Opaque, not a translucent token: a thin wash over code is exactly the\n low-contrast target that is hard to grab. */\n background: rgba(121, 121, 121, .8);\n border: 3px solid transparent;\n border-radius: 7px;\n background-clip: padding-box;\n min-height: 36px;\n}\n\n.rvs-edge .cm-scroller::-webkit-scrollbar-thumb:hover {\n background: rgba(150, 150, 150, .95);\n border: 3px solid transparent;\n background-clip: padding-box;\n}\n\n.rvs-edge .cm-scroller::-webkit-scrollbar-corner {\n background: transparent;\n}\n\n/* ------------------------------------------------------------ find widget */\n\n/**\n * \"You landed here\": the transient highlight on the line a jump landed on\n * (search hit, @-reference).\n *\n * Deliberately NOT a warm/amber wash: over the dark editor that muddies into a\n * brown-black band that reads as a shadow and swallows annotation colors. This\n * is the accent blue instead — a tinted band with a bright edge on the left and\n * hairlines top/bottom, so it reads as a marked region while every token keeps\n * its own colour and contrast.\n */\n.rvs-reveal-line {\n background-color: rgba(88, 166, 255, .22);\n box-shadow:\n inset 3px 0 0 0 #58a6ff,\n inset 0 1px 0 0 rgba(88, 166, 255, .38),\n inset 0 -1px 0 0 rgba(88, 166, 255, .38);\n}\n\nbody:not([data-ds-dark-theme]) .rvs-reveal-line {\n background-color: rgba(77, 107, 254, .14);\n box-shadow:\n inset 3px 0 0 0 #4d6bfe,\n inset 0 1px 0 0 rgba(77, 107, 254, .35),\n inset 0 -1px 0 0 rgba(77, 107, 254, .35);\n}\n\n/* --------------------------------------------------------- session changes */\n\n/**\n * 「本会话改了什么」:代码行背景 + 左侧改动栏(Cursor 风格)。\n *\n * 三种形态必须**一眼分得开**,光靠绿/红两个色相不够(色弱用户看新增行和删除行\n * 会糊成同一片),所以每种的左侧色条宽度/花样的语义也不同:\n * - 新增:实心绿条;\n * - 修改:实心蓝条(不是绿:修改块里既有留下的行也有新写的行,用\"中性的已变更\"\n * 色不会误导读者以为整块都是新内容);\n * - 删除:**斜纹**红底 + 更粗的红条 —— 这一行其实已经不存在了,只在中止位置上\n * 留个锚点,斜纹是这一层\"虚\"的信息里最不容易被当成真内容的花样。\n *\n * 选择器带上 `.cm-line`:`.cm-activeLine` 由 CodeMirror 的主题注入(运行时\n * `<style>`,通常排在本文档之后),只写 `.rvs-change-*` 两者同权重时会输给它,\n * 光标所在的那一行改动就会消失。\n */\n.rvs-edge .cm-line.rvs-change-add {\n background-color: rgba(46, 160, 67, .17);\n box-shadow:\n inset 3px 0 0 0 #2ea043,\n inset 0 -1px 0 0 rgba(46, 160, 67, .28);\n}\n\n.rvs-edge .cm-line.rvs-change-mod {\n background-color: rgba(56, 139, 253, .15);\n box-shadow:\n inset 3px 0 0 0 #388bfd,\n inset 0 -1px 0 0 rgba(56, 139, 253, .28);\n}\n\n.rvs-edge .cm-line.rvs-change-del {\n background-color: rgba(248, 81, 73, .09);\n background-image: repeating-linear-gradient(135deg, rgba(248, 81, 73, .17) 0 6px, transparent 6px 12px);\n box-shadow: inset 4px 0 0 0 #f85149;\n}\n\n/* 改动栏本身:符号 + 一列与行背景同色的窄条,读起来才是一条\"改动边\"。 */\n.rvs-edge .cm-gutterElement.rvs-change-gutter-add {\n box-shadow: inset 2px 0 0 0 #2ea043;\n}\n\n.rvs-edge .cm-gutterElement.rvs-change-gutter-mod {\n box-shadow: inset 2px 0 0 0 #388bfd;\n}\n\n.rvs-edge .cm-gutterElement.rvs-change-gutter-del {\n box-shadow: inset 2px 0 0 0 #f85149;\n}\n\n.rvs-edge .rvs-change-mark {\n display: inline-block;\n width: 12px;\n font-family: var(--rvs-mono);\n font-size: 12px;\n line-height: 1;\n text-align: center;\n user-select: none;\n}\n\n.rvs-edge .rvs-change-mark-add { color: #2ea043; }\n.rvs-edge .rvs-change-mark-mod { color: #388bfd; }\n.rvs-edge .rvs-change-mark-del { color: #f85149; }\n\n/**\n * 行内(字符级)差异:上面那三种底色回答\"哪几行变了\",这两条回答\"那一行的哪几个\n * 字变了\"。只改一个词的编辑,整行同色时完全看不出改了什么。\n *\n * `rvs-change-word-add` 刻意**只给背景、不给 `color`**:代码有自己的语法着色,\n * 覆盖前景色会把关键字/字符串/注释染成同一种颜色,比不标还难读。透明度压在行\n * 底色之上一点点,叠起来仍读得出\"整块改动\"的边界,又能看出块内哪几个字是新的。\n */\n.rvs-edge .rvs-change-word-add {\n background-color: rgba(46, 160, 67, .22);\n border-radius: 2px;\n}\n\n/**\n * 被删掉、在新文件里已经不存在的内容:零宽 widget,红底 + 删除线。\n *\n * 删除线画在 chip 自己身上(chip 是独立元素,不会波及周围代码);`white-space:\n * pre` 保留被删文本自己的缩进 —— 截断/去空白都会让 chip 谎报\"删了什么\"。\n * 字号略小 + 降一点不透明度,是让它读起来像\"残留物\"而不是一行真代码。\n */\n.rvs-edge .rvs-change-word-del {\n padding: 0 3px;\n margin: 0 1px;\n border-radius: 3px;\n background-color: rgba(248, 81, 73, .18);\n font-size: .92em;\n text-decoration: line-through;\n opacity: .85;\n white-space: pre;\n}\n\n/**\n * 撑宽度的隐形符号:只用它占位,绝不显示(见 `change-marks.ts` 的 SpacerMarker,\n * CodeMirror 会给这个 spacer 元素加 `visibility: hidden`,这里不重复声明)。\n */\n.rvs-edge .rvs-change-spacer {\n opacity: 0;\n}\n\n/* 浅色主题:同样的色相,压暗 + 提高不透明度,在近白底上才看得清。 */\nbody:not([data-ds-dark-theme]) .rvs-edge .cm-line.rvs-change-add {\n background-color: rgba(31, 136, 61, .13);\n box-shadow:\n inset 3px 0 0 0 #1f883d,\n inset 0 -1px 0 0 rgba(31, 136, 61, .22);\n}\n\nbody:not([data-ds-dark-theme]) .rvs-edge .cm-line.rvs-change-mod {\n background-color: rgba(9, 105, 218, .12);\n box-shadow:\n inset 3px 0 0 0 #0969da,\n inset 0 -1px 0 0 rgba(9, 105, 218, .22);\n}\n\nbody:not([data-ds-dark-theme]) .rvs-edge .cm-line.rvs-change-del {\n background-color: rgba(207, 34, 46, .07);\n background-image: repeating-linear-gradient(135deg, rgba(207, 34, 46, .14) 0 6px, transparent 6px 12px);\n box-shadow: inset 4px 0 0 0 #cf222e;\n}\n\nbody:not([data-ds-dark-theme]) .rvs-edge .cm-gutterElement.rvs-change-gutter-add {\n box-shadow: inset 2px 0 0 0 #1f883d;\n}\n\nbody:not([data-ds-dark-theme]) .rvs-edge .cm-gutterElement.rvs-change-gutter-mod {\n box-shadow: inset 2px 0 0 0 #0969da;\n}\n\nbody:not([data-ds-dark-theme]) .rvs-edge .cm-gutterElement.rvs-change-gutter-del {\n box-shadow: inset 2px 0 0 0 #cf222e;\n}\n\nbody:not([data-ds-dark-theme]) .rvs-edge .rvs-change-mark-add { color: #1f883d; }\nbody:not([data-ds-dark-theme]) .rvs-edge .rvs-change-mark-mod { color: #0969da; }\nbody:not([data-ds-dark-theme]) .rvs-edge .rvs-change-mark-del { color: #cf222e; }\n\n/* 浅色主题的行内差异:同样的色相压暗,在近白底上才看得清(暗色那套会糊成一片)。 */\nbody:not([data-ds-dark-theme]) .rvs-edge .rvs-change-word-add {\n background-color: rgba(26, 127, 55, .18);\n}\n\nbody:not([data-ds-dark-theme]) .rvs-edge .rvs-change-word-del {\n background-color: rgba(207, 34, 46, .14);\n}\n\n/**\n * 整块删除:一枚带行数的胶囊,不是一行划掉的文字。\n *\n * 多行删除的原文是一个段落,划线堆在锚点行首只会糊成一片(数据层因此把 `count > 1`\n * 的 chip 压成一枚,见 `change-marks.ts` 的 `RemovedChipWidget`)。这里只做外形:\n * 去掉继承来的删除线(胶囊不是\"被划掉的字符串\"),字号与计数对齐,别把行高撑开。\n */\n.rvs-edge .rvs-change-block-del {\n padding: 0 4px;\n margin: 0 1px;\n border-radius: 3px;\n background-color: rgba(248, 81, 73, .18);\n font-size: 11px;\n font-variant-numeric: tabular-nums;\n text-decoration: none;\n opacity: 1;\n white-space: nowrap;\n}\n\nbody:not([data-ds-dark-theme]) .rvs-edge .rvs-change-block-del {\n background-color: rgba(207, 34, 46, .14);\n}\n\n/**\n * 改动跳转按钮:浮在编辑器右上角。\n *\n * 放在编辑器上而不是面板里 —— 文件打开后光标就在这里,而面板可能被收起、被滚走。\n * 容器 `.rvs-body` 已经是 `position: relative`(它本来用于挂 find 浮层),所以这里\n * 只做绝对定位,不引入新的定位上下文。`pointer-events` 只开在按钮上:这块区域压在\n * 编辑器文字上方,整块可点会把右上角那几行变成死区。\n */\n.rvs-change-nav {\n position: absolute;\n top: 8px;\n right: 14px;\n z-index: 5;\n display: flex;\n align-items: center;\n gap: 2px;\n padding: 3px 4px;\n border: 1px solid var(--rvs-border2);\n border-radius: 8px;\n background: Canvas;\n box-shadow: 0 2px 8px rgba(0, 0, 0, .28);\n pointer-events: none;\n}\n\n/* The counter is what makes this read as \"3 of 7 changes\" rather than two\n anonymous arrows — and it keeps the buttons from looking like decoration. */\n.rvs-change-nav-count {\n padding: 0 6px 0 4px;\n color: var(--rvs-fg2);\n font-size: 11px;\n font-variant-numeric: tabular-nums;\n line-height: 22px;\n white-space: nowrap;\n}\n\n.rvs-change-nav-btn {\n width: 26px;\n height: 22px;\n padding: 0;\n border: 1px solid transparent;\n border-radius: 5px;\n background: transparent;\n color: var(--rvs-fg);\n font-size: 13px;\n font-weight: 600;\n line-height: 20px;\n text-align: center;\n cursor: pointer;\n pointer-events: auto;\n}\n\n.rvs-change-nav-btn:hover {\n border-color: var(--rvs-border2);\n background: var(--rvs-hover);\n color: var(--rvs-brand);\n}\n\n.rvs-change-nav-btn:active { background: var(--rvs-active); }\n\n/**\n * 悬浮在改动行上出现的「撤销这处改动」按钮。\n *\n * 它**不在编辑器的 DOM 里**:`undo-affordance.ts` 把它当 `position: fixed` 的元素挂到\n * `document.body`(和「添加到对话」那个浮层同一套做法),所以这里的选择器不带\n * `.rvs-edge` —— 带上了就一条都不生效。固定定位 + 高 z-index 是刻意的:宿主容器有\n * `overflow: hidden`,挂在里面会被 CodeMirror 的滚动层裁掉。\n *\n * 颜色按\"危险动作\"给:默认红边红字、悬停实心红。底色不透明(不用半透明的 overlay\n * token),否则后面的代码文字会透出来。\n */\n.rvs-undo-affordance {\n position: fixed;\n z-index: 2100;\n display: inline-flex;\n align-items: center;\n gap: 4px;\n max-width: 220px;\n padding: 3px 9px;\n border: 1px solid #f85149;\n border-radius: 6px;\n background-color: #1e2229;\n color: #ffb4ae;\n /* 按钮挂在 body 上,没有 .rvs-edge 的字体上下文:跟随宿主页面字体。 */\n font-family: inherit;\n font-size: 12px;\n line-height: 1.5;\n white-space: nowrap;\n cursor: pointer;\n box-shadow: 0 6px 18px rgba(0, 0, 0, .45);\n /* 纵向以悬停行的中线对齐(横向坐标由 JS 按行尾算好)。 */\n transform: translateY(-50%);\n}\n\n.rvs-undo-affordance:hover {\n background-color: #f85149;\n border-color: #f85149;\n color: #fff;\n}\n\n.rvs-undo-affordance:active {\n transform: translateY(-50%) scale(.97);\n}\n\n.rvs-undo-affordance:focus-visible {\n outline: 2px solid #58a6ff;\n outline-offset: 1px;\n}\n\n/* 删除锚点:这一行其实已经不在了,虚线边框把它和\"真实存在的行\"分开。 */\n.rvs-undo-affordance[data-kind=\"del\"] {\n border-style: dashed;\n}\n\nbody:not([data-ds-dark-theme]) .rvs-undo-affordance {\n border-color: #cf222e;\n background-color: #ffffff;\n color: #a40e26;\n box-shadow: 0 6px 18px rgba(31, 35, 40, .18);\n}\n\nbody:not([data-ds-dark-theme]) .rvs-undo-affordance:hover {\n background-color: #cf222e;\n border-color: #cf222e;\n color: #fff;\n}\n\nbody:not([data-ds-dark-theme]) .rvs-undo-affordance:focus-visible {\n outline-color: #4d6bfe;\n}\n\n/**\n * CodeMirror's own search decorations, also stated here: the editor's theme is\n * injected by the library, and these must stay readable even when only this\n * stylesheet is in play.\n */\n.rvs-edge .cm-searchMatch {\n background-color: rgba(226, 183, 20, .30);\n outline: 1px solid rgba(226, 183, 20, .55);\n}\n\n.rvs-edge .cm-searchMatch-selected {\n background-color: rgba(226, 183, 20, .48);\n}\n\n.rvs-edge .cm-selectionBackground,\n.rvs-edge .cm-content ::selection {\n background-color: rgba(58, 110, 165, .55) !important;\n}\n\n/** Build stamp in the editor info bar: identifies the loaded client bundle. */\n.rvs-build {\n flex: none;\n padding: 0 5px;\n border: 1px solid var(--rvs-border);\n border-radius: 4px;\n color: var(--rvs-fg3);\n font-size: 10px;\n font-family: var(--rvs-mono);\n opacity: .85;\n user-select: text;\n}\n\n.rvs-find {\n position: absolute;\n top: 6px;\n right: 18px;\n z-index: 30;\n display: flex;\n align-items: center;\n gap: 3px;\n padding: 3px 4px 3px 7px;\n border: 1px solid var(--rvs-border2);\n border-radius: 8px;\n background-color: Canvas;\n background-image: linear-gradient(var(--dsw-alias-bg-overlay, transparent), var(--dsw-alias-bg-overlay, transparent));\n color: var(--rvs-fg);\n box-shadow: 0 4px 14px rgba(0, 0, 0, .28);\n font-size: 12px;\n}\n\n.rvs-find-input {\n width: 170px;\n padding: 2px 6px;\n border: 1px solid var(--rvs-border2);\n border-radius: 5px;\n background: var(--rvs-input);\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12px;\n outline: none;\n}\n\n.rvs-find-input:focus {\n border-color: var(--rvs-brand);\n}\n\n.rvs-find-count {\n flex: none;\n min-width: 54px;\n text-align: center;\n color: var(--rvs-fg3);\n font-size: 11px;\n white-space: nowrap;\n}\n\n.rvs-find-count.none {\n color: var(--rvs-git-d);\n}\n\n.rvs-code {\n flex: 1;\n min-height: 0;\n overflow: auto;\n margin: 0;\n padding: 6px 0 16px;\n font-family: var(--rvs-mono);\n font-size: 12.5px;\n line-height: 18px;\n white-space: pre;\n scrollbar-width: thin;\n background: var(--rvs-code-bg);\n color: var(--rvs-code-fg);\n}\n\n.rvs-code-line {\n display: flex;\n align-items: flex-start;\n min-width: max-content;\n}\n\n.rvs-code-line:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-code-text {\n flex: 1;\n padding-right: 10px;\n white-space: pre-wrap;\n word-break: break-word;\n user-select: text;\n}\n\n/* ---------------------------------------------------------- history list */\n\n.rvs-commit-item {\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n padding: 4px 8px 4px 4px;\n border: none;\n background: transparent;\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12.5px;\n line-height: 18px;\n text-align: left;\n cursor: pointer;\n}\n\n.rvs-commit-item:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-commit-item.selected {\n background: var(--rvs-active);\n}\n\n.rvs-graph-svg {\n flex: none;\n display: block;\n}\n\n.rvs-commit-hash {\n flex: none;\n font-family: var(--rvs-mono);\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n.rvs-commit-msg {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-commit-date {\n flex: none;\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n.rvs-ref-badge {\n flex: none;\n padding: 0 5px;\n border-radius: 8px;\n border: 1px solid var(--rvs-border2);\n font-size: 10px;\n line-height: 15px;\n color: var(--rvs-fg2);\n}\n\n.rvs-ref-badge.head {\n border-color: var(--rvs-brand);\n background: rgba(77, 107, 254, .2);\n color: var(--rvs-fg);\n}\n\n.rvs-ref-badge.tag {\n border-color: rgba(226, 183, 20, .55);\n background: rgba(226, 183, 20, .16);\n color: var(--rvs-git-m);\n}\n\n.rvs-detail {\n margin: 0 6px 8px;\n padding: 8px 10px;\n border: 1px solid var(--rvs-border2);\n border-left: 3px solid var(--rvs-accent);\n border-radius: 8px;\n background: var(--rvs-layer3);\n font-size: 12px;\n}\n\n.rvs-detail-meta {\n color: var(--rvs-fg3);\n font-size: 11px;\n margin-bottom: 6px;\n white-space: pre-wrap;\n}\n\n.rvs-file-row {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 2px 4px;\n border-radius: 5px;\n cursor: pointer;\n}\n\n.rvs-file-row:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-file-path {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n /* Same tail-first truncation as the info bar; `plaintext` keeps the path's\n own LTR order (see .rvs-einfo-path). */\n direction: rtl;\n unicode-bidi: plaintext;\n text-align: left;\n}\n\n.rvs-file-status {\n flex: none;\n width: 16px;\n text-align: center;\n font-weight: 700;\n font-size: 11px;\n}\n\n/* ------------------------------------------------------- commit pane */\n\n/**\n * The history panel's bottom half: the graph keeps the top, the selected\n * commit takes this pane below the drag handle (same gesture and styling as\n * the editor split, so `.rvs-vsplit-handle` is reused rather than copied).\n */\n.rvs-history-body {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n}\n\n.rvs-hpane {\n flex: none;\n min-height: 140px;\n max-height: 82%;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n border-top: 1px solid var(--rvs-border);\n /* Same glass as the graph above (the sidebar's own backdrop shows through):\n an opaque `.rvs-code-bg` here read as a separate dark slab glued under the\n list. Patch rows already carry their own translucent add/del washes, so the\n diff stays legible without a filled background. */\n background: transparent;\n}\n\n/* Full-height mode: the graph is hidden by the panel, so the pane takes the\n remaining column instead of its persisted pixel height. */\n.rvs-hpane.expanded {\n flex: 1;\n max-height: none;\n}\n\n/* A toolbar toggle that is currently ON (wrap, for example). */\n.rvs-hbtn.active {\n color: var(--rvs-brand);\n}\n\n.rvs-hpane-body {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n}\n\n/* Tab strip: same underline idiom as the editor's diff/worktree switch, but\n scoped so the pane's three views cannot be confused with editor tabs. */\n.rvs-htabs {\n flex: none;\n display: flex;\n align-items: center;\n gap: 2px;\n height: 30px;\n padding: 0 6px;\n border-bottom: 1px solid var(--rvs-border);\n}\n\n/* The tabs themselves live in their own role=tablist element: the strip also\n carries the hash, expand and close buttons, and those must NOT inherit the\n tablist's arrow-key handling (ArrowRight on \"close\" used to switch tabs). */\n.rvs-hpane-tablist {\n flex: none;\n display: flex;\n align-items: center;\n gap: 2px;\n}\n\n.rvs-htab {\n appearance: none;\n border: none;\n border-bottom: 2px solid transparent;\n background: transparent;\n color: var(--rvs-fg3);\n font: inherit;\n font-size: 12px;\n padding: 5px 8px 4px;\n cursor: pointer;\n}\n\n.rvs-htab:hover {\n color: var(--rvs-fg);\n}\n\n.rvs-htab.active {\n color: var(--rvs-fg);\n border-bottom-color: var(--rvs-brand);\n}\n\n.rvs-htabs-spacer {\n flex: 1;\n min-width: 0;\n}\n\n.rvs-hhash-mini {\n flex: none;\n margin-right: 2px;\n font-family: var(--rvs-mono);\n font-size: 10.5px;\n color: var(--rvs-fg3);\n}\n\n/**\n * Every tab body stays mounted (the patch's scroll position and parse survive\n * a look at 提交详情) and is hidden with the `hidden` attribute. The class\n * declares `flex`, which outranks the UA `[hidden]` rule, so hiding needs an\n * explicit rule of its own.\n */\n.rvs-hbody {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 10px 12px 14px;\n}\n\n.rvs-hbody[hidden] {\n display: none;\n}\n\n/* -- 提交详情 -- */\n\n.rvs-hsubject {\n font-size: 13px;\n font-weight: 600;\n line-height: 1.45;\n margin-bottom: 8px;\n white-space: pre-wrap;\n word-break: break-word;\n user-select: text;\n}\n\n.rvs-hmeta {\n display: flex;\n align-items: center;\n gap: 6px;\n min-height: 21px;\n font-size: 11.5px;\n color: var(--rvs-fg3);\n}\n\n.rvs-hmeta-icon {\n flex: none;\n display: flex;\n width: 13px;\n align-items: center;\n color: var(--rvs-fg3);\n}\n\n.rvs-hmeta-value {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-hmeta-label {\n flex: none;\n}\n\n.rvs-hhash {\n font-family: var(--rvs-mono);\n font-size: 11px;\n line-height: 16px;\n padding: 0 5px;\n border: 1px solid var(--rvs-border);\n border-radius: 4px;\n background: var(--rvs-input);\n color: var(--rvs-fg2);\n user-select: all;\n}\n\n.rvs-hparent {\n font-family: var(--rvs-mono);\n font-size: 11px;\n line-height: 16px;\n padding: 0 4px;\n border: 1px solid var(--rvs-border2);\n border-radius: 4px;\n color: var(--rvs-fg2);\n}\n\n.rvs-hdash {\n color: var(--rvs-fg3);\n}\n\n.rvs-hrefs {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n margin-top: 6px;\n}\n\n.rvs-hmsg {\n margin-top: 10px;\n padding-top: 8px;\n border-top: 1px dashed var(--rvs-border);\n font-size: 12px;\n line-height: 1.55;\n color: var(--rvs-fg2);\n white-space: pre-wrap;\n word-break: break-word;\n user-select: text;\n}\n\n.rvs-hfooter {\n display: flex;\n gap: 6px;\n margin-top: 14px;\n}\n\n/* -- 内容 -- */\n\n.rvs-hhint {\n margin-bottom: 6px;\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n/* One line: how many files, and the path filter that makes a 60-file commit\n narrowable without scrolling. */\n.rvs-hcontent-head {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-bottom: 6px;\n}\n\n.rvs-hcount {\n flex: none;\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n.rvs-hfilter {\n flex: 1;\n min-width: 0;\n}\n\n.rvs-hfiles {\n display: flex;\n flex-direction: column;\n gap: 1px;\n}\n\n/* Directory row of the 内容 tree: chevron + folder glyph + path + count. */\n.rvs-hfolder {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 2px 4px;\n border-radius: 4px;\n color: var(--rvs-fg2);\n font-size: 12px;\n cursor: pointer;\n user-select: none;\n}\n\n.rvs-hfolder:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-hfolder-name {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-family: var(--rvs-mono);\n font-size: 11.5px;\n}\n\n.rvs-hfolder-count {\n flex: none;\n font-size: 10.5px;\n color: var(--rvs-fg3);\n}\n\n/* Files under a folder keep the editor tree's indent idiom. */\n.rvs-file-row.indent {\n padding-left: 18px;\n}\n\n.rvs-file-row.active {\n background: var(--rvs-active);\n}\n\n/* The row's quick \"open in editor\" affordance: invisible until the row is\n hovered/focused, so the path keeps the whole width at rest. */\n.rvs-file-open {\n opacity: 0;\n}\n\n.rvs-file-row:hover .rvs-file-open,\n.rvs-file-row:focus-within .rvs-file-open,\n.rvs-file-row:focus .rvs-file-open {\n opacity: 1;\n}\n\n/* Keyboard focus must be visible on the pane's role=button rows (a bare\n browser default is nearly invisible on this dark chrome). */\n.rvs-file-row:focus-visible,\n.rvs-hfolder:focus-visible,\n.rvs-commit-item:focus-visible,\n.rvs-patch-chevron:focus-visible,\n.rvs-vsplit-handle:focus-visible {\n outline: 2px solid var(--rvs-brand);\n outline-offset: -2px;\n}\n\n/* -- 差异 -- */\n\n/**\n * The diff tab is a column: a PINNED tool row, then the one scroller. The\n * reference pane made the whole tab a scroll area, so the file you were in and\n * the controls both disappeared on a long patch.\n */\n.rvs-hdiff {\n display: flex;\n flex-direction: column;\n padding: 0;\n overflow: hidden;\n}\n\n.rvs-hdiff[hidden] {\n display: none;\n}\n\n.rvs-ptoolbar {\n flex: none;\n display: flex;\n align-items: center;\n gap: 3px;\n height: 30px;\n padding: 0 6px;\n border-bottom: 1px solid var(--rvs-border);\n background: var(--rvs-layer3);\n}\n\n.rvs-pfile-index {\n flex: none;\n min-width: 32px;\n font-family: var(--rvs-mono);\n font-size: 10.5px;\n color: var(--rvs-fg3);\n}\n\n.rvs-pfile-name {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 11.5px;\n color: var(--rvs-fg2);\n}\n\n.rvs-pscroll {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 10px 12px 14px;\n}\n\n.rvs-patch-file {\n margin-bottom: 10px;\n border: 1px solid var(--rvs-border);\n border-radius: 6px;\n}\n\n.rvs-patch-file.folded .rvs-patch-head {\n border-bottom: none;\n border-radius: 6px;\n}\n\n.rvs-patch-file.active {\n border-color: var(--rvs-brand);\n}\n\n/* Sticky per-file header: scrolling a 3000-line hunk keeps saying which file\n it belongs to. `position: sticky` needs the nearest scrollport, which is\n `.rvs-pscroll` — no `overflow` on the section itself. */\n.rvs-patch-head {\n position: sticky;\n top: 0;\n z-index: 1;\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 3px 6px;\n border-bottom: 1px solid var(--rvs-border);\n border-radius: 6px 6px 0 0;\n background: var(--rvs-layer3);\n cursor: pointer;\n}\n\n.rvs-patch-head:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-patch-chevron {\n flex: none;\n display: flex;\n align-items: center;\n color: var(--rvs-fg3);\n cursor: pointer;\n transform: rotate(0deg);\n}\n\n.rvs-patch-chevron.open {\n transform: rotate(90deg);\n}\n\n.rvs-patch-path {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n}\n\n.rvs-patch-letter {\n flex: none;\n font-size: 11px;\n font-weight: 700;\n}\n\n.rvs-patch-counts {\n flex: none;\n display: flex;\n gap: 5px;\n font-family: var(--rvs-mono);\n font-size: 10.5px;\n}\n\n.rvs-patch-add-count {\n color: var(--rvs-git-a);\n}\n\n.rvs-patch-del-count {\n color: var(--rvs-git-d);\n}\n\n.rvs-patch-rows {\n padding: 2px 0 6px;\n font-family: var(--rvs-mono);\n font-size: 11.5px;\n line-height: 17px;\n}\n\n.rvs-patch-row {\n display: flex;\n align-items: stretch;\n min-width: max-content;\n white-space: pre;\n}\n\n/* Wrap mode: the row gives up its horizontal runway and the text wraps under\n the gutter instead (the whole point on a narrow sidebar). */\n.rvs-patch-rows.wrap .rvs-patch-row {\n min-width: 0;\n white-space: pre-wrap;\n word-break: break-word;\n}\n\n.rvs-patch-rows.wrap .rvs-patch-text {\n white-space: pre-wrap;\n word-break: break-word;\n}\n\n/* A block whose raw patch text could not be paired with the parsed model\n (defensive: block count and model count disagreed) is dimmed instead of\n silently looking complete. */\n.rvs-patch-rows.partial {\n opacity: .62;\n}\n\n/* Truncation marker in the pinned toolbar: the cut point can be thousands of\n rows away, so the bottom note is not where a reader learns about it. */\n.rvs-ptruncated {\n flex: none;\n font-size: 12px;\n color: var(--rvs-git-m);\n}\n\n.rvs-patch-row.add {\n background: var(--rvs-add-bg);\n}\n\n.rvs-patch-row.del {\n background: var(--rvs-del-bg);\n}\n\n.rvs-patch-num {\n flex: none;\n width: 42px;\n padding-right: 6px;\n text-align: right;\n color: var(--rvs-fg3);\n user-select: none;\n}\n\n.rvs-patch-sign {\n flex: none;\n width: 14px;\n text-align: center;\n color: var(--rvs-fg3);\n user-select: none;\n}\n\n.rvs-patch-text {\n flex: 1;\n padding-right: 12px;\n user-select: text;\n}\n\n/* One \"the hunk jumped ahead\" marker, so a patch never pretends its line\n numbers are contiguous. */\n.rvs-patch-skip {\n margin: 2px 0;\n border-top: 1px dashed var(--rvs-border);\n border-bottom: 1px dashed var(--rvs-border);\n color: var(--rvs-fg3);\n font-size: 11px;\n text-align: center;\n user-select: none;\n}\n\n.rvs-patch-note {\n padding: 6px 8px;\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n/* ---------------------------------------------------- floating editor window */\n\n/**\n * The floating editor lives in the host's frame-wide overlay layer\n * (`position: absolute; inset: 0; z-index: 20`, click-through, children opt\n * back into pointer events). It is placed with viewport coordinates, so it\n * floats above every column without joining any of their stacking contexts.\n *\n * `.rvs-root` carries the whole design-system token set and is row-flex by\n * default; this frame overrides the direction to a column and takes its size\n * from the inline rect the component keeps.\n */\n.rvs-float-window {\n position: fixed;\n flex-direction: column;\n /* The rect maths (clamp/persist) is in border-box terms; without this the\n painted border would sit one pixel outside the computed rectangle. */\n box-sizing: border-box;\n min-width: 360px;\n min-height: 220px;\n overflow: hidden;\n border: 1px solid var(--rvs-border2);\n border-radius: 10px;\n background: var(--rvs-code-bg);\n color: var(--rvs-code-fg);\n box-shadow: 0 18px 60px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .28);\n z-index: 30;\n /* The overlay layer itself is click-through; the window opts back in even if\n the host wraps each overlay entry in its own element. */\n pointer-events: auto;\n}\n\n/* Minimized: the frame IS the ball (see `.rvs-float-mini`); the body stays\n mounted but hidden, and it must not impose a minimum height. */\n.rvs-float-window[data-rvs-float=\"collapsed\"] {\n min-height: 0;\n}\n\n/**\n * Minimized window = floating ball.\n *\n * A full-width 34px bar was too long: it read as a broken window and covered a\n * whole strip. The ball is a small circle at the window's own corner, draggable\n * anywhere, restored by a click (or Enter/Space). It keeps the dirty dot, so\n * \"the editor is out and has unsaved edits\" is still one glance away.\n */\n.rvs-float-window.rvs-float-mini {\n min-width: 0;\n min-height: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n cursor: move;\n touch-action: none;\n}\n\n.rvs-float-ball {\n flex: 1;\n /* Stretch to the circle: the frame is a COLUMN flex box with centred items,\n so without this the hit area (and the absolutely positioned dot) would be\n sized by the 16px glyph instead of the 44px ball. */\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n border-radius: 50%;\n color: var(--rvs-brand);\n font-size: 16px;\n line-height: 1;\n cursor: move;\n outline: none;\n}\n\n.rvs-float-ball:hover,\n.rvs-float-ball:focus-visible {\n background: var(--rvs-hover);\n}\n\n.rvs-float-ball-glyph {\n pointer-events: none;\n}\n\n/* Unsaved edits stay visible while minimized. */\n.rvs-float-ball-dot {\n position: absolute;\n top: 8px;\n right: 8px;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: var(--rvs-git-m);\n box-shadow: 0 0 0 2px var(--rvs-code-bg);\n pointer-events: none;\n}\n\n/* While a drag/resize gesture runs the pointer must not select editor text. */\n.rvs-float-window.dragging {\n user-select: none;\n}\n\n.rvs-float-titlebar {\n flex: none;\n display: flex;\n align-items: center;\n gap: 7px;\n height: 34px;\n padding: 0 6px 0 10px;\n border-bottom: 1px solid var(--rvs-border);\n background: var(--rvs-layer3);\n cursor: move;\n user-select: none;\n touch-action: none;\n}\n\n.rvs-float-glyph {\n color: var(--rvs-brand);\n font-size: 11px;\n}\n\n.rvs-float-title {\n flex: none;\n font-size: 12px;\n font-weight: 600;\n color: var(--rvs-fg2);\n}\n\n.rvs-float-file {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 11.5px;\n color: var(--rvs-fg3);\n direction: rtl;\n unicode-bidi: plaintext;\n text-align: left;\n}\n\n.rvs-float-spacer {\n flex: 1;\n}\n\n.rvs-float-btn {\n flex: none;\n width: 22px;\n height: 22px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: none;\n border-radius: 5px;\n background: transparent;\n color: var(--rvs-fg3);\n font: inherit;\n font-size: 12px;\n line-height: 1;\n cursor: pointer;\n}\n\n.rvs-float-btn:hover {\n background: var(--rvs-hover);\n color: var(--rvs-fg);\n}\n\n.rvs-float-close:hover {\n background: rgba(241, 76, 76, .18);\n color: var(--rvs-danger);\n}\n\n.rvs-float-body {\n flex: 1 1 0;\n min-height: 0;\n min-width: 0;\n display: flex;\n overflow: hidden;\n background: var(--rvs-code-bg);\n}\n\n/* Keep the height chain pinned: the editor pane grows inside this box. */\n.rvs-float-body > .rvs-pane {\n flex: 1 1 0;\n min-height: 0;\n min-width: 0;\n}\n\n/* Eight grips, placed INSIDE the border box: the window clips overflow (rounded\n corners), so grips hanging outside would lose half their hit area. Corners\n are larger so they can actually be hit. */\n.rvs-float-resize {\n position: absolute;\n z-index: 3;\n}\n\n.rvs-float-resize-n { top: 0; left: 10px; right: 10px; height: 6px; cursor: ns-resize; }\n.rvs-float-resize-s { bottom: 0; left: 10px; right: 10px; height: 6px; cursor: ns-resize; }\n.rvs-float-resize-e { top: 10px; bottom: 10px; right: 0; width: 6px; cursor: ew-resize; }\n.rvs-float-resize-w { top: 10px; bottom: 10px; left: 0; width: 6px; cursor: ew-resize; }\n.rvs-float-resize-ne { top: 0; right: 0; width: 12px; height: 12px; cursor: nesw-resize; }\n.rvs-float-resize-nw { top: 0; left: 0; width: 12px; height: 12px; cursor: nwse-resize; }\n.rvs-float-resize-se { bottom: 0; right: 0; width: 12px; height: 12px; cursor: nwse-resize; }\n.rvs-float-resize-sw { bottom: 0; left: 0; width: 12px; height: 12px; cursor: nesw-resize; }\n\n/* Shown by whichever surface the single editor left behind (centre tab or the\n sidebar's editor panel). */\n.rvs-float-placeholder {\n flex: 1;\n min-height: 0;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 10px;\n padding: 24px;\n text-align: center;\n color: var(--rvs-fg3);\n font-size: 12.5px;\n}\n\n.rvs-float-placeholder-title {\n color: var(--rvs-fg2);\n font-size: 13px;\n font-weight: 600;\n}\n\n.rvs-float-placeholder-text {\n max-width: 360px;\n line-height: 1.6;\n}\n\n/* --------------------------------------------------------- context menu */\n\n.rvs-portal {\n font-family: inherit;\n}\n\n/**\n * Floating surfaces (menu / modal / toast) paint an OPAQUE base first and then\n * lay the skin's overlay token on top. The token is frequently translucent, so\n * using it alone let the panel's own text bleed through the menu and overlap\n * the entries; `Canvas` follows the resolved light/dark scheme, so the base is\n * correct in either theme.\n */\n.rvs-menu,\n.rvs-modal-box,\n.rvs-toast {\n background-color: Canvas;\n background-image: linear-gradient(var(--dsw-alias-bg-overlay, transparent), var(--dsw-alias-bg-overlay, transparent));\n color: var(--rvs-fg);\n}\n\n.rvs-menu {\n position: fixed;\n z-index: 1000;\n min-width: 172px;\n max-height: calc(100vh - 16px);\n overflow-y: auto;\n padding: 4px;\n border: 1px solid var(--rvs-border2);\n border-radius: 8px;\n box-shadow: 0 6px 20px rgba(0, 0, 0, .35);\n font-size: 12.5px;\n line-height: 18px;\n}\n\n.rvs-menu-sep {\n height: 1px;\n margin: 4px 6px;\n background: var(--rvs-border);\n}\n\n.rvs-menu-item {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n padding: 5px 10px;\n border: none;\n border-radius: 6px;\n background: transparent;\n color: inherit;\n font: inherit;\n text-align: left;\n cursor: pointer;\n}\n\n.rvs-menu-item:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-menu-item.danger {\n color: var(--vsc-danger, #f14c4c);\n}\n\n.rvs-menu-item.danger:hover {\n background: rgba(241, 76, 76, .16);\n}\n\n.rvs-menu-item:disabled {\n opacity: .45;\n cursor: default;\n}\n\n.rvs-menu-item:disabled:hover {\n background: transparent;\n}\n\n.rvs-menu-hint {\n margin-left: auto;\n font-size: 11px;\n opacity: .6;\n}\n\n/* ------------------------------------------------------- modal + toast */\n\n.rvs-modal-mask {\n position: fixed;\n inset: 0;\n z-index: 100000;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(0, 0, 0, .45);\n backdrop-filter: blur(2px);\n animation: rvsFade .12s ease;\n}\n\n.rvs-modal-box {\n width: min(420px, calc(100vw - 40px));\n padding: 16px 18px;\n border: 1px solid var(--rvs-border2);\n border-radius: 10px;\n color: var(--rvs-fg);\n box-shadow: 0 12px 40px rgba(0, 0, 0, .38);\n font-size: 13px;\n animation: rvsPop .14s ease;\n}\n\n.rvs-modal-title {\n margin-bottom: 8px;\n font-size: 14px;\n font-weight: 600;\n}\n\n.rvs-modal-text {\n margin-bottom: 12px;\n color: var(--rvs-fg2);\n font-size: 12.5px;\n line-height: 1.6;\n word-break: break-word;\n white-space: pre-wrap;\n}\n\n.rvs-modal-row {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n margin-top: 14px;\n}\n\n.rvs-modal-btn {\n padding: 5px 14px;\n border: 1px solid var(--rvs-border2);\n border-radius: 7px;\n background: transparent;\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12.5px;\n cursor: pointer;\n}\n\n.rvs-modal-btn:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-modal-btn.primary {\n border-color: transparent;\n background: var(--rvs-accent);\n color: #fff;\n}\n\n.rvs-modal-btn.danger {\n border-color: transparent;\n background: var(--rvs-danger);\n color: #fff;\n}\n\n.rvs-toasts {\n position: fixed;\n right: 16px;\n bottom: 18px;\n z-index: 100001;\n display: flex;\n flex-direction: column;\n gap: 8px;\n align-items: flex-end;\n pointer-events: none;\n}\n\n.rvs-toast {\n max-width: 340px;\n padding: 7px 12px;\n border: 1px solid var(--rvs-border2);\n border-radius: 8px;\n color: var(--rvs-fg);\n box-shadow: 0 6px 20px rgba(0, 0, 0, .35);\n font-size: 12.5px;\n line-height: 1.5;\n word-break: break-word;\n white-space: pre-wrap;\n animation: rvsPop .14s ease;\n}\n\n.rvs-toast.error {\n border-color: rgba(241, 76, 76, .6);\n background-image: linear-gradient(rgba(58, 31, 34, .92), rgba(58, 31, 34, .92));\n}\n\n/* ------------------------------------------------------------- terminal */\n\n.rvs-term-tabs {\n flex: none;\n display: flex;\n align-items: stretch;\n gap: 2px;\n height: 32px;\n padding: 0 4px;\n overflow-x: auto;\n overflow-y: hidden;\n border-bottom: 1px solid var(--rvs-border);\n scrollbar-width: none;\n}\n\n.rvs-term-tabs::-webkit-scrollbar {\n height: 0;\n}\n\n.rvs-term-tab {\n flex: none;\n display: flex;\n align-items: center;\n gap: 6px;\n max-width: 180px;\n margin: 4px 0;\n padding: 0 6px 0 9px;\n border: none;\n border-radius: 6px;\n background: transparent;\n color: var(--rvs-fg3);\n font: inherit;\n font-size: 12px;\n cursor: pointer;\n}\n\n/* Wrapper that pairs a tab with its close button. The two are siblings so the\n ✕ can be a real focusable <button> (a nested one is invalid HTML and left\n keyboard users no way to close a tab). */\n.rvs-term-tabwrap {\n position: relative;\n flex: none;\n display: flex;\n align-items: center;\n}\n\n.rvs-term-tabwrap .rvs-term-tab {\n padding-right: 22px;\n}\n\n.rvs-term-tabwrap .rvs-etab-close {\n position: absolute;\n right: 3px;\n opacity: 0;\n}\n\n.rvs-term-tabwrap:hover .rvs-etab-close,\n.rvs-term-tabwrap:focus-within .rvs-etab-close {\n opacity: .8;\n}\n\n.rvs-term-tab:hover {\n background: var(--rvs-hover);\n color: var(--rvs-fg);\n}\n\n.rvs-term-tab.active {\n background: var(--rvs-layer3);\n color: var(--rvs-fg);\n}\n\n.rvs-term-tab.dead {\n color: var(--rvs-git-d);\n}\n\n.rvs-term-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-term-body {\n flex: 1;\n min-height: 0;\n position: relative;\n overflow: hidden;\n}\n\n.rvs-term-slot {\n position: absolute;\n inset: 0;\n}\n\n.rvs-term-dead {\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background: var(--rvs-code-bg);\n color: var(--rvs-code-fg);\n}\n\n/* `.rvs-toast.error` is styled with the overlay form further up, so the popup\n opacity convention (an opaque Canvas base plus a token layer) still governs\n it. A flat `background: #3a1f22` shorthand sat here and overrode that chain —\n same opaque result, but outside the convention. */\n\n@keyframes rvsFade {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n@keyframes rvsPop {\n from { opacity: 0; transform: scale(.97) translateY(3px); }\n to { opacity: 1; transform: none; }\n}\n\n.rvs-search-row {\n display: flex;\n gap: 6px;\n padding: 6px 8px;\n border-bottom: 1px solid var(--rvs-border);\n}\n\n/* --------------------------------------------------------- search options */\n\n.rvs-toggles {\n flex: none;\n display: inline-flex;\n border: 1px solid var(--rvs-border2);\n border-radius: 6px;\n overflow: hidden;\n}\n\n.rvs-toggle {\n min-width: 26px;\n height: 22px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 5px;\n border: none;\n border-right: 1px solid var(--rvs-border);\n background: transparent;\n color: var(--rvs-fg3);\n font: inherit;\n cursor: pointer;\n}\n\n.rvs-toggle:last-child {\n border-right: none;\n}\n\n.rvs-toggle:hover {\n background: var(--rvs-hover);\n color: var(--rvs-fg);\n}\n\n.rvs-toggle.active {\n background: var(--rvs-active);\n color: var(--rvs-fg);\n box-shadow: inset 0 0 0 1px var(--rvs-brand);\n}\n\n.rvs-glyph {\n font-family: var(--rvs-mono);\n font-weight: 600;\n line-height: 1;\n letter-spacing: -0.02em;\n}\n\n.rvs-glyph-underline {\n text-decoration: underline;\n}\n\n.rvs-scope-label {\n flex: none;\n align-self: center;\n font-size: 11px;\n color: var(--rvs-fg3);\n white-space: nowrap;\n}\n\n/* --------------------------------------------------------- search results */\n\n.rvs-hit {\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n padding: 3px 10px;\n border: none;\n background: transparent;\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12.5px;\n text-align: left;\n cursor: pointer;\n}\n\n.rvs-hit:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-hit-file {\n font-weight: 600;\n}\n\n.rvs-hit-line {\n padding-left: 30px;\n align-items: flex-start;\n font-family: var(--rvs-mono);\n font-size: 12px;\n color: var(--rvs-fg2);\n}\n\n.rvs-hit-count {\n flex: none;\n min-width: 18px;\n padding: 0 5px;\n border-radius: 9px;\n background: var(--rvs-hover);\n font-size: 10.5px;\n line-height: 15px;\n text-align: center;\n color: var(--rvs-fg3);\n}\n\n.rvs-hit-lineno {\n flex: none;\n width: 3.2em;\n text-align: right;\n color: var(--rvs-fg3);\n opacity: .8;\n font-size: 11px;\n}\n\n.rvs-hit-text {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: pre;\n direction: ltr;\n}\n\n.rvs-mark {\n padding: 0 1px;\n border-radius: 2px;\n background: rgba(226, 183, 20, .3);\n color: inherit;\n}\n\n.rvs-hit-dir {\n flex: none;\n color: var(--rvs-fg3);\n font-size: 11px;\n}\n\n.rvs-hit-name {\n flex: none;\n font-weight: 600;\n}\n\n.rvs-kbd {\n padding: 0 4px;\n border: 1px solid var(--rvs-border2);\n border-radius: 4px;\n font-size: 10px;\n color: var(--rvs-fg3);\n}\n\n/* --- SCM: repository directory row (git runs in THIS directory) ------------- */\n\n.rvs-repo-bar {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 4px 8px 4px 10px;\n border-bottom: 1px solid var(--rvs-border);\n background: var(--rvs-bg2, var(--dsw-alias-bg-layer-1, #1b1b1b));\n font-size: 11px;\n flex: none;\n}\n\n.rvs-repo-bar-label {\n color: var(--rvs-fg3);\n white-space: nowrap;\n}\n\n.rvs-repo-bar-path {\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n direction: rtl;\n unicode-bidi: plaintext;\n text-align: left;\n padding: 2px 6px;\n border: 1px solid var(--rvs-border2);\n border-radius: 4px;\n background: var(--rvs-bg3, rgba(255, 255, 255, .04));\n color: var(--rvs-fg);\n font-family: var(--rvs-mono, ui-monospace, Consolas, monospace);\n font-size: 11px;\n cursor: pointer;\n}\n\n.rvs-repo-bar-path:hover {\n border-color: var(--rvs-brand);\n color: var(--rvs-brand-fg, var(--rvs-fg));\n}\n\n.rvs-repo-bar-fix {\n margin-top: 10px;\n display: flex;\n justify-content: center;\n}\n\n/* --- SCM: repository directory picker -------------------------------------- */\n\n.rvs-repopick {\n width: min(560px, calc(100vw - 40px));\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.rvs-repopick .rvs-modal-title {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n\n.rvs-repopick-bar {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 2px;\n min-height: 22px;\n font-family: var(--rvs-mono, ui-monospace, Consolas, monospace);\n font-size: 12px;\n}\n\n.rvs-crumb-wrap {\n display: inline-flex;\n align-items: center;\n gap: 2px;\n color: var(--rvs-fg3);\n}\n\n.rvs-crumb {\n border: none;\n background: none;\n padding: 1px 3px;\n border-radius: 3px;\n color: var(--rvs-brand-fg, var(--rvs-fg));\n font: inherit;\n cursor: pointer;\n}\n\n.rvs-crumb:hover {\n background: var(--rvs-row-hover, rgba(255, 255, 255, .07));\n}\n\n.rvs-repopick-probe {\n padding: 5px 8px;\n border-radius: 4px;\n font-size: 11.5px;\n border: 1px solid var(--rvs-border2);\n background: var(--rvs-bg3, rgba(255, 255, 255, .04));\n color: var(--rvs-fg2);\n}\n\n.rvs-repopick-probe.root {\n border-color: var(--rvs-ok, #2ea043);\n color: var(--rvs-ok, #2ea043);\n}\n\n.rvs-repopick-probe.inside {\n border-color: var(--rvs-brand);\n color: var(--rvs-brand-fg, var(--rvs-fg));\n}\n\n.rvs-repopick-found {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 4px;\n padding-bottom: 2px;\n}\n\n.rvs-repopick-found-label {\n color: var(--rvs-fg3);\n font-size: 11px;\n white-space: nowrap;\n}\n\n.rvs-repopick-list {\n flex: 1 1 auto;\n min-height: 150px;\n max-height: 42vh;\n overflow: auto;\n border: 1px solid var(--rvs-border);\n border-radius: 5px;\n background: var(--rvs-bg-layer, rgba(0, 0, 0, .18));\n padding: 2px;\n}\n\n.rvs-repopick-row {\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n padding: 3px 6px;\n border: none;\n border-radius: 3px;\n background: none;\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12px;\n text-align: left;\n cursor: pointer;\n}\n\n.rvs-repopick-row:hover {\n background: var(--rvs-row-hover, rgba(255, 255, 255, .07));\n}\n\n.rvs-repopick-row span {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-repopick-dim {\n color: var(--rvs-fg3);\n font-size: 11.5px;\n padding: 6px;\n}\n\n.rvs-repopick-type {\n display: flex;\n gap: 6px;\n align-items: center;\n}\n\n.rvs-repopick-type .rvs-input {\n flex: 1 1 auto;\n}\n\n.rvs-repopick-error {\n color: var(--rvs-error, #f85149);\n font-size: 11.5px;\n}\n\n/* --------------------------------------------------- streaming exec panel */\n\n/**\n * Live log for the network verbs (fetch / pull / push / sync).\n *\n * Fixed to the viewport's bottom-right instead of joining the panel's own\n * column: the pane can be collapsed or scrolled away while the push runs, and a\n * dialog that vanishes with its parent would hide the cancel button exactly\n * when it matters.\n */\n.rvs-execpanel {\n /* PORTALED to <body>, i.e. OUTSIDE `.rvs-root` where these tokens are\n declared — without this block every var() below resolves to nothing and the\n panel renders transparent and borderless over the page content. Keep this\n subset in sync with `.rvs-root`; the dark code surfaces get their own\n `body[data-ds-dark-theme]` override right after this rule. */\n --rvs-fg: var(--dsw-alias-label-primary, #e6e6e6);\n --rvs-fg2: var(--dsw-alias-label-secondary, #b9b9b9);\n --rvs-fg3: var(--dsw-alias-label-tertiary, #8b8b8b);\n --rvs-hover: var(--dsw-alias-interactive-bg-hover, rgba(127, 127, 127, .14));\n --rvs-border: var(--dsw-alias-border-l1, rgba(127, 127, 127, .25));\n --rvs-border2: var(--dsw-alias-border-l2, rgba(127, 127, 127, .38));\n --rvs-overlay: var(--dsw-alias-bg-overlay, #24262e);\n --rvs-brand: var(--dsw-alias-brand-primary, #4d6bfe);\n --rvs-danger: var(--dsw-alias-state-error-primary, #e05555);\n --rvs-git-m: #e2b714;\n --rvs-git-a: #4ec9b0;\n --rvs-mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', Consolas, 'Courier New', monospace;\n --rvs-code-bg: #1e1e1e;\n --rvs-code-fg: #d4d4d4;\n position: fixed;\n right: 16px;\n bottom: 16px;\n z-index: 45;\n width: min(620px, calc(100vw - 32px));\n max-height: min(60vh, 520px);\n display: flex;\n flex-direction: column;\n overflow: hidden;\n border: 1px solid var(--rvs-border2);\n border-radius: 10px;\n background: var(--rvs-overlay);\n color: var(--rvs-fg);\n box-shadow: 0 18px 60px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .28);\n}\n\nbody[data-ds-dark-theme] .rvs-execpanel {\n --rvs-code-bg: #1e1e1e;\n --rvs-code-fg: #d4d4d4;\n}\n\n\n.rvs-execpanel-head {\n flex: none;\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 5px 6px 5px 10px;\n border-bottom: 1px solid var(--rvs-border);\n}\n\n.rvs-execpanel-title {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n font-weight: 600;\n}\n\n.rvs-execpanel-status {\n flex: none;\n font-size: 11px;\n color: var(--rvs-fg3);\n font-variant-numeric: tabular-nums;\n}\n\n.rvs-execpanel-status.done { color: var(--rvs-git-a); }\n.rvs-execpanel-status.error { color: var(--rvs-danger); }\n.rvs-execpanel-status.cancelled { color: var(--rvs-git-m); }\n\n.rvs-execpanel-spacer {\n flex: 1;\n min-width: 0;\n}\n\n.rvs-execpanel-body {\n flex: 1;\n min-height: 60px;\n margin: 0;\n padding: 8px 10px;\n overflow: auto;\n background: var(--rvs-code-bg);\n color: var(--rvs-code-fg);\n font-family: var(--rvs-mono);\n font-size: 11.5px;\n line-height: 1.45;\n white-space: pre-wrap;\n word-break: break-word;\n user-select: text;\n}\n\n.rvs-execpanel-foot {\n flex: none;\n padding: 4px 10px 6px;\n border-top: 1px solid var(--rvs-border);\n color: var(--rvs-fg3);\n font-size: 11px;\n}\n\n/* --------------------------------------------------------- download dock */\n/* PORTALed to <body>, i.e. OUTSIDE `.rvs-root` where the tokens are declared:\n declare the subset this panel uses (same rule as `.rvs-execpanel`). */\n.rvs-downloads {\n --rvs-fg: var(--dsw-alias-label-primary, #e6e6e6);\n --rvs-fg2: var(--dsw-alias-label-secondary, #b9b9b9);\n --rvs-fg3: var(--dsw-alias-label-tertiary, #8b8b8b);\n --rvs-border: var(--dsw-alias-border-l1, rgba(127, 127, 127, .25));\n --rvs-border2: var(--dsw-alias-border-l2, rgba(127, 127, 127, .38));\n --rvs-overlay: var(--dsw-alias-bg-overlay, #24262e);\n --rvs-brand: var(--dsw-alias-brand-primary, #4d6bfe);\n --rvs-danger: var(--dsw-alias-state-error-primary, #e05555);\n --rvs-git-m: #e2b714;\n --rvs-git-a: #4ec9b0;\n position: fixed;\n /* Bottom-RIGHT, not over the sidebar's own footer (first screenshot: the\n dock sat on the usage/account block). `bottom: 64px` keeps it above the\n transient toast stack (right 16 / bottom 18 / z 100001) and above the\n network exec panel (right 16 / bottom 16 / z 45), so neither covers it. */\n right: 16px;\n bottom: 64px;\n z-index: 100000;\n animation: rvsFade .12s ease;\n width: min(380px, calc(100vw - 32px));\n max-height: min(45vh, 420px);\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 8px;\n border: 1px solid var(--rvs-border2);\n border-radius: 10px;\n background: var(--rvs-overlay);\n color: var(--rvs-fg);\n box-shadow: 0 18px 60px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .28);\n}\n\n.rvs-download {\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding: 6px 8px;\n border: 1px solid var(--rvs-border);\n border-radius: 8px;\n background: rgba(127, 127, 127, .06);\n}\n\n.rvs-download-head {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n}\n\n.rvs-download-icon {\n flex: none;\n display: flex;\n align-items: center;\n color: var(--rvs-fg2);\n}\n\n.rvs-download-name {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n font-weight: 600;\n}\n\n.rvs-download-status {\n flex: none;\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n.rvs-download-status.done { color: var(--rvs-git-a); }\n.rvs-download-status.failed { color: var(--rvs-danger); }\n.rvs-download-status.cancelled { color: var(--rvs-git-m); }\n\n.rvs-download-bar {\n height: 4px;\n overflow: hidden;\n border-radius: 2px;\n background: rgba(127, 127, 127, .22);\n}\n\n.rvs-download-fill {\n height: 100%;\n width: 0;\n border-radius: 2px;\n background: var(--rvs-brand);\n transition: width .12s linear;\n}\n\n.rvs-download-fill.indeterminate {\n width: 35%;\n animation: rvs-download-slide 1.2s ease-in-out infinite;\n}\n\n@keyframes rvs-download-slide {\n from { transform: translateX(-120%); }\n to { transform: translateX(320%); }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .rvs-download-fill.indeterminate { animation-duration: 2.4s; }\n .rvs-download-fill { transition: none; }\n}\n\n.rvs-download-meta {\n overflow: hidden;\n color: var(--rvs-fg3);\n font-size: 11px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-download-meta.failed { color: var(--rvs-danger); white-space: normal; word-break: break-word; }\n.rvs-download-meta.done { color: var(--rvs-fg2); }\n.rvs-download-meta.cancelled { color: var(--rvs-git-m); }\n\n/* ----------------------------------------------------------- doctor panel */\n\n/*\n * Remote-environment report, opened from the host list (which lives in the DSH\n * Settings dialog, i.e. OUTSIDE `.rvs-root`). Fixed overlay like the input\n * dialog so the host list behind it does not move, and its own token subset for\n * the same reason as `.rvs-execpanel`: `var(--rvs-*)` resolves to nothing out\n * there without it. Three state colors, and `unknown` deliberately looks\n * neutral (not red, not green): it is ignorance, not a verdict.\n */\n.rvs-doctor {\n --rvs-fg: var(--dsw-alias-label-primary, #e6e6e6);\n --rvs-fg2: var(--dsw-alias-label-secondary, #b9b9b9);\n --rvs-fg3: var(--dsw-alias-label-tertiary, #8b8b8b);\n --rvs-border: var(--dsw-alias-border-l1, rgba(127, 127, 127, .25));\n --rvs-overlay: var(--dsw-alias-bg-overlay, #24262e);\n --rvs-git-m: #e2b714;\n --rvs-mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', Consolas, 'Courier New', monospace;\n position: fixed;\n inset: 0;\n z-index: 1000;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(0, 0, 0, .45);\n color: var(--rvs-fg);\n font-size: 13px;\n}\n\n.rvs-doctor-card {\n display: flex;\n flex-direction: column;\n width: min(860px, 92vw);\n max-height: min(80vh, 720px);\n border: 1px solid var(--rvs-border);\n border-radius: 8px;\n background: var(--rvs-overlay);\n box-shadow: 0 8px 32px rgba(0, 0, 0, .35);\n}\n\n.rvs-doctor-head {\n flex: none;\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 10px 12px;\n border-bottom: 1px solid var(--rvs-border);\n}\n\n.rvs-doctor-title {\n font-weight: 600;\n}\n\n.rvs-doctor-body {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 4px 12px 10px;\n}\n\n.rvs-doctor-loading {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 10px 0;\n color: var(--rvs-fg2);\n}\n\n.rvs-doctor-table {\n width: 100%;\n border-collapse: collapse;\n font-size: 12px;\n}\n\n.rvs-doctor-table th {\n position: sticky;\n top: 0;\n padding: 6px 8px;\n border-bottom: 1px solid var(--rvs-border);\n background: var(--rvs-overlay);\n color: var(--rvs-fg2);\n font-weight: 600;\n text-align: left;\n}\n\n.rvs-doctor-table td {\n padding: 5px 8px;\n border-top: 1px solid var(--rvs-border);\n vertical-align: top;\n}\n\n.rvs-doctor-item {\n white-space: nowrap;\n color: var(--rvs-fg2);\n}\n\n.rvs-doctor-badge {\n display: inline-block;\n padding: 0 6px;\n border: 1px solid currentColor;\n border-radius: 8px;\n font-size: 11px;\n white-space: nowrap;\n}\n\n.rvs-doctor-badge.ok { color: var(--rvs-ok, #2ea043); }\n.rvs-doctor-badge.missing { color: var(--rvs-git-m, #e2b714); }\n.rvs-doctor-badge.unknown { color: var(--rvs-fg3); }\n\n.rvs-doctor-detail {\n color: var(--rvs-fg3);\n font-family: var(--rvs-mono);\n font-size: 11px;\n word-break: break-word;\n user-select: text;\n}\n\n.rvs-doctor-hint {\n flex: none;\n padding: 8px 12px;\n border-top: 1px solid var(--rvs-border);\n color: var(--rvs-fg3);\n font-size: 11px;\n}\n\n\n\n\n/* ------------------------------------------------------------ port forwards */\n\n/**\n * The port panel: one form above two lists, all inside the sidebar column.\n *\n * The column can be dragged very narrow, so nothing here may assume a width: an\n * address/URL is ONE unbreakable token (`overflow-wrap: anywhere`), the action\n * row wraps instead of overflowing, and the form stacks vertically — a\n * three-input row is unusable at the panel's default width.\n */\n.rvs-ports-body {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 8px 8px 14px;\n}\n\n/**\n * The restore-failure banner: one sentence plus the \"forget these rules\"\n * action, side by side when there is room and stacked when the column is very\n * narrow (the action must never squeeze the explanation into a sliver).\n */\n.rvs-ports-restore {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.rvs-ports-form {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 8px;\n border: 1px solid var(--rvs-border2);\n border-radius: 8px;\n}\n\n.rvs-ports-field {\n display: flex;\n flex-direction: column;\n gap: 3px;\n min-width: 0;\n}\n\n.rvs-ports-label {\n color: var(--rvs-fg3);\n font-size: 11px;\n}\n\n/* `.rvs-input` carries `flex: 1`; in a COLUMN flex parent that would stretch\n the field's HEIGHT, so the input fills the width and keeps its own height. */\n.rvs-ports-input {\n flex: none;\n width: 100%;\n box-sizing: border-box;\n}\n\n.rvs-ports-form-actions {\n display: flex;\n justify-content: flex-end;\n}\n\n.rvs-ports-section {\n margin-top: 12px;\n border-top: 1px solid var(--rvs-border);\n}\n\n.rvs-ports-sec-head {\n display: flex;\n align-items: center;\n gap: 6px;\n height: 26px;\n padding: 0 4px;\n color: var(--rvs-fg2);\n font-size: 11px;\n font-weight: 700;\n letter-spacing: .04em;\n text-transform: uppercase;\n user-select: none;\n}\n\n.rvs-ports-count {\n padding: 0 6px;\n border-radius: 999px;\n background: var(--rvs-hover);\n color: var(--rvs-fg3);\n font-size: 10.5px;\n letter-spacing: 0;\n}\n\n.rvs-ports-row {\n display: flex;\n flex-direction: column;\n gap: 3px;\n min-width: 0;\n padding: 6px 6px 7px;\n border-radius: 6px;\n}\n\n.rvs-ports-row:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-ports-line {\n display: flex;\n align-items: baseline;\n gap: 6px;\n min-width: 0;\n}\n\n.rvs-ports-addr {\n flex: 1;\n min-width: 0;\n overflow-wrap: anywhere;\n color: var(--rvs-fg);\n font-family: var(--rvs-mono);\n font-size: 11.5px;\n line-height: 1.45;\n}\n\n.rvs-ports-proc {\n flex: 0 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--rvs-fg3);\n font-size: 11px;\n}\n\n/* State is never colour-only: the dot carries the state word as its label. */\n.rvs-ports-dot {\n flex: none;\n width: 7px;\n height: 7px;\n border-radius: 50%;\n background: var(--rvs-fg3);\n}\n\n.rvs-ports-dot.listening {\n background: var(--rvs-ok, #2ea043);\n}\n\n.rvs-ports-dot.error {\n background: var(--rvs-danger);\n}\n\n.rvs-ports-conn {\n color: var(--rvs-fg3);\n font-size: 11px;\n white-space: nowrap;\n}\n\n.rvs-ports-err {\n color: var(--rvs-danger);\n font-size: 11px;\n line-height: 1.45;\n overflow-wrap: anywhere;\n}\n\n.rvs-ports-actions {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 2px;\n min-width: 0;\n}\n\n/* The \"open\" affordance is a real link styled as a header button. */\n.rvs-ports-open {\n text-decoration: none;\n}\n\n.rvs-ports-hint {\n margin-top: 4px;\n color: var(--rvs-fg3);\n font-size: 11px;\n line-height: 1.45;\n overflow-wrap: anywhere;\n}\n\n/* --------------------------------------------------------- host monitor */\n\n/**\n * The monitor panel is cross-host (not bound to the workspace): one card for a\n * single subject, a compact clickable list for \"all hosts\". Values are\n * tabular-nums so a 5 s refresh does not make the text dance.\n */\n.rvs-monitor-body {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 8px 8px 14px;\n /* Container for the narrow-sidebar layout rules at the end of this section. */\n container-type: inline-size;\n}\n\n/* The rail title and the scope picker both wanted flex:1; the title yields so\n the picker keeps enough width for its own label at 230px. */\n.rvs-monitor-header .rvs-title {\n flex: none;\n}\n\n/* The panel's own settings (refresh interval). Shown under the header only\n while the gear is active; it is chrome, not a modal, so the live values stay\n visible above it. */\n.rvs-monitor-settings {\n flex: none;\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 8px 10px;\n border-bottom: 1px solid var(--rvs-border);\n background: var(--rvs-layer3);\n}\n\n.rvs-monitor-settings-head {\n display: flex;\n align-items: baseline;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.rvs-monitor-settings-label {\n color: var(--rvs-fg2);\n font-size: 11px;\n font-weight: 600;\n}\n\n.rvs-monitor-settings-hint {\n color: var(--rvs-fg3);\n font-size: 10.5px;\n}\n\n.rvs-monitor-settings .rvs-seg {\n align-self: flex-start;\n}\n\n.rvs-monitor-card {\n margin: 2px 0 8px;\n padding: 10px;\n border: 1px solid var(--rvs-border2);\n border-radius: 9px;\n background: var(--rvs-layer3);\n}\n\n.rvs-monitor-card.error {\n border-color: rgba(224, 85, 85, .45);\n}\n\n.rvs-monitor-head {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n}\n\n.rvs-monitor-dot {\n flex: none;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: var(--rvs-fg3);\n}\n\n.rvs-monitor-dot.ok {\n background: var(--rvs-ok, #2ea043);\n}\n\n.rvs-monitor-dot.error {\n background: var(--rvs-danger);\n}\n\n.rvs-monitor-title {\n flex: none;\n max-width: 55%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 13px;\n font-weight: 650;\n color: var(--rvs-fg);\n}\n\n.rvs-monitor-conn {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: right;\n color: var(--rvs-fg3);\n font-size: 10.5px;\n}\n\n.rvs-monitor-sub {\n display: flex;\n align-items: baseline;\n flex-wrap: wrap;\n gap: 6px;\n margin-top: 3px;\n font-size: 11px;\n}\n\n.rvs-monitor-state {\n flex: none;\n font-weight: 600;\n}\n\n.rvs-monitor-state.ok {\n color: var(--rvs-ok, #2ea043);\n}\n\n.rvs-monitor-state.error {\n color: var(--rvs-danger);\n}\n\n.rvs-monitor-state.unknown {\n color: var(--rvs-fg3);\n}\n\n.rvs-monitor-age {\n color: var(--rvs-fg3);\n font-variant-numeric: tabular-nums;\n}\n\n.rvs-monitor-reason {\n flex-basis: 100%;\n min-width: 0;\n overflow-wrap: anywhere;\n color: var(--rvs-fg2);\n line-height: 1.45;\n}\n\n.rvs-monitor-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));\n gap: 8px;\n margin-top: 10px;\n}\n\n.rvs-monitor-tile {\n display: flex;\n flex-direction: column;\n gap: 4px;\n min-width: 0;\n padding: 8px;\n border-radius: 7px;\n background: var(--rvs-hover);\n}\n\n.rvs-monitor-tile-label {\n color: var(--rvs-fg2);\n font-size: 10px;\n font-weight: 600;\n letter-spacing: .06em;\n text-transform: uppercase;\n}\n\n.rvs-monitor-tile-value {\n color: var(--rvs-fg);\n font-size: 18px;\n font-weight: 650;\n line-height: 1.1;\n font-variant-numeric: tabular-nums;\n}\n\n.rvs-monitor-tile-sub {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--rvs-fg2);\n font-size: 10.5px;\n}\n\n.rvs-monitor-bar {\n height: 4px;\n border-radius: 2px;\n background: var(--rvs-border);\n overflow: hidden;\n}\n\n.rvs-monitor-bar-fill {\n display: block;\n height: 100%;\n border-radius: inherit;\n background: var(--rvs-brand);\n transition: width .35s ease;\n}\n\n.rvs-monitor-bar-fill.warn {\n background: var(--rvs-git-m);\n}\n\n.rvs-monitor-bar-fill.hot {\n background: var(--rvs-danger);\n}\n\n/* Four facts: a 2×2 block reads calmer than three-then-one with auto-fit. */\n.rvs-monitor-facts {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 6px;\n margin-top: 8px;\n}\n\n.rvs-monitor-fact {\n min-width: 0;\n padding: 6px 8px;\n border: 1px solid var(--rvs-border);\n border-radius: 7px;\n}\n\n.rvs-monitor-fact-label {\n color: var(--rvs-fg2);\n font-size: 10px;\n font-weight: 600;\n letter-spacing: .06em;\n text-transform: uppercase;\n}\n\n.rvs-monitor-fact-value {\n color: var(--rvs-fg);\n font-size: 11.5px;\n line-height: 1.35;\n font-variant-numeric: tabular-nums;\n overflow-wrap: anywhere;\n}\n\n.rvs-monitor-sparks {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));\n gap: 8px;\n margin-top: 10px;\n}\n\n.rvs-monitor-spark {\n min-width: 0;\n padding: 6px 8px 4px;\n border: 1px solid var(--rvs-border);\n border-radius: 7px;\n}\n\n.rvs-monitor-spark-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 6px;\n min-width: 0;\n}\n\n.rvs-monitor-spark-legend {\n display: inline-flex;\n align-items: center;\n gap: 7px;\n flex: none;\n color: var(--rvs-fg3);\n font-size: 10px;\n}\n\n.rvs-monitor-spark-key {\n display: inline-flex;\n align-items: center;\n gap: 3px;\n}\n\n.rvs-monitor-spark-line {\n display: inline-block;\n width: 10px;\n height: 0;\n border-top: 2px solid currentColor;\n}\n\n.rvs-monitor-spark-line.tx {\n border-top-style: dashed;\n opacity: .7;\n}\n\n.rvs-monitor-spark-label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--rvs-fg2);\n font-size: 10px;\n font-weight: 600;\n letter-spacing: .06em;\n text-transform: uppercase;\n}\n\n.rvs-monitor-spark svg {\n display: block;\n width: 100%;\n height: 34px;\n margin-top: 2px;\n}\n\n.rvs-monitor-spark.cpu {\n color: var(--rvs-brand);\n}\n\n.rvs-monitor-spark.mem {\n color: var(--rvs-git-a);\n}\n\n.rvs-monitor-spark.net {\n color: var(--rvs-git-c);\n}\n\n.rvs-monitor-spark.temp {\n color: var(--rvs-git-m);\n}\n\n.rvs-monitor-spark-empty {\n padding: 8px 0 4px;\n text-align: center;\n color: var(--rvs-fg3);\n font-size: 10.5px;\n}\n\n.rvs-monitor-hint {\n margin-top: 8px;\n color: var(--rvs-fg3);\n font-size: 10.5px;\n line-height: 1.5;\n overflow-wrap: anywhere;\n}\n\n.rvs-monitor-list {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.rvs-monitor-summary {\n padding: 0 2px 4px;\n color: var(--rvs-fg3);\n font-size: 11px;\n}\n\n.rvs-monitor-row {\n display: flex;\n flex-direction: column;\n gap: 5px;\n width: 100%;\n padding: 8px;\n border: 1px solid var(--rvs-border);\n border-radius: 8px;\n background: var(--rvs-layer3);\n color: inherit;\n font: inherit;\n text-align: left;\n cursor: pointer;\n}\n\n.rvs-monitor-row:hover {\n border-color: var(--rvs-border2);\n background: var(--rvs-hover);\n}\n\n.rvs-monitor-row.error {\n border-color: rgba(224, 85, 85, .45);\n}\n\n.rvs-monitor-row-top {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n}\n\n.rvs-monitor-row-name {\n flex: none;\n max-width: 50%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12.5px;\n font-weight: 600;\n}\n\n.rvs-monitor-row-host {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--rvs-fg3);\n font-size: 10.5px;\n}\n\n.rvs-monitor-row-cpu {\n flex: none;\n font-size: 12px;\n font-weight: 650;\n font-variant-numeric: tabular-nums;\n}\n\n.rvs-monitor-row-bars {\n display: flex;\n gap: 4px;\n}\n\n.rvs-monitor-row-bar {\n flex: 1;\n height: 3px;\n border-radius: 2px;\n background: var(--rvs-border);\n overflow: hidden;\n}\n\n.rvs-monitor-row-facts {\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 8px;\n color: var(--rvs-fg3);\n font-size: 10.5px;\n font-variant-numeric: tabular-nums;\n}\n\n/* ------------------------------------------------- narrow sidebar (<=260px)\n Container queries, not media queries: the rail is narrow while the WINDOW is\n wide. Reactions: the three gauges stack (an orphan grid cell with ~90px of\n empty space next to it looked broken), the four curves go 2×2 instead of a\n single tall column, and the all-hosts facts become a 2×2 grid so row heights\n stay uniform. */\n@container (max-width: 260px) {\n .rvs-monitor-grid {\n grid-template-columns: minmax(0, 1fr);\n }\n\n .rvs-monitor-sparks {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n\n .rvs-monitor-row-facts {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n\n /* A 2-column spark is ~80px wide; the label must win over the legend there. */\n .rvs-monitor-spark-legend {\n display: none;\n }\n}\n\n/* ------------------------------------------------------ Ctrl+P quick open */\n\n.rvs-qo-mask {\n /* PORTALED to <body>, i.e. OUTSIDE `.rvs-root` where these tokens are\n declared — without this block every var() below resolves to nothing: the\n active row paints transparent (keyboard selection invisible), the directory\n column stops dimming, and error/warning copy comes out the same colour as\n ordinary text (so \"index failed\" looks like \"no match\"). Keep this subset in\n sync with `.rvs-root`; it lists exactly the tokens the `.rvs-qo*` rules use. */\n --rvs-fg: var(--dsw-alias-label-primary, #e6e6e6);\n --rvs-fg2: var(--dsw-alias-label-secondary, #b9b9b9);\n --rvs-fg3: var(--dsw-alias-label-tertiary, #8b8b8b);\n --rvs-hover: var(--dsw-alias-interactive-bg-hover, rgba(127, 127, 127, .14));\n --rvs-active: var(--dsw-alias-interactive-bg-active, rgba(77, 107, 254, .22));\n --rvs-border: var(--dsw-alias-border-l1, rgba(127, 127, 127, .25));\n --rvs-border2: var(--dsw-alias-border-l2, rgba(127, 127, 127, .38));\n --rvs-input: var(--dsw-alias-bg-input, rgba(127, 127, 127, .12));\n --rvs-brand: var(--dsw-alias-brand-primary, #4d6bfe);\n --rvs-danger: var(--dsw-alias-state-error-primary, #e05555);\n --rvs-git-m: #e2b714;\n --rvs-mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', Consolas, 'Courier New', monospace;\n position: fixed;\n inset: 0;\n /* The modal layer (100000), so toasts (100001) still paint above it. */\n z-index: 100000;\n display: flex;\n align-items: flex-start;\n justify-content: center;\n padding-top: 12vh;\n background: rgba(0, 0, 0, .38);\n backdrop-filter: blur(2px);\n animation: rvsFade .12s ease;\n}\n\n/**\n * Opaque base first, skin overlay on top: the overlay token is frequently\n * translucent, and using it alone let the panel's text bleed through the sheet\n * (the same fix the menu/modal layer needed).\n */\n.rvs-qo {\n width: min(680px, calc(100vw - 40px));\n max-height: min(62vh, 560px);\n display: flex;\n flex-direction: column;\n border: 1px solid var(--rvs-border2);\n border-radius: 10px;\n background-color: Canvas;\n background-image: linear-gradient(var(--dsw-alias-bg-overlay, transparent), var(--dsw-alias-bg-overlay, transparent));\n color: var(--rvs-fg);\n box-shadow: 0 16px 48px rgba(0, 0, 0, .42);\n font-size: 12.5px;\n overflow: hidden;\n animation: rvsPop .12s ease;\n}\n\n.rvs-qo-bar {\n flex: none;\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 10px 12px;\n border-bottom: 1px solid var(--rvs-border);\n}\n\n.rvs-qo-input {\n flex: 1;\n min-width: 0;\n height: 28px;\n padding: 0 8px;\n border: 1px solid var(--rvs-border);\n border-radius: 6px;\n background: var(--rvs-input);\n color: var(--rvs-fg);\n font: inherit;\n outline: none;\n}\n\n.rvs-qo-input:focus {\n border-color: var(--rvs-brand);\n}\n\n.rvs-qo-hint {\n flex: none;\n color: var(--rvs-fg3);\n font-size: 11px;\n white-space: nowrap;\n}\n\n.rvs-qo-list {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n padding: 4px;\n}\n\n.rvs-qo-row {\n display: flex;\n align-items: baseline;\n gap: 8px;\n padding: 4px 8px;\n border-radius: 5px;\n white-space: nowrap;\n overflow: hidden;\n cursor: pointer;\n}\n\n.rvs-qo-row:hover {\n background: var(--rvs-hover);\n}\n\n/* Declared AFTER :hover so a hovered active row keeps the active colour. */\n.rvs-qo-row.active {\n background: var(--rvs-active);\n}\n\n.rvs-qo-dir {\n flex: 0 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n color: var(--rvs-fg3);\n font-size: 11.5px;\n}\n\n.rvs-qo-name {\n flex: none;\n color: var(--rvs-fg);\n font-family: var(--rvs-mono);\n font-size: 12px;\n}\n\n.rvs-qo-hit {\n padding: 0;\n border-radius: 2px;\n background: rgba(77, 107, 254, .32);\n color: inherit;\n font-weight: 600;\n}\n\n.rvs-qo-foot {\n flex: none;\n display: flex;\n flex-direction: column;\n gap: 2px;\n max-height: 72px;\n overflow-y: auto;\n padding: 6px 12px;\n border-top: 1px solid var(--rvs-border);\n color: var(--rvs-fg3);\n font-size: 11px;\n}\n\n.rvs-qo-note {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.rvs-qo-note.error {\n color: var(--rvs-danger);\n}\n\n.rvs-qo-note.warn {\n color: var(--rvs-git-m);\n}\n\n";
15
15
  const key$2 = "src/client/vsc/vsc.css";
16
16
  const injected$2 = typeof document === "undefined" ? void 0 : Array.prototype.find.call(document.querySelectorAll("style[data-rvs-css]"), (tag) => tag.dataset.rvsCss === key$2);
17
17
  if (typeof document !== "undefined" && injected$2 === void 0) {
@@ -382,6 +382,7 @@ window.__ModuleLoader__.load({
382
382
  "hosts.unknownError": "未知错误",
383
383
  "hosts.deleted": "{alias}:已删除",
384
384
  "hosts.saved": "{alias}:已保存",
385
+ "hosts.helperPushed": "{alias}:已自动推送远端 helper {version}",
385
386
  "hosts.imported": "已导入 {count} 个主机",
386
387
  "hosts.importedSkipped": ";跳过:{list}",
387
388
  "form.alias": "别名",
@@ -849,7 +850,26 @@ window.__ModuleLoader__.load({
849
850
  "changes.statusDeleted": "删除",
850
851
  "changes.statusModified": "修改",
851
852
  "changes.statusRenamed": "重命名",
852
- "changes.truncated": "文件过多,只列出前 500 个(统计数字仍为全部)。",
853
+ "changes.truncated": "文件过多,只列出前 500 个(统计数字也只算这 500 个)。",
854
+ "changes.excluded": "未统计构建产物目录:{dirs}",
855
+ "changes.markReviewed": "标记为已审阅",
856
+ "changes.unmarkReviewed": "取消审阅标记",
857
+ "changes.reviewCount": "已审阅 {done}/{total}",
858
+ "changes.reviewMenu": "审阅标记选项",
859
+ "changes.reviewAll": "全部标为已审阅",
860
+ "changes.reviewNone": "清除审阅标记",
861
+ "changes.menuOpen": "打开",
862
+ "changes.openInScm": "在 SCM 中查看",
863
+ "changes.copyPath": "复制远端路径",
864
+ "changes.revertFile": "撤销该文件的全部改动",
865
+ "changes.revertNotPossible": "无法撤销(新建、二进制或过大)",
866
+ "changes.revertCreation": "撤销新建(删除该文件)",
867
+ "changes.revertCreationOk": "删除该文件",
868
+ "changes.revertCreationTitle": "撤回这个新建文件?",
869
+ "changes.revertCreationText": "会删除 {path}。git 索引里还留着内容,可以用 git checkout 恢复。",
870
+ "changes.revertedFile": "已撤销该文件的改动",
871
+ "changes.revertFailed": "撤销失败",
872
+ "changes.deletedCreation": "已删除新建文件",
853
873
  "changes.prev": "上一个修改点",
854
874
  "changes.next": "下一个修改点",
855
875
  "changes.navLabel": "改动跳转",
@@ -987,6 +1007,7 @@ window.__ModuleLoader__.load({
987
1007
  "hosts.unknownError": "unknown error",
988
1008
  "hosts.deleted": "{alias}: deleted",
989
1009
  "hosts.saved": "{alias}: saved",
1010
+ "hosts.helperPushed": "{alias}: pushed remote helper {version} automatically",
990
1011
  "hosts.imported": "Imported {count} host(s)",
991
1012
  "hosts.importedSkipped": "; skipped: {list}",
992
1013
  "form.alias": "Alias",
@@ -1454,7 +1475,26 @@ window.__ModuleLoader__.load({
1454
1475
  "changes.statusDeleted": "deleted",
1455
1476
  "changes.statusModified": "modified",
1456
1477
  "changes.statusRenamed": "renamed",
1457
- "changes.truncated": "Too many files: the first 500 are listed (totals cover all of them).",
1478
+ "changes.truncated": "Too many files: the first 500 are listed (the counts cover only those).",
1479
+ "changes.excluded": "Build output directories not counted: {dirs}",
1480
+ "changes.markReviewed": "Mark as reviewed",
1481
+ "changes.unmarkReviewed": "Clear the review mark",
1482
+ "changes.reviewCount": "{done}/{total} reviewed",
1483
+ "changes.reviewMenu": "Review mark options",
1484
+ "changes.reviewAll": "Mark all as reviewed",
1485
+ "changes.reviewNone": "Clear all review marks",
1486
+ "changes.menuOpen": "Open",
1487
+ "changes.openInScm": "Show in Source Control",
1488
+ "changes.copyPath": "Copy remote path",
1489
+ "changes.revertFile": "Revert all changes in this file",
1490
+ "changes.revertNotPossible": "Cannot be reverted (new file, binary or too large)",
1491
+ "changes.revertCreation": "Undo the new file (delete it)",
1492
+ "changes.revertCreationOk": "Delete the file",
1493
+ "changes.revertCreationTitle": "Undo this new file?",
1494
+ "changes.revertCreationText": "It deletes {path}. git keeps the bytes in its index, so git checkout can bring it back.",
1495
+ "changes.revertedFile": "Reverted this file",
1496
+ "changes.revertFailed": "Revert failed",
1497
+ "changes.deletedCreation": "Deleted the new file",
1458
1498
  "changes.prev": "Previous change",
1459
1499
  "changes.next": "Next change",
1460
1500
  "changes.navLabel": "Change navigation",
@@ -1576,6 +1616,68 @@ window.__ModuleLoader__.load({
1576
1616
  return (key) => dict[key] ?? en[key] ?? key;
1577
1617
  }
1578
1618
  //#endregion
1619
+ //#region src/client/notices.ts
1620
+ const MAX_QUEUED = 8;
1621
+ let emitter;
1622
+ let queued = [];
1623
+ /**
1624
+ * Install (or remove) the toast emitter; the client entry owns the lifetime.
1625
+ *
1626
+ * Messages that arrived before the entry registered are flushed, so a notice
1627
+ * produced during the first remote operation of a page load cannot be lost.
1628
+ */
1629
+ function setHostNoticeEmitter(next) {
1630
+ emitter = next;
1631
+ if (next === void 0) return;
1632
+ const pending = queued;
1633
+ queued = [];
1634
+ for (const text of pending) next(text);
1635
+ }
1636
+ /** Render one notice in the page language. */
1637
+ function formatHostNotice(notice, lang = detectLang()) {
1638
+ const t = makeT(lang);
1639
+ if (notice.kind === "helper-pushed") return t("hosts.helperPushed").replace("{alias}", notice.alias).replace("{version}", notice.version);
1640
+ return "";
1641
+ }
1642
+ /** Deliver one rendered message: to the emitter when present, else queue it. */
1643
+ function deliver(text, emit) {
1644
+ const target = emit ?? emitter;
1645
+ if (target !== void 0) {
1646
+ target(text);
1647
+ return;
1648
+ }
1649
+ if (queued.length < MAX_QUEUED) queued = [...queued, text];
1650
+ }
1651
+ /**
1652
+ * Show every valid notice carried by one API response.
1653
+ *
1654
+ * `emit` is injectable so a gate can drive this without React or a DOM. A
1655
+ * malformed payload is ignored: a newer/older peer must never turn a successful
1656
+ * remote operation into a client exception.
1657
+ */
1658
+ function dispatchHostNotices(payload, emit) {
1659
+ if (typeof payload !== "object" || payload === null) return 0;
1660
+ const raw = payload.notices;
1661
+ if (!Array.isArray(raw)) return 0;
1662
+ let shown = 0;
1663
+ for (const entry of raw) {
1664
+ if (typeof entry !== "object" || entry === null) continue;
1665
+ const notice = entry;
1666
+ if (notice.kind !== "helper-pushed") continue;
1667
+ if (typeof notice.alias !== "string" || typeof notice.version !== "string") continue;
1668
+ if (notice.alias === "" || notice.version === "") continue;
1669
+ const text = formatHostNotice({
1670
+ kind: "helper-pushed",
1671
+ alias: notice.alias,
1672
+ version: notice.version
1673
+ });
1674
+ if (text === "") continue;
1675
+ deliver(text, emit);
1676
+ shown += 1;
1677
+ }
1678
+ return shown;
1679
+ }
1680
+ //#endregion
1579
1681
  //#region src/git-format.ts
1580
1682
  /** Cap on status file rows (each side). */
1581
1683
  const STATUS_ROW_CAP = 200;
@@ -2864,6 +2966,7 @@ window.__ModuleLoader__.load({
2864
2966
  }
2865
2967
  throw failure;
2866
2968
  }
2969
+ dispatchHostNotices(data);
2867
2970
  return data;
2868
2971
  }
2869
2972
  function post(path, body) {
@@ -4126,6 +4229,23 @@ window.__ModuleLoader__.load({
4126
4229
  * always available. If this entry ever crashes, slot shadowing retires it and
4127
4230
  * the stock picker renders (graceful fallback, no dead surface).
4128
4231
  */
4232
+ /**
4233
+ * Opt-in trace for the directory flow, silent unless the operator sets
4234
+ * `localStorage['dsh-remote-vs.debug'] = '1'` and reopens the dialog.
4235
+ *
4236
+ * The native-chooser interaction crosses three parties — this dialog, the stock
4237
+ * owner that adopts the path, and the host-side OS chooser — so "the dialog did
4238
+ * not close" needs to say WHICH stage was reached before it can be diagnosed.
4239
+ * Without this the only observable is the symptom.
4240
+ */
4241
+ function traceFlow(...parts) {
4242
+ try {
4243
+ if (typeof localStorage === "undefined" || localStorage.getItem("dsh-remote-vs.debug") !== "1") return;
4244
+ } catch {
4245
+ return;
4246
+ }
4247
+ console.info("[rvs-flow]", ...parts);
4248
+ }
4129
4249
  function errText(e) {
4130
4250
  if (e !== null && typeof e === "object" && "rpcError" in e) {
4131
4251
  const rpc = e.rpcError;
@@ -4164,8 +4284,11 @@ window.__ModuleLoader__.load({
4164
4284
  setMode("browse");
4165
4285
  } catch (e) {
4166
4286
  if (gen !== generation.current) return;
4167
- if (isUnavailable(e)) setMode("native");
4168
- else {
4287
+ if (isUnavailable(e)) {
4288
+ traceFlow("browse unavailable -> native");
4289
+ setMode("native");
4290
+ } else {
4291
+ traceFlow("browse failed", errText(e));
4169
4292
  setMode(mode === "browse" ? "browse" : "failed");
4170
4293
  setError(errText(e));
4171
4294
  }
@@ -4198,16 +4321,24 @@ window.__ModuleLoader__.load({
4198
4321
  };
4199
4322
  const nativePick = () => {
4200
4323
  const gen = ++generation.current;
4324
+ const epoch = props.flowEpoch.current;
4201
4325
  setLoading(true);
4202
4326
  setError(void 0);
4203
4327
  setNotice(void 0);
4328
+ traceFlow("native chooser requested");
4204
4329
  injected.pickDirectory().then((picked) => {
4205
- if (gen !== generation.current) return;
4330
+ if (props.flowEpoch.current !== epoch) {
4331
+ traceFlow("native chooser result dropped (another open request)", picked);
4332
+ return;
4333
+ }
4334
+ if (gen !== generation.current) traceFlow("native chooser result adopted after remount", picked);
4335
+ traceFlow("native chooser returned", picked === null ? "cancelled" : picked);
4206
4336
  setLoading(false);
4207
4337
  if (picked === null) setNotice(t("flow.nativeCancelled"));
4208
4338
  else props.onPicked(picked);
4209
4339
  }, (e) => {
4210
- if (gen !== generation.current) return;
4340
+ if (props.flowEpoch.current !== epoch) return;
4341
+ traceFlow("native chooser failed", errText(e));
4211
4342
  setLoading(false);
4212
4343
  setError(errText(e));
4213
4344
  });
@@ -4533,6 +4664,7 @@ window.__ModuleLoader__.load({
4533
4664
  onCancel: props.onCancel,
4534
4665
  onSaved: (_workspace, aliasPath) => {
4535
4666
  setDone(true);
4667
+ traceFlow("remote wizard saved", aliasPath);
4536
4668
  props.onPicked(aliasPath);
4537
4669
  }
4538
4670
  })
@@ -4542,12 +4674,36 @@ window.__ModuleLoader__.load({
4542
4674
  const [t] = (0, react.useState)(() => makeT(detectLang()));
4543
4675
  const [tab, setTab] = (0, react.useState)("local");
4544
4676
  const [epoch, setEpoch] = (0, react.useState)(0);
4677
+ /** Mirrors `epoch` without a render lag; the local leg compares it on resolve. */
4678
+ const epochRef = (0, react.useRef)(0);
4679
+ /**
4680
+ * Hand the picked path to the owner and close the dialog in one step.
4681
+ *
4682
+ * The owner adopts a picked path asynchronously (`createWorkspace`), and only
4683
+ * then flips `open` back to false. For the in-app browser that round trip is
4684
+ * a local listing, but the native chooser makes the operator wait for the OS
4685
+ * dialog to return and for the host to create the Workspace — and until the
4686
+ * owner's state lands, this dialog sits on screen. Operators reported it as
4687
+ * "the dialog only disappears after I click or press a key": that next input
4688
+ * is what re-rendered the owner's surface. `onCancel` is the same owner's
4689
+ * "withdraw the request / just close the flow" signal, so sending it with the
4690
+ * path closes immediately and independently of adoption timing; the owner's
4691
+ * own close is then a no-op. Cancel goes first so the dialog closes even if
4692
+ * the owner's picked-handler throws.
4693
+ */
4694
+ const finish = (path) => {
4695
+ traceFlow("finish", path);
4696
+ props.onCancel();
4697
+ props.onPicked(path);
4698
+ };
4545
4699
  const wasOpen = (0, react.useRef)(false);
4546
4700
  (0, react.useEffect)(() => {
4547
4701
  if (props.open && !wasOpen.current) {
4548
4702
  setTab("local");
4549
- setEpoch((n) => n + 1);
4703
+ epochRef.current += 1;
4704
+ setEpoch(epochRef.current);
4550
4705
  }
4706
+ traceFlow("open", props.open);
4551
4707
  wasOpen.current = props.open;
4552
4708
  }, [props.open]);
4553
4709
  /**
@@ -4672,11 +4828,12 @@ window.__ModuleLoader__.load({
4672
4828
  t,
4673
4829
  busy: props.busy,
4674
4830
  injected,
4675
- onPicked: props.onPicked
4831
+ flowEpoch: epochRef,
4832
+ onPicked: finish
4676
4833
  }, `local-${epoch}`) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RemoteLeg, {
4677
4834
  t,
4678
4835
  busy: props.busy,
4679
- onPicked: props.onPicked,
4836
+ onPicked: finish,
4680
4837
  onCancel: props.onCancel
4681
4838
  }, `remote-${epoch}`)
4682
4839
  }),
@@ -26441,7 +26598,7 @@ window.__ModuleLoader__.load({
26441
26598
  className: "rvs-portal",
26442
26599
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
26443
26600
  ref: boxRef,
26444
- className: "rvs-menu",
26601
+ className: props.className === void 0 ? "rvs-menu" : `rvs-menu ${props.className}`,
26445
26602
  role: "menu",
26446
26603
  style: {
26447
26604
  left: pos.left,
@@ -40225,6 +40382,8 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
40225
40382
  const WORD_ADD = Decoration.mark({ class: "rvs-change-word-add" });
40226
40383
  /** 删除 chip 的悬浮说明。与 gutter 的 `LABEL` 一样,是编辑器侧的固定文案。 */
40227
40384
  const CHIP_TITLE = "已删除的内容";
40385
+ /** 整块删除那种胶囊的悬浮说明(后面跟行数)。 */
40386
+ const BLOCK_CHIP_TITLE = "已删除的整块内容";
40228
40387
  /**
40229
40388
  * 被删内容的零宽 widget。
40230
40389
  *
@@ -40235,20 +40394,31 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
40235
40394
  var RemovedChipWidget = class RemovedChipWidget extends WidgetType {
40236
40395
  text;
40237
40396
  truncated;
40238
- constructor(text, truncated) {
40397
+ count;
40398
+ constructor(text, truncated, count = 0) {
40239
40399
  super();
40240
40400
  this.text = text;
40241
40401
  this.truncated = truncated;
40402
+ this.count = count;
40242
40403
  }
40243
40404
  eq(other) {
40244
- return other instanceof RemovedChipWidget && other.text === this.text && other.truncated === this.truncated;
40405
+ return other instanceof RemovedChipWidget && other.text === this.text && other.truncated === this.truncated && other.count === this.count;
40245
40406
  }
40246
40407
  toDOM() {
40247
40408
  const chip = document.createElement("span");
40248
- chip.className = "rvs-change-word-del";
40249
- chip.textContent = this.truncated ? `${this.text}…` : this.text;
40250
- chip.title = CHIP_TITLE;
40251
- chip.setAttribute("aria-label", CHIP_TITLE);
40409
+ /**
40410
+ * 整块删除(`count > 1`)读成一枚胶囊,不是一行删除线文字。
40411
+ *
40412
+ * 行内删短(`const a = 1 + 2` → `const a = 1`)仍然是划掉的原文 —— 那里被删的
40413
+ * 是一个片段,位置和内容都能直接读。多行整块没有这个性质:原文是一个段落,
40414
+ * 划线堆在行首只会糊成一片,所以这里只报**行数**,原文进 tooltip(已在数据层
40415
+ * 限过长度,见 `model.ts` 的 `deletedRunChip`)。
40416
+ */
40417
+ const block = this.count > 1;
40418
+ chip.className = block ? "rvs-change-word-del rvs-change-block-del" : "rvs-change-word-del";
40419
+ chip.textContent = block ? `−${this.count} 行已删除` : this.truncated ? `${this.text}…` : this.text;
40420
+ chip.title = block ? `${BLOCK_CHIP_TITLE}(${this.count} 行)\n${this.text}` : CHIP_TITLE;
40421
+ chip.setAttribute("aria-label", chip.title);
40252
40422
  return chip;
40253
40423
  }
40254
40424
  };
@@ -40259,7 +40429,7 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
40259
40429
  */
40260
40430
  function chipDecoration(chip) {
40261
40431
  return Decoration.widget({
40262
- widget: new RemovedChipWidget(chip.text, chip.truncated),
40432
+ widget: new RemovedChipWidget(chip.text, chip.truncated, chip.count ?? 0),
40263
40433
  side: -1
40264
40434
  });
40265
40435
  }
@@ -40300,7 +40470,8 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
40300
40470
  entryOf(clampLine(chip.line ?? anchor, maxLine)).chips.push({
40301
40471
  at: Math.max(0, Math.round(chip.at)),
40302
40472
  text: chip.text,
40303
- truncated: chip.truncated === true
40473
+ truncated: chip.truncated === true,
40474
+ ...chip.count === void 0 ? {} : { count: chip.count }
40304
40475
  });
40305
40476
  }
40306
40477
  }
@@ -41590,7 +41761,7 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
41590
41761
  const primary = host.querySelectorAll("[class*=\"rvs-ck-\"]").length;
41591
41762
  const fallback = host.querySelectorAll("span[class^=\"rvs-t-\"]").length;
41592
41763
  const count = primary > 0 ? primary : fallback;
41593
- console.info(`[dsh-remote-vs] build 1112-1650 · ${source} · colored tokens: ${count} (${propsRef.current.path})`);
41764
+ console.info(`[dsh-remote-vs] build 1118-1711 · ${source} · colored tokens: ${count} (${propsRef.current.path})`);
41594
41765
  propsRef.current.onTokens?.(count);
41595
41766
  };
41596
41767
  const armFallback = () => {
@@ -42064,6 +42235,43 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
42064
42235
  };
42065
42236
  }
42066
42237
  /**
42238
+ * How many lines of a collapsed deletion block travel as the tooltip preview.
42239
+ *
42240
+ * The pill only shows the COUNT, so the text is not on screen; it is still worth
42241
+ * carrying a bounded prefix for the hover — enough to recognize the block, never
42242
+ * enough to build a thousand-line title from a thousand-line removal.
42243
+ */
42244
+ const MAX_BLOCK_PREVIEW_LINES = 20;
42245
+ /**
42246
+ * One chip for a run of deleted lines.
42247
+ *
42248
+ * A block deletion used to emit one chip PER line, every one of them at column 0
42249
+ * of the same anchor line: a ten-line removal became ten struck-through
42250
+ * fragments printed on top of each other, which says neither "ten lines" nor
42251
+ * what they were. A run longer than a single line now collapses into one chip
42252
+ * carrying the count (rendered as `−N 行已删除`) with a bounded preview in its
42253
+ * title; a one-line removal keeps the exact text at the cut, which is the case
42254
+ * where the struck-through words are genuinely readable.
42255
+ *
42256
+ * @param deleted - the run's deleted texts, in order.
42257
+ * @param line - the line the run belongs to.
42258
+ * @param anchor - the mark's anchor line (see {@link chipOnLine}).
42259
+ */
42260
+ function deletedRunChip(deleted, line, anchor) {
42261
+ const [only] = deleted;
42262
+ if (only === void 0) return void 0;
42263
+ if (deleted.length === 1) {
42264
+ const chip = chipAt(0, only);
42265
+ return chip === void 0 ? void 0 : chipOnLine(chip, line, anchor);
42266
+ }
42267
+ return chipOnLine({
42268
+ at: 0,
42269
+ text: deleted.slice(0, MAX_BLOCK_PREVIEW_LINES).map((text) => text.length > MAX_CHIP_CHARS ? text.slice(0, MAX_CHIP_CHARS) : text).join("\n"),
42270
+ truncated: deleted.length > MAX_BLOCK_PREVIEW_LINES || deleted.some((text) => text.length > MAX_CHIP_CHARS),
42271
+ count: deleted.length
42272
+ }, line, anchor);
42273
+ }
42274
+ /**
42067
42275
  * Attach `line` only when the fragment is NOT on the mark's anchor line.
42068
42276
  *
42069
42277
  * Single-line changes are the common case, and there the fragment's line is
@@ -42096,23 +42304,54 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
42096
42304
  /**
42097
42305
  * Fill in `mark.inline` / `mark.removed` for one modified block.
42098
42306
  *
42099
- * Pairing is positional: the i-th deleted line of the block goes with the i-th
42100
- * added line (git puts every deletion of a block before its additions, and a
42101
- * block with unequal counts leaves the extras as pure additions/removals).
42307
+ * Pairing happens in two phases, and the first one is what keeps the highlight
42308
+ * honest:
42309
+ *
42310
+ * 1. **Exact matches are consumed first, at any index.** A block that was merely
42311
+ * REORDERED (`a`,`b` → `b`,`a`) has no character-level change in it, but
42312
+ * positional pairing compares `a` against `b` and paints "these characters
42313
+ * changed" on two lines that did not change at all. The same phase fixes the
42314
+ * common "one line inserted inside an edited run" shape, where every line
42315
+ * after the insertion used to be paired with the wrong neighbour. Lookup goes
42316
+ * through a text → indices map, so the phase stays linear in the block rather
42317
+ * than quadratic in its lines.
42318
+ * 2. **What is left pairs by position** — the i-th edited deletion with the i-th
42319
+ * remaining addition. git puts every deletion of a block before its
42320
+ * additions, and a block with unequal counts leaves the extras as pure
42321
+ * additions/removals.
42102
42322
  *
42103
42323
  * @param mark - the block's mark (mutated).
42104
42324
  * @param deleted - the block's deleted texts, in order.
42105
42325
  * @param added - the block's added lines, in order.
42106
42326
  */
42107
42327
  function attachInline(mark, deleted, added) {
42108
- const pairs = Math.min(deleted.length, added.length);
42328
+ const pending = /* @__PURE__ */ new Map();
42329
+ added.forEach((item, index) => {
42330
+ const list = pending.get(item.text);
42331
+ if (list === void 0) pending.set(item.text, [index]);
42332
+ else list.push(index);
42333
+ });
42334
+ const edited = [];
42335
+ const used = new Array(added.length).fill(false);
42336
+ for (const text of deleted) {
42337
+ const list = pending.get(text);
42338
+ if (list === void 0 || list.length === 0) {
42339
+ edited.push(text);
42340
+ continue;
42341
+ }
42342
+ const index = list.shift();
42343
+ if (index !== void 0) used[index] = true;
42344
+ }
42345
+ const fresh = added.filter((_item, index) => !used[index]);
42346
+ const pairs = Math.min(edited.length, fresh.length);
42109
42347
  const inline = [];
42110
42348
  const removed = [];
42111
42349
  for (let index = 0; index < pairs; index += 1) {
42112
- const before = deleted[index];
42113
- const after = added[index].text;
42114
- const line = added[index].line;
42115
- if (before === after) continue;
42350
+ const before = edited[index];
42351
+ const item = fresh[index];
42352
+ if (before === void 0 || item === void 0) continue;
42353
+ const after = item.text;
42354
+ const line = item.line;
42116
42355
  const { head, oldMid, newMid } = splitCommon(before, after);
42117
42356
  if (newMid.length === 0) {
42118
42357
  const chip = chipAt(head, oldMid);
@@ -42128,10 +42367,8 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
42128
42367
  }
42129
42368
  for (const range of refineRanges(oldMid, newMid, head)) inline.push(rangeOnLine(range, line, mark.from));
42130
42369
  }
42131
- for (let index = pairs; index < deleted.length; index += 1) {
42132
- const chip = chipAt(0, deleted[index]);
42133
- if (chip !== void 0) removed.push(chip);
42134
- }
42370
+ const tailChip = deletedRunChip(edited.slice(pairs), mark.from, mark.from);
42371
+ if (tailChip !== void 0) removed.push(tailChip);
42135
42372
  if (inline.length > 0) mark.inline = inline;
42136
42373
  if (removed.length > 0) mark.removed = removed;
42137
42374
  }
@@ -42173,13 +42410,10 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
42173
42410
  kind: "del",
42174
42411
  hunk: index
42175
42412
  };
42176
- if (inlineAllowed && deleted.every((text) => text.length <= MAX_INLINE_LINE)) {
42177
- const chips = [];
42178
- for (const text of deleted) {
42179
- const chip = chipAt(0, text);
42180
- if (chip !== void 0) chips.push(chip);
42181
- }
42182
- if (chips.length > 0) mark.removed = chips;
42413
+ const printable = deleted.length > 1 || deleted.every((text) => text.length <= MAX_INLINE_LINE);
42414
+ if (inlineAllowed && printable) {
42415
+ const chip = deletedRunChip(deleted, anchor, anchor);
42416
+ if (chip !== void 0) mark.removed = [chip];
42183
42417
  }
42184
42418
  marks.push(mark);
42185
42419
  first ??= anchor;
@@ -42212,9 +42446,11 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
42212
42446
  *
42213
42447
  * @param hunks - served hunks for the whole session.
42214
42448
  * @param stamp - identity of the comparison (file + baseline + turn).
42449
+ * @param filePatch - the host's whole-file reverse patch, when it served one
42450
+ * (see `ChangeSet.filePatch`); '' / missing = nothing to revert as a whole.
42215
42451
  * @returns the mark set the editor paints, or {@link EMPTY_CHANGE_SET}.
42216
42452
  */
42217
- function changeSetFromHunks(hunks, stamp) {
42453
+ function changeSetFromHunks(hunks, stamp, filePatch) {
42218
42454
  if (hunks.length === 0) return {
42219
42455
  marks: [],
42220
42456
  hunks: [],
@@ -42238,7 +42474,8 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
42238
42474
  marks,
42239
42475
  hunks: [...new Set(order.map((anchor) => anchor.line))],
42240
42476
  stamp,
42241
- patches
42477
+ patches,
42478
+ ...filePatch === void 0 || filePatch === "" ? {} : { filePatch }
42242
42479
  };
42243
42480
  }
42244
42481
  //#endregion
@@ -42253,6 +42490,91 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
42253
42490
  return current;
42254
42491
  }
42255
42492
  //#endregion
42493
+ //#region src/client/changes/undo-target.ts
42494
+ /** True when `child` is at/inside `parent` (POSIX, trailing-slash tolerant). */
42495
+ function underRoot(parent, child) {
42496
+ const root = parent.length > 1 && parent.endsWith("/") ? parent.replace(/\/+$/, "") : parent;
42497
+ if (root === "/") return child.startsWith("/");
42498
+ return child === root || child.startsWith(`${root}/`);
42499
+ }
42500
+ /**
42501
+ * Decide whether a revert may run, and with which coordinates.
42502
+ *
42503
+ * @param input.origin - provenance recorded when the marks were attached.
42504
+ * @param input.tabPath - the tab's absolute remote path (the file the patch names).
42505
+ * @param input.panelSessionId - the session whose panel is on screen right now.
42506
+ * @param input.bindings - the live binding table (`remoteOpenBindings()`).
42507
+ */
42508
+ function resolveUndoTarget(input) {
42509
+ const { origin, tabPath, panelSessionId, bindings } = input;
42510
+ if (origin === void 0) return {
42511
+ ok: false,
42512
+ reason: "no-origin"
42513
+ };
42514
+ if (panelSessionId === void 0 || panelSessionId === "" || origin.sessionId !== panelSessionId) return {
42515
+ ok: false,
42516
+ reason: "session-mismatch"
42517
+ };
42518
+ const binding = bindings.find((candidate) => candidate.id === origin.bindingId);
42519
+ if (binding === void 0) return {
42520
+ ok: false,
42521
+ reason: "binding-gone"
42522
+ };
42523
+ if (binding.alias !== origin.alias) return {
42524
+ ok: false,
42525
+ reason: "binding-changed"
42526
+ };
42527
+ if (!underRoot(binding.remotePath, origin.root)) return {
42528
+ ok: false,
42529
+ reason: "binding-changed"
42530
+ };
42531
+ if (tabPath === "" || !underRoot(origin.root, tabPath)) return {
42532
+ ok: false,
42533
+ reason: "path-outside"
42534
+ };
42535
+ return {
42536
+ ok: true,
42537
+ origin
42538
+ };
42539
+ }
42540
+ /** Ceiling on tracked tabs (a long-lived page must not grow this map forever). */
42541
+ const ORIGIN_CAP = 500;
42542
+ /** tabId -> provenance, written when marks are attached, read when publishing. */
42543
+ const origins = /* @__PURE__ */ new Map();
42544
+ /** Record where one tab's marks came from (called by the change panel). */
42545
+ function rememberChangeOrigin(tabId, origin) {
42546
+ if (tabId === "") return;
42547
+ origins.delete(tabId);
42548
+ if (origins.size >= ORIGIN_CAP) {
42549
+ const oldest = origins.keys().next().value;
42550
+ if (oldest !== void 0) origins.delete(oldest);
42551
+ }
42552
+ origins.set(tabId, origin);
42553
+ }
42554
+ /** Drop one tab's provenance (marks cleared, file closed, diff failed). */
42555
+ function forgetChangeOrigin(tabId) {
42556
+ origins.delete(tabId);
42557
+ }
42558
+ /** Provenance recorded for one tab, if any. */
42559
+ function changeOriginForTab(tabId) {
42560
+ return tabId === void 0 ? void 0 : origins.get(tabId);
42561
+ }
42562
+ /**
42563
+ * The value the undo slot should hold for the tab currently on screen: the tab's
42564
+ * own validated provenance, or `undefined` (which makes undo refuse, never guess).
42565
+ */
42566
+ function publishableUndoOrigin(input) {
42567
+ const origin = changeOriginForTab(input.tabId);
42568
+ if (origin === void 0 || input.tabPath === void 0) return void 0;
42569
+ const resolved = resolveUndoTarget({
42570
+ origin,
42571
+ tabPath: input.tabPath,
42572
+ panelSessionId: input.panelSessionId,
42573
+ bindings: input.bindings
42574
+ });
42575
+ return resolved.ok ? resolved.origin : void 0;
42576
+ }
42577
+ //#endregion
42256
42578
  //#region src/client/scm/status-map.ts
42257
42579
  /** True for a merge-conflict pair (UU/AA/DD/AU/UA/DU/UD). */
42258
42580
  function isConflictStatus(x, y) {
@@ -44858,6 +45180,7 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
44858
45180
  gotoChange,
44859
45181
  markChangeStale,
44860
45182
  undoChange,
45183
+ revertFileChanges,
44861
45184
  saveTab,
44862
45185
  dismissConflict,
44863
45186
  reloadTab,
@@ -46361,7 +46684,31 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
46361
46684
  });
46362
46685
  markLiveEditorSaved(id, text);
46363
46686
  toast(`${t("editor.saved")} · ${target.rel}`, false);
46364
- await afterWrite();
46687
+ /**
46688
+ * The write is DONE, and the save result must not include a remote git read.
46689
+ *
46690
+ * `afterWrite()` re-reads `git status` and only then re-lists the tree. On a
46691
+ * monorepo that read is the expensive half (the SCM panel shows the same cost:
46692
+ * seconds, and minutes when the tree is cold), and awaiting it here made the
46693
+ * editor's "saving…" last exactly that long — which is what "saving is slow,
46694
+ * it refreshes git first" looks like from the outside. Nothing the save
46695
+ * REPORTS depends on it: the baseline advances from the write's own answer
46696
+ * above, and the dirty flag is re-derived synchronously.
46697
+ *
46698
+ * So it runs in the background. It still runs — the status marks and the tree
46699
+ * revision catch up when it lands — and the read queue collapses a burst of
46700
+ * saves into at most one follow-up walk (`ReadQueue.run(..., 'fresh')`).
46701
+ */
46702
+ afterWrite();
46703
+ /**
46704
+ * The save just changed what this file looks like against the session
46705
+ * baseline, so the marks painted from the PREVIOUS bytes are gone (typing
46706
+ * invalidates them by design) — and nothing used to bring them back until the
46707
+ * user clicked the row in the change panel again. Re-fetch them from the tab's
46708
+ * own recorded provenance, which needs no panel interaction. Also background:
46709
+ * it is one more remote read that must not stand between the user and "saved".
46710
+ */
46711
+ refreshChangeSetForTab(id);
46365
46712
  return true;
46366
46713
  } catch (error) {
46367
46714
  /**
@@ -46624,7 +46971,7 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
46624
46971
  applyChangeSet(tabId, null);
46625
46972
  return;
46626
46973
  }
46627
- applyChangeSet(tabId, changeSetFromHunks(diff.hunks, `${tab.fullPath}@${Date.now()}`));
46974
+ applyChangeSet(tabId, changeSetFromHunks(diff.hunks, `${tab.fullPath}@${Date.now()}`, diff.patch));
46628
46975
  } catch {
46629
46976
  applyChangeSet(tabId, null);
46630
46977
  }
@@ -46690,6 +47037,125 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
46690
47037
  info(t("changes.undone"));
46691
47038
  api.changes.list(context.sessionId, true).catch(() => void 0);
46692
47039
  }
47040
+ /**
47041
+ * Revert one file's WHOLE session change set (the panel row's action).
47042
+ *
47043
+ * Three things make this a separate path from `undoChange`, and each one is
47044
+ * load-bearing:
47045
+ *
47046
+ * 1. **It works without an open tab.** The panel lists files nobody opened, so
47047
+ * the coordinates cannot come from `undoContext()` (which describes the tab on
47048
+ * screen). They arrive with the call and are validated by the SAME rules
47049
+ * (`resolveUndoTarget`: session agreement, binding identity, path under the
47050
+ * ledger root) — a row from another conversation, or from a sibling binding
47051
+ * that happens to share the alias, is refused rather than guessed.
47052
+ * 2. **It is ONE remote write.** The host serves the file as a single patch, which
47053
+ * is exactly what `git apply -R` needs to restore the session baseline; a loop
47054
+ * of per-hunk applies would shift every later hunk and report a conflict
47055
+ * halfway through, leaving the file half reverted.
47056
+ * 3. **A creation is not a patch.** `mode: 'delete'` (a tracked addition, where
47057
+ * git still holds the bytes) deletes the file behind an explicit confirmation;
47058
+ * an untracked creation never reaches here, because the host offers no mode
47059
+ * for it.
47060
+ *
47061
+ * The order of the gates is the one `undoChange` established: an unsaved buffer
47062
+ * refuses first (a remote write must never overwrite what the user has not
47063
+ * saved), then the offline check, then the coordinates, then the patch.
47064
+ *
47065
+ * @returns whether the remote was actually written.
47066
+ */
47067
+ async function revertFileChanges(target) {
47068
+ const tab = state.tabs.find((item) => item.kind === "file" && item.fullPath === target.path);
47069
+ if (tab?.dirty === true) {
47070
+ info(t("changes.undoDirty"));
47071
+ return false;
47072
+ }
47073
+ if (connectionStateOf(target.alias) === "error") {
47074
+ info(t("connection.actionFailed"));
47075
+ return false;
47076
+ }
47077
+ /**
47078
+ * The session check inside `resolveUndoTarget` is trivially true here (the panel
47079
+ * passed both ids), and that is fine: the panel can only hand over a row from the
47080
+ * summary it fetched FOR this session (`data.id === sessionId`). What this call
47081
+ * really answers is the part the panel cannot know: is that binding still the
47082
+ * same one (id + alias), and does this path still sit under the ledger root the
47083
+ * patch was computed against?
47084
+ */
47085
+ const resolved = resolveUndoTarget({
47086
+ origin: {
47087
+ sessionId: target.sessionId,
47088
+ bindingId: target.bindingId,
47089
+ alias: target.alias,
47090
+ root: target.root
47091
+ },
47092
+ tabPath: target.path,
47093
+ panelSessionId: target.sessionId,
47094
+ bindings: remoteOpenBindings().bindings
47095
+ });
47096
+ if (!resolved.ok) {
47097
+ info(t("changes.undoNoContext"));
47098
+ return false;
47099
+ }
47100
+ try {
47101
+ if (target.mode === "patch") {
47102
+ const diff = await api.changes.diff(target.sessionId, target.path);
47103
+ const patch = diff !== null && diff.kind === "text" ? diff.patch ?? "" : "";
47104
+ if (patch.trim() === "") {
47105
+ info(t("changes.undoMissing"));
47106
+ return false;
47107
+ }
47108
+ await applyHunk(target.alias, target.root, patch, "revert");
47109
+ } else {
47110
+ if (!await confirmDialog({
47111
+ title: t("changes.revertCreationTitle"),
47112
+ text: t("changes.revertCreationText").replace("{path}", target.display),
47113
+ danger: true,
47114
+ okText: t("changes.revertCreationOk")
47115
+ })) return false;
47116
+ await api.fileOp.rm(target.alias, target.path, false);
47117
+ }
47118
+ } catch (error) {
47119
+ if (isConnectionFailure(error)) {
47120
+ info(t("connection.actionFailed"));
47121
+ return false;
47122
+ }
47123
+ const detail = error instanceof Error ? error.message.trim() : String(error).trim();
47124
+ const label = target.mode === "delete" ? t("changes.revertFailed") : t("changes.undoConflict");
47125
+ info(detail === "" ? label : `${label} · ${detail}`);
47126
+ return false;
47127
+ }
47128
+ /**
47129
+ * The write SUCCEEDED, so nothing below may be reported as a failure: the
47130
+ * remote file has already changed. Refreshing the tab and the list is best
47131
+ * effort — a read that fails here leaves a stale panel, not a lost revert.
47132
+ */
47133
+ try {
47134
+ const live = state.tabs.find((item) => item.id === (tab?.id ?? ""));
47135
+ if (target.mode === "delete") {
47136
+ if (live !== void 0) closeTab(live.id);
47137
+ } else if (live !== void 0) {
47138
+ await reloadTab(live.id);
47139
+ await refreshChangeSet(live.id, resolved.origin);
47140
+ }
47141
+ } catch {}
47142
+ api.changes.list(target.sessionId, true).catch(() => void 0);
47143
+ info(target.mode === "delete" ? t("changes.deletedCreation") : t("changes.revertedFile"));
47144
+ return true;
47145
+ }
47146
+ /**
47147
+ * Re-read one tab's change marks from the provenance recorded for it.
47148
+ *
47149
+ * Used after a successful save: typing invalidates the painted marks by design
47150
+ * (see `change-marks.ts`), and without this the file would keep its "positions
47151
+ * stale" badge until the user clicked the row again. A tab nobody attached marks
47152
+ * to has no provenance, so this is a no-op for every file opened from the tree.
47153
+ */
47154
+ function refreshChangeSetForTab(tabId) {
47155
+ const origin = changeOriginForTab(tabId);
47156
+ if (origin === void 0) return;
47157
+ refreshChangeSet(tabId, origin);
47158
+ }
46693
47159
  /** Mount-time hook: boot the store for a given ctx. */
46694
47160
  function useBootstrap(ctx) {
46695
47161
  (0, react.useEffect)(() => {
@@ -48814,8 +49280,8 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
48814
49280
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ConnectionStatusChip, { compact: true }),
48815
49281
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
48816
49282
  className: "rvs-build",
48817
- title: `dsh-remote-vs build 1112-1650`,
48818
- children: "1112-1650"
49283
+ title: `dsh-remote-vs build 1118-1711`,
49284
+ children: "1118-1711"
48819
49285
  }),
48820
49286
  tokenCount !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
48821
49287
  className: "rvs-build",
@@ -74872,94 +75338,101 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
74872
75338
  })
74873
75339
  })] });
74874
75340
  }
74875
- //#endregion
74876
- //#region src/client/changes/undo-target.ts
74877
- /** True when `child` is at/inside `parent` (POSIX, trailing-slash tolerant). */
74878
- function underRoot(parent, child) {
74879
- const root = parent.length > 1 && parent.endsWith("/") ? parent.replace(/\/+$/, "") : parent;
74880
- if (root === "/") return child.startsWith("/");
74881
- return child === root || child.startsWith(`${root}/`);
74882
- }
74883
75341
  /**
74884
- * Decide whether a revert may run, and with which coordinates.
75342
+ * 一行的审阅键。
74885
75343
  *
74886
- * @param input.origin - provenance recorded when the marks were attached.
74887
- * @param input.tabPath - the tab's absolute remote path (the file the patch names).
74888
- * @param input.panelSessionId - the session whose panel is on screen right now.
74889
- * @param input.bindings - the live binding table (`remoteOpenBindings()`).
75344
+ * 计数进键里是刻意的:见文件头。`status` 也进键,因为"删掉了又加回来"和"一直在改"
75345
+ * 是两件不同的事,标签变了就该重新看一遍。
75346
+ *
75347
+ * @param file - 面板的一行。
75348
+ * @returns 稳定的键(路径里可能有任意字符,用 NUL 分隔不会与计数撞)。
74890
75349
  */
74891
- function resolveUndoTarget(input) {
74892
- const { origin, tabPath, panelSessionId, bindings } = input;
74893
- if (origin === void 0) return {
74894
- ok: false,
74895
- reason: "no-origin"
74896
- };
74897
- if (panelSessionId === void 0 || panelSessionId === "" || origin.sessionId !== panelSessionId) return {
74898
- ok: false,
74899
- reason: "session-mismatch"
74900
- };
74901
- const binding = bindings.find((candidate) => candidate.id === origin.bindingId);
74902
- if (binding === void 0) return {
74903
- ok: false,
74904
- reason: "binding-gone"
74905
- };
74906
- if (binding.alias !== origin.alias) return {
74907
- ok: false,
74908
- reason: "binding-changed"
74909
- };
74910
- if (!underRoot(binding.remotePath, origin.root)) return {
74911
- ok: false,
74912
- reason: "binding-changed"
74913
- };
74914
- if (tabPath === "" || !underRoot(origin.root, tabPath)) return {
74915
- ok: false,
74916
- reason: "path-outside"
74917
- };
74918
- return {
74919
- ok: true,
74920
- origin
74921
- };
75350
+ function reviewKeyOf(file) {
75351
+ return `${file.path}\u0000${file.added}\u0000${file.deleted}\u0000${file.status ?? ""}`;
74922
75352
  }
74923
- /** Ceiling on tracked tabs (a long-lived page must not grow this map forever). */
74924
- const ORIGIN_CAP = 500;
74925
- /** tabId -> provenance, written when marks are attached, read when publishing. */
74926
- const origins = /* @__PURE__ */ new Map();
74927
- /** Record where one tab's marks came from (called by the change panel). */
74928
- function rememberChangeOrigin(tabId, origin) {
74929
- if (tabId === "") return;
74930
- origins.delete(tabId);
74931
- if (origins.size >= ORIGIN_CAP) {
74932
- const oldest = origins.keys().next().value;
74933
- if (oldest !== void 0) origins.delete(oldest);
74934
- }
74935
- origins.set(tabId, origin);
75353
+ /** 这一行是否已被标为审阅。 */
75354
+ function isReviewed(file, reviewed) {
75355
+ return reviewed[reviewKeyOf(file)] === 1;
74936
75356
  }
74937
- /** Drop one tab's provenance (marks cleared, file closed, diff failed). */
74938
- function forgetChangeOrigin(tabId) {
74939
- origins.delete(tabId);
75357
+ /** 已审阅的行数(只数当前列表里的,所以它永远 ≤ 列表长度)。 */
75358
+ function reviewedCount(files, reviewed) {
75359
+ let count = 0;
75360
+ for (const file of files) if (isReviewed(file, reviewed)) count += 1;
75361
+ return count;
74940
75362
  }
74941
- /** Provenance recorded for one tab, if any. */
74942
- function changeOriginForTab(tabId) {
74943
- return tabId === void 0 ? void 0 : origins.get(tabId);
75363
+ /** 切换一行的标记,返回新表(输入不被修改)。 */
75364
+ function toggleReviewed(files, reviewed, file) {
75365
+ const key = reviewKeyOf(file);
75366
+ const next = {};
75367
+ for (const [candidate, value] of Object.entries(reviewed)) next[candidate] = value;
75368
+ if (next[key] === 1) delete next[key];
75369
+ else next[key] = 1;
75370
+ return pruneReviewed(files, next);
75371
+ }
75372
+ /** 全标或全清。 */
75373
+ function setAllReviewed(files, on) {
75374
+ if (!on) return {};
75375
+ const next = {};
75376
+ for (const file of files) {
75377
+ if (next[reviewKeyOf(file)] === 1) continue;
75378
+ next[reviewKeyOf(file)] = 1;
75379
+ if (Object.keys(next).length >= 1e3) break;
75380
+ }
75381
+ return next;
74944
75382
  }
74945
75383
  /**
74946
- * The value the undo slot should hold for the tab currently on screen: the tab's
74947
- * own validated provenance, or `undefined` (which makes undo refuse, never guess).
75384
+ * 丢掉不属于当前列表的键。
75385
+ *
75386
+ * 列表每 3 秒重建一次,一条被删掉(或计数变了)的键如果留着,下次同一路径回到列表
75387
+ * 时会被当成"已审阅"——那是凭空出现的勾。清理放在每次写入与每次加载后都做,代价是
75388
+ * O(列表长度)。
74948
75389
  */
74949
- function publishableUndoOrigin(input) {
74950
- const origin = changeOriginForTab(input.tabId);
74951
- if (origin === void 0 || input.tabPath === void 0) return void 0;
74952
- const resolved = resolveUndoTarget({
74953
- origin,
74954
- tabPath: input.tabPath,
74955
- panelSessionId: input.panelSessionId,
74956
- bindings: input.bindings
74957
- });
74958
- return resolved.ok ? resolved.origin : void 0;
75390
+ function pruneReviewed(files, reviewed) {
75391
+ const live = new Set(files.map((file) => reviewKeyOf(file)));
75392
+ const next = {};
75393
+ let kept = 0;
75394
+ for (const [key, value] of Object.entries(reviewed)) {
75395
+ if (value !== 1 || !live.has(key)) continue;
75396
+ next[key] = 1;
75397
+ kept += 1;
75398
+ if (kept >= 1e3) break;
75399
+ }
75400
+ return next;
75401
+ }
75402
+ /**
75403
+ * 解析持久化的一串 JSON。
75404
+ *
75405
+ * 任何畸形输入都给空表而不是抛错:这份状态是"看过没看过",读不出来最多重看一遍,
75406
+ * 不值得让面板崩掉。键必须是字符串、值必须是 1,且受 {@link REVIEW_CAP} 限制。
75407
+ *
75408
+ * @param raw - `localStorage` 里存着的那串文本(可能为 null)。
75409
+ */
75410
+ function parseReviewed(raw) {
75411
+ if (typeof raw !== "string" || raw === "") return {};
75412
+ let parsed;
75413
+ try {
75414
+ parsed = JSON.parse(raw);
75415
+ } catch {
75416
+ return {};
75417
+ }
75418
+ if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) return {};
75419
+ const next = {};
75420
+ let kept = 0;
75421
+ for (const [key, value] of Object.entries(parsed)) {
75422
+ if (value !== 1 || key === "") continue;
75423
+ next[key] = 1;
75424
+ kept += 1;
75425
+ if (kept >= 1e3) break;
75426
+ }
75427
+ return next;
75428
+ }
75429
+ /** 序列化(键数量已受上限约束,所以这串不会无限长)。 */
75430
+ function serializeReviewed(reviewed) {
75431
+ return JSON.stringify(reviewed);
74959
75432
  }
74960
75433
  //#endregion
74961
75434
  //#region \0dsh-css:src/client/changes/changes.css.mjs
74962
- const css = "/**\n * Session change panel (above the composer).\n *\n * Scoped under `.rvs-changes` — this surface renders OUTSIDE `.rvs-root` (it is\n * a composer dock, not part of the explorer), so it cannot borrow that block's\n * custom properties and states every colour with a shell token plus a literal\n * fallback. Light theme is the `body:not([data-ds-dark-theme])` override, the\n * same convention the rest of this plugin's stylesheet uses.\n */\n\n.rvs-changes {\n --rvs-chg-fg: var(--dsw-alias-label-primary, #e6e6e6);\n --rvs-chg-fg2: var(--dsw-alias-label-secondary, #b9b9b9);\n --rvs-chg-fg3: var(--dsw-alias-label-tertiary, #8b8b8b);\n --rvs-chg-border: var(--dsw-alias-border-l1, rgba(127, 127, 127, .28));\n --rvs-chg-hover: var(--dsw-alias-interactive-bg-hover, rgba(127, 127, 127, .14));\n --rvs-chg-surface: var(--dsw-alias-bg-layer-2, rgba(127, 127, 127, .07));\n --rvs-chg-add: #4ec9b0;\n --rvs-chg-del: #f14c4c;\n --rvs-chg-mod: #e2b714;\n --rvs-chg-info: #58a6ff;\n\n box-sizing: border-box;\n /*\n * 与输入卡左右对齐。\n *\n * 这个面板是 composerStack 的直接子元素,而输入卡住在自己的包装层里\n * (`.uV2eYG_root`:左右各 `--dsh-composer-side-clearance`),卡片本身\n * `width:100%; max-width: var(--dsh-composer-card-max-width)` 且居中。所以这里\n * 必须自己把那圈内缩和上限抄一遍,否则就是「面板通栏、输入卡内缩」。\n * 两个变量都由 shell 定义在 `.wSkVaW_body` 上(嵌入态有另一组值),回退值只\n * 兜住宿主没有这套变量的老版本。\n */\n width: calc(100% - 2 * var(--dsh-composer-side-clearance, 16px));\n max-width: var(--dsh-composer-card-max-width, 920px);\n /* composerStack 本身已有 gap,这里不要再叠下边距。 */\n margin: 0 auto;\n border: 1px solid var(--rvs-chg-border);\n border-radius: 8px;\n background-color: var(--rvs-chg-surface);\n color: var(--rvs-chg-fg);\n font-size: 12px;\n line-height: 20px;\n overflow: hidden;\n}\n\n.rvs-changes-head {\n display: flex;\n align-items: center;\n gap: 8px;\n min-height: 28px;\n padding: 2px 6px 2px 4px;\n}\n\n.rvs-changes-toggle {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n min-width: 0;\n padding: 2px 4px;\n border: none;\n border-radius: 5px;\n background: transparent;\n color: inherit;\n font: inherit;\n cursor: pointer;\n}\n\n.rvs-changes-toggle:hover { background-color: var(--rvs-chg-hover); }\n\n.rvs-changes-chevron {\n width: 10px;\n color: var(--rvs-chg-fg3);\n font-size: 10px;\n}\n\n.rvs-changes-title {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-changes-totals,\n.rvs-chg-counts {\n display: inline-flex;\n gap: 6px;\n font-variant-numeric: tabular-nums;\n font-size: 11px;\n}\n\n.rvs-chg-add { color: var(--rvs-chg-add); }\n.rvs-chg-del { color: var(--rvs-chg-del); }\n\n.rvs-changes-pending,\n.rvs-changes-stale {\n color: var(--rvs-chg-fg3);\n font-size: 11px;\n white-space: nowrap;\n}\n\n.rvs-changes-stale { color: var(--rvs-chg-mod); }\n\n.rvs-changes-spacer { flex: 1 1 auto; }\n\n.rvs-changes-nav {\n display: inline-flex;\n gap: 2px;\n}\n\n.rvs-changes-nav button,\n.rvs-changes-refresh {\n width: 20px;\n height: 20px;\n padding: 0;\n border: none;\n border-radius: 4px;\n background: transparent;\n color: var(--rvs-chg-fg2);\n font-size: 12px;\n line-height: 20px;\n text-align: center;\n cursor: pointer;\n}\n\n.rvs-changes-nav button:hover,\n.rvs-changes-refresh:hover {\n background-color: var(--rvs-chg-hover);\n color: var(--rvs-chg-fg);\n}\n\n.rvs-changes-body {\n display: flex;\n flex-direction: column;\n max-height: 216px;\n overflow-y: auto;\n padding: 0 4px 4px;\n}\n\n/*\n * One file per row: type icon, path, counts at the far right.\n *\n * Every part is nowrap and the path is the only flexible one, so a long remote\n * path ellipsizes in the middle of the row instead of pushing the counts out of\n * view or wrapping the row into a paragraph (which is what a row of inline\n * <button>s does without this rule).\n */\n.rvs-chg-row {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n gap: 6px;\n width: 100%;\n min-height: 24px;\n padding: 1px 6px;\n border: none;\n border-radius: 5px;\n background: transparent;\n color: inherit;\n font: inherit;\n line-height: 18px;\n text-align: left;\n white-space: nowrap;\n cursor: pointer;\n}\n\n.rvs-chg-row:hover { background-color: var(--rvs-chg-hover); }\n\n.rvs-chg-row.rvs-chg-loading { opacity: .55; }\n\n/* File-type icon: the host's icon theme when the shell provides one, else the\n plugin's own SVG set (see vsc/kit.tsx FileIcon). */\n.rvs-chg-icon {\n display: inline-flex;\n flex: 0 0 auto;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n}\n\n.rvs-chg-path {\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n /* Paths are remote POSIX spellings: keep the leading slash where it belongs\n even in a container whose direction the host skin may have changed. */\n unicode-bidi: plaintext;\n}\n\n.rvs-chg-dir { color: var(--rvs-chg-fg3); }\n\n.rvs-chg-name { color: var(--rvs-chg-fg); }\n\n.rvs-chg-counts {\n display: inline-flex;\n flex: 0 0 auto;\n gap: 8px;\n margin-left: auto;\n font-size: 11px;\n font-variant-numeric: tabular-nums;\n}\n\n/* \"binary\" / \"too large\": the two cases where no line counts exist. */\n.rvs-chg-note {\n color: var(--rvs-chg-fg3);\n font-size: 11px;\n}\n\n.rvs-changes-note {\n padding: 4px 6px;\n color: var(--rvs-chg-fg3);\n font-size: 11px;\n}\n\n.rvs-changes-error { color: var(--rvs-chg-del); }\n\nbody:not([data-ds-dark-theme]) .rvs-changes {\n --rvs-chg-fg: var(--dsw-alias-label-primary, #1f2328);\n --rvs-chg-fg2: var(--dsw-alias-label-secondary, #4d5358);\n --rvs-chg-fg3: var(--dsw-alias-label-tertiary, #6e7781);\n --rvs-chg-border: var(--dsw-alias-border-l1, rgba(31, 35, 40, .16));\n --rvs-chg-hover: var(--dsw-alias-interactive-bg-hover, rgba(31, 35, 40, .07));\n --rvs-chg-surface: var(--dsw-alias-bg-layer-2, rgba(31, 35, 40, .04));\n --rvs-chg-add: #1a7f37;\n --rvs-chg-del: #cf222e;\n --rvs-chg-mod: #9a6700;\n --rvs-chg-info: #0969da;\n}\n";
75435
+ const css = "/**\n * Session change panel (above the composer).\n *\n * Scoped under `.rvs-changes` — this surface renders OUTSIDE `.rvs-root` (it is\n * a composer dock, not part of the explorer), so it cannot borrow that block's\n * custom properties and states every colour with a shell token plus a literal\n * fallback. Light theme is the `body:not([data-ds-dark-theme])` override, the\n * same convention the rest of this plugin's stylesheet uses.\n */\n\n.rvs-changes {\n --rvs-chg-fg: var(--dsw-alias-label-primary, #e6e6e6);\n --rvs-chg-fg2: var(--dsw-alias-label-secondary, #b9b9b9);\n --rvs-chg-fg3: var(--dsw-alias-label-tertiary, #8b8b8b);\n --rvs-chg-border: var(--dsw-alias-border-l1, rgba(127, 127, 127, .28));\n --rvs-chg-hover: var(--dsw-alias-interactive-bg-hover, rgba(127, 127, 127, .14));\n --rvs-chg-surface: var(--dsw-alias-bg-layer-2, rgba(127, 127, 127, .07));\n --rvs-chg-add: #4ec9b0;\n --rvs-chg-del: #f14c4c;\n --rvs-chg-mod: #e2b714;\n --rvs-chg-info: #58a6ff;\n\n box-sizing: border-box;\n /*\n * 与输入卡左右对齐。\n *\n * 这个面板是 composerStack 的直接子元素,而输入卡住在自己的包装层里\n * (`.uV2eYG_root`:左右各 `--dsh-composer-side-clearance`),卡片本身\n * `width:100%; max-width: var(--dsh-composer-card-max-width)` 且居中。所以这里\n * 必须自己把那圈内缩和上限抄一遍,否则就是「面板通栏、输入卡内缩」。\n * 两个变量都由 shell 定义在 `.wSkVaW_body` 上(嵌入态有另一组值),回退值只\n * 兜住宿主没有这套变量的老版本。\n */\n width: calc(100% - 2 * var(--dsh-composer-side-clearance, 16px));\n max-width: var(--dsh-composer-card-max-width, 920px);\n /* composerStack 本身已有 gap,这里不要再叠下边距。 */\n margin: 0 auto;\n border: 1px solid var(--rvs-chg-border);\n border-radius: 8px;\n background-color: var(--rvs-chg-surface);\n color: var(--rvs-chg-fg);\n font-size: 12px;\n line-height: 20px;\n overflow: hidden;\n}\n\n.rvs-changes-head {\n display: flex;\n align-items: center;\n gap: 8px;\n min-height: 28px;\n padding: 2px 6px 2px 4px;\n}\n\n.rvs-changes-toggle {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n min-width: 0;\n padding: 2px 4px;\n border: none;\n border-radius: 5px;\n background: transparent;\n color: inherit;\n font: inherit;\n cursor: pointer;\n}\n\n.rvs-changes-toggle:hover { background-color: var(--rvs-chg-hover); }\n\n.rvs-changes-chevron {\n width: 10px;\n color: var(--rvs-chg-fg3);\n font-size: 10px;\n}\n\n.rvs-changes-title {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-changes-totals,\n.rvs-chg-counts {\n display: inline-flex;\n gap: 6px;\n font-variant-numeric: tabular-nums;\n font-size: 11px;\n}\n\n.rvs-chg-add { color: var(--rvs-chg-add); }\n.rvs-chg-del { color: var(--rvs-chg-del); }\n\n.rvs-changes-pending,\n.rvs-changes-stale {\n color: var(--rvs-chg-fg3);\n font-size: 11px;\n white-space: nowrap;\n}\n\n.rvs-changes-stale { color: var(--rvs-chg-mod); }\n\n.rvs-changes-spacer { flex: 1 1 auto; }\n\n.rvs-changes-nav {\n display: inline-flex;\n gap: 2px;\n}\n\n.rvs-changes-nav button,\n.rvs-changes-refresh {\n width: 20px;\n height: 20px;\n padding: 0;\n border: none;\n border-radius: 4px;\n background: transparent;\n color: var(--rvs-chg-fg2);\n font-size: 12px;\n line-height: 20px;\n text-align: center;\n cursor: pointer;\n}\n\n.rvs-changes-nav button:hover,\n.rvs-changes-refresh:hover {\n background-color: var(--rvs-chg-hover);\n color: var(--rvs-chg-fg);\n}\n\n.rvs-changes-body {\n display: flex;\n flex-direction: column;\n max-height: 216px;\n overflow-y: auto;\n padding: 0 4px 4px;\n}\n\n/*\n * One file per row: status letter, type icon, path, counts, review toggle.\n *\n * The row is a flex CONTAINER holding two buttons (open + review): a whole-row\n * <button> cannot legally contain the toggle, and clicking the toggle must not\n * also open the file. Every part is nowrap and the path is the only flexible\n * one, so a long remote path ellipsizes in the middle of the row instead of\n * pushing the counts out of view or wrapping the row into a paragraph.\n */\n.rvs-chg-row {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n width: 100%;\n min-width: 0;\n border-radius: 5px;\n}\n\n.rvs-chg-row:hover { background-color: var(--rvs-chg-hover); }\n\n.rvs-chg-row.rvs-chg-loading { opacity: .55; }\n\n/* Reviewed rows recede a little, but hover brings them back to full contrast so\n a row is never unreadable at the moment the user is about to act on it. */\n.rvs-chg-row[data-reviewed='1']:not(:hover) .rvs-chg-open { opacity: .58; }\n\n.rvs-chg-open {\n display: flex;\n flex: 1 1 auto;\n align-items: center;\n gap: 6px;\n min-width: 0;\n min-height: 24px;\n padding: 1px 4px 1px 6px;\n border: none;\n border-radius: 5px;\n background: transparent;\n color: inherit;\n font: inherit;\n line-height: 18px;\n text-align: left;\n white-space: nowrap;\n cursor: pointer;\n}\n\n/*\n * Review toggle. Hidden until the row is hovered (or focused by keyboard) so the\n * list stays quiet, and always visible once the mark is ON — that ✓ is the only\n * evidence the mark exists.\n */\n.rvs-chg-review {\n flex: 0 0 auto;\n width: 18px;\n height: 18px;\n margin-right: 2px;\n padding: 0;\n border: none;\n border-radius: 4px;\n background: transparent;\n color: var(--rvs-chg-fg3);\n font-size: 11px;\n line-height: 18px;\n text-align: center;\n cursor: pointer;\n opacity: 0;\n}\n\n.rvs-chg-row:hover .rvs-chg-review,\n.rvs-chg-review:focus-visible,\n.rvs-chg-review.is-on { opacity: 1; }\n\n.rvs-chg-review:hover { background-color: var(--rvs-chg-hover); color: var(--rvs-chg-fg); }\n\n.rvs-chg-review.is-on { color: var(--rvs-chg-add); }\n\n/*\n * Status letter (A/M/D/R/C/T/U).\n *\n * A one-character column instead of a second tooltip: the row already shows the\n * counts, and \"was this file added, deleted or renamed\" is the other question a\n * reviewer asks. Colour follows the same vocabulary as the diff marks.\n */\n.rvs-chg-status {\n flex: 0 0 auto;\n width: 10px;\n font-variant-numeric: tabular-nums;\n font-size: 10px;\n font-weight: 600;\n text-align: center;\n color: var(--rvs-chg-fg3);\n}\n\n.rvs-chg-status[data-status='A'] { color: var(--rvs-chg-add); }\n.rvs-chg-status[data-status='M'] { color: var(--rvs-chg-mod); }\n.rvs-chg-status[data-status='D'] { color: var(--rvs-chg-del); }\n.rvs-chg-status[data-status='R'] { color: var(--rvs-chg-info); }\n.rvs-chg-status[data-status='C'] { color: var(--rvs-chg-info); }\n.rvs-chg-status[data-status='U'] { color: var(--rvs-chg-del); }\n\n/* The reviewed counter in the header doubles as the mark-all / clear menu. */\n.rvs-changes-reviewed {\n flex: 0 0 auto;\n padding: 0 5px;\n height: 18px;\n border: none;\n border-radius: 9px;\n background: transparent;\n color: var(--rvs-chg-fg3);\n font: inherit;\n font-size: 11px;\n font-variant-numeric: tabular-nums;\n line-height: 18px;\n white-space: nowrap;\n cursor: pointer;\n}\n\n.rvs-changes-reviewed:hover {\n background-color: var(--rvs-chg-hover);\n color: var(--rvs-chg-fg);\n}\n\n/* File-type icon: the host's icon theme when the shell provides one, else the\n plugin's own SVG set (see vsc/kit.tsx FileIcon). */\n.rvs-chg-icon {\n display: inline-flex;\n flex: 0 0 auto;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n}\n\n.rvs-chg-path {\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n /* Paths are remote POSIX spellings: keep the leading slash where it belongs\n even in a container whose direction the host skin may have changed. */\n unicode-bidi: plaintext;\n}\n\n.rvs-chg-dir { color: var(--rvs-chg-fg3); }\n\n.rvs-chg-name { color: var(--rvs-chg-fg); }\n\n.rvs-chg-counts {\n display: inline-flex;\n flex: 0 0 auto;\n gap: 8px;\n margin-left: auto;\n font-size: 11px;\n font-variant-numeric: tabular-nums;\n}\n\n/* \"binary\" / \"too large\": the two cases where no line counts exist. */\n.rvs-chg-note {\n color: var(--rvs-chg-fg3);\n font-size: 11px;\n}\n\n.rvs-changes-note {\n padding: 4px 6px;\n color: var(--rvs-chg-fg3);\n font-size: 11px;\n}\n\n.rvs-changes-error { color: var(--rvs-chg-del); }\n\nbody:not([data-ds-dark-theme]) .rvs-changes {\n --rvs-chg-fg: var(--dsw-alias-label-primary, #1f2328);\n --rvs-chg-fg2: var(--dsw-alias-label-secondary, #4d5358);\n --rvs-chg-fg3: var(--dsw-alias-label-tertiary, #6e7781);\n --rvs-chg-border: var(--dsw-alias-border-l1, rgba(31, 35, 40, .16));\n --rvs-chg-hover: var(--dsw-alias-interactive-bg-hover, rgba(31, 35, 40, .07));\n --rvs-chg-surface: var(--dsw-alias-bg-layer-2, rgba(31, 35, 40, .04));\n --rvs-chg-add: #1a7f37;\n --rvs-chg-del: #cf222e;\n --rvs-chg-mod: #9a6700;\n --rvs-chg-info: #0969da;\n}\n\n/*\n * The row / header menus opened from THIS panel.\n *\n * `ContextMenu` portals to `document.body`, so neither `.rvs-changes`' palette\n * nor the `.rvs-root` variables are in scope: the menu would come up with no\n * border and no hover feedback. The panel therefore hands the shared component\n * the four variables it reads, under this class — one menu component, one visual\n * language, and no restyling of the other surfaces' menus.\n */\n.rvs-menu-dock {\n --rvs-fg: var(--dsw-alias-label-primary, #e6e6e6);\n --rvs-hover: var(--dsw-alias-interactive-bg-hover, rgba(127, 127, 127, .14));\n --rvs-border: var(--dsw-alias-border-l1, rgba(127, 127, 127, .28));\n --rvs-border2: var(--dsw-alias-border-l2, rgba(127, 127, 127, .38));\n}\n\nbody:not([data-ds-dark-theme]) .rvs-menu-dock {\n --rvs-fg: var(--dsw-alias-label-primary, #1f2328);\n --rvs-hover: var(--dsw-alias-interactive-bg-hover, rgba(31, 35, 40, .07));\n --rvs-border: var(--dsw-alias-border-l1, rgba(31, 35, 40, .16));\n --rvs-border2: var(--dsw-alias-border-l1, rgba(31, 35, 40, .16));\n}\n";
74963
75436
  const key = "src/client/changes/changes.css";
74964
75437
  const injected = typeof document === "undefined" ? void 0 : Array.prototype.find.call(document.querySelectorAll("style[data-rvs-css]"), (tag) => tag.dataset.rvsCss === key);
74965
75438
  if (typeof document !== "undefined" && injected === void 0) {
@@ -74984,12 +75457,27 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
74984
75457
  * written with `node:fs`), which the probe measured as 58 remote sessions with
74985
75458
  * zero change events.
74986
75459
  *
74987
- * Clicking a row opens the file in the remote editor and hands the editor the
74988
- * same hunks, so the changed lines are painted in place.
75460
+ * Three things happen here, and they are deliberately different in kind:
75461
+ * - a row's LEFT click opens the file and hands the editor the same hunks, so the
75462
+ * changed lines are painted in place;
75463
+ * - a row's RIGHT click offers the writes ("revert everything this session did to
75464
+ * this file", "undo a tracked creation") plus the navigation shortcuts. The
75465
+ * host decides which of those exist (`RemoteChangedFile.revert`), because only
75466
+ * git knows whether a creation has a copy to fall back on;
75467
+ * - the ✓ on a row is a LOCAL review note (`review-state.ts`): it writes nothing,
75468
+ * it is what makes a thirty-file refactor converge.
74989
75469
  */
74990
75470
  /** How often an open panel re-reads the ledger (the host refreshes it per turn). */
74991
75471
  const POLL_MS = 3e3;
74992
75472
  /**
75473
+ * Where the review marks are remembered, per session.
75474
+ *
75475
+ * `localStorage`, like the port-forward rules: this is a note about the user's own
75476
+ * reading progress, not a fact about the remote tree, so it must survive a page
75477
+ * reload without becoming a protocol field nobody else needs.
75478
+ */
75479
+ const REVIEW_STORAGE_PREFIX = "rvs.changes.reviewed.";
75480
+ /**
74993
75481
  * How many polls between two follow retries (5 × 3 s = one probe every 15 s).
74994
75482
  *
74995
75483
  * The follow is one cheap HTTP call and it is retried until it resolves, so it
@@ -75015,6 +75503,15 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
75015
75503
  name: display.slice(at + 1)
75016
75504
  };
75017
75505
  }
75506
+ /** Read one session's review marks, tolerating a storage that refuses to answer. */
75507
+ function loadReviewed(sessionId) {
75508
+ if (sessionId === void 0 || sessionId === "") return {};
75509
+ try {
75510
+ return parseReviewed(window.localStorage.getItem(`${REVIEW_STORAGE_PREFIX}${sessionId}`));
75511
+ } catch {
75512
+ return {};
75513
+ }
75514
+ }
75018
75515
  function ChangesDock(props) {
75019
75516
  const explorer = useExplorer();
75020
75517
  (0, react.useEffect)(() => {
@@ -75034,9 +75531,13 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
75034
75531
  const [error, setError] = (0, react.useState)(void 0);
75035
75532
  const [collapsed, setCollapsed] = (0, react.useState)(true);
75036
75533
  const [busy, setBusy] = (0, react.useState)(void 0);
75534
+ /** This session's local review marks (see `review-state.ts`). */
75535
+ const [reviewed, setReviewed] = (0, react.useState)(() => loadReviewed(sessionId));
75037
75536
  const alive = (0, react.useRef)(true);
75038
75537
  const currentSession = (0, react.useRef)(sessionId);
75039
75538
  currentSession.current = sessionId;
75539
+ const rowMenu = useContextMenu();
75540
+ const reviewMenu = useContextMenu();
75040
75541
  const repoSubdirOf = () => sessionRepoSubdir(sessionId);
75041
75542
  const load = (0, react.useCallback)(async (force = false) => {
75042
75543
  if (sessionId === void 0 || sessionId === "") return;
@@ -75066,6 +75567,9 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
75066
75567
  window.clearInterval(timer);
75067
75568
  };
75068
75569
  }, [load]);
75570
+ (0, react.useEffect)(() => {
75571
+ setReviewed(loadReviewed(sessionId));
75572
+ }, [sessionId]);
75069
75573
  /**
75070
75574
  * Publish the revert coordinates for the tab the user is LOOKING AT.
75071
75575
  *
@@ -75161,6 +75665,25 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
75161
75665
  summary,
75162
75666
  chatTarget.sessionId
75163
75667
  ]);
75668
+ const files = (0, react.useMemo)(() => summary?.files ?? [], [summary]);
75669
+ /**
75670
+ * Resolve the binding a row belongs to, with one refresh for a cold page.
75671
+ *
75672
+ * The store may still be loading its workspace table on a cold page, so a miss
75673
+ * is worth one refresh before giving up.
75674
+ */
75675
+ const bindingOf = (0, react.useCallback)(async (file) => {
75676
+ if (summary === null) return void 0;
75677
+ let binding = bindingForChangedFile(remoteOpenBindings(), summary, file.path);
75678
+ if (binding === void 0) {
75679
+ refreshAll();
75680
+ await new Promise((resolve) => {
75681
+ window.setTimeout(resolve, 300);
75682
+ });
75683
+ binding = bindingForChangedFile(remoteOpenBindings(), summary, file.path);
75684
+ }
75685
+ return binding;
75686
+ }, [summary]);
75164
75687
  /** Open one listed file in the remote editor with its change marks. */
75165
75688
  const openChanged = (0, react.useCallback)(async (file) => {
75166
75689
  if (sessionId === void 0 || summary === null) return;
@@ -75169,18 +75692,11 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
75169
75692
  const diff = await api.changes.diff(sessionId, file.path, repoSubdirOf());
75170
75693
  if (!alive.current) return;
75171
75694
  const stamp = `${file.path}@${summary.at}@${summary.turn}`;
75172
- const set = diff !== null && diff.kind === "text" ? changeSetFromHunks(diff.hunks, stamp) : {
75695
+ const set = diff !== null && diff.kind === "text" ? changeSetFromHunks(diff.hunks, stamp, diff.patch) : {
75173
75696
  ...EMPTY_CHANGE_SET,
75174
75697
  stamp
75175
75698
  };
75176
- let binding = bindingForChangedFile(remoteOpenBindings(), summary, file.path);
75177
- if (binding === void 0) {
75178
- refreshAll();
75179
- await new Promise((resolve) => {
75180
- window.setTimeout(resolve, 300);
75181
- });
75182
- binding = bindingForChangedFile(remoteOpenBindings(), summary, file.path);
75183
- }
75699
+ const binding = await bindingOf(file);
75184
75700
  if (binding === void 0) {
75185
75701
  explorer.info(t("changes.noWorkspace"));
75186
75702
  return;
@@ -75201,12 +75717,124 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
75201
75717
  if (alive.current) setBusy(void 0);
75202
75718
  }
75203
75719
  }, [
75720
+ bindingOf,
75721
+ explorer,
75722
+ sessionId,
75723
+ summary,
75724
+ t
75725
+ ]);
75726
+ /**
75727
+ * Revert EVERYTHING this session did to one listed file.
75728
+ *
75729
+ * The write itself (gates, patch, confirmation, refresh) lives in the store's
75730
+ * `revertFileChanges`: it is the same class of remote write as the hover-revert
75731
+ * and must obey the same rules. This callback only resolves the coordinates the
75732
+ * row stands for.
75733
+ */
75734
+ const revertRow = (0, react.useCallback)(async (file) => {
75735
+ if (sessionId === void 0 || summary === null || file.revert === void 0) return;
75736
+ const binding = await bindingOf(file);
75737
+ if (binding === void 0) {
75738
+ explorer.info(t("changes.noWorkspace"));
75739
+ return;
75740
+ }
75741
+ setBusy(file.path);
75742
+ try {
75743
+ await revertFileChanges({
75744
+ sessionId,
75745
+ bindingId: binding.id,
75746
+ alias: binding.alias,
75747
+ root: summary.root,
75748
+ path: file.path,
75749
+ display: file.display,
75750
+ mode: file.revert
75751
+ });
75752
+ } finally {
75753
+ if (alive.current) setBusy(void 0);
75754
+ }
75755
+ }, [
75756
+ bindingOf,
75204
75757
  explorer,
75205
75758
  sessionId,
75206
75759
  summary,
75207
75760
  t
75208
75761
  ]);
75209
- const files = summary?.files ?? [];
75762
+ const toggleReviewed$1 = (0, react.useCallback)((file) => {
75763
+ setReviewed((previous) => toggleReviewed(files, previous, file));
75764
+ }, [files]);
75765
+ (0, react.useEffect)(() => {
75766
+ if (sessionId === void 0 || sessionId === "") return;
75767
+ try {
75768
+ window.localStorage.setItem(`${REVIEW_STORAGE_PREFIX}${sessionId}`, serializeReviewed(reviewed));
75769
+ } catch {}
75770
+ }, [reviewed, sessionId]);
75771
+ (0, react.useEffect)(() => {
75772
+ setReviewed((previous) => {
75773
+ const next = pruneReviewed(files, previous);
75774
+ return Object.keys(next).length === Object.keys(previous).length ? previous : next;
75775
+ });
75776
+ }, [files]);
75777
+ const done = reviewedCount(files, reviewed);
75778
+ const openRowMenu = (0, react.useCallback)((event, file) => {
75779
+ event.preventDefault();
75780
+ event.stopPropagation();
75781
+ const cannotRevert = file.revert === void 0;
75782
+ rowMenu.open(event.clientX, event.clientY, [
75783
+ {
75784
+ label: t("changes.menuOpen"),
75785
+ onSelect: () => {
75786
+ openChanged(file);
75787
+ }
75788
+ },
75789
+ {
75790
+ label: file.revert === "delete" ? t("changes.revertCreation") : t("changes.revertFile"),
75791
+ danger: true,
75792
+ disabled: cannotRevert,
75793
+ ...cannotRevert ? { hint: t("changes.revertNotPossible") } : {},
75794
+ separated: true,
75795
+ onSelect: () => {
75796
+ revertRow(file);
75797
+ }
75798
+ },
75799
+ {
75800
+ label: t("changes.openInScm"),
75801
+ separated: true,
75802
+ onSelect: () => {
75803
+ setView("scm");
75804
+ }
75805
+ },
75806
+ {
75807
+ label: t("changes.copyPath"),
75808
+ onSelect: () => {
75809
+ copyText$1(file.path);
75810
+ }
75811
+ }
75812
+ ]);
75813
+ }, [
75814
+ openChanged,
75815
+ revertRow,
75816
+ rowMenu,
75817
+ t
75818
+ ]);
75819
+ /** The header counter doubles as the "mark all / clear all" menu. */
75820
+ const openReviewMenu = (0, react.useCallback)((event) => {
75821
+ const rect = event.currentTarget.getBoundingClientRect();
75822
+ reviewMenu.open(rect.left, rect.bottom + 4, [{
75823
+ label: t("changes.reviewAll"),
75824
+ onSelect: () => {
75825
+ setReviewed(setAllReviewed(files, true));
75826
+ }
75827
+ }, {
75828
+ label: t("changes.reviewNone"),
75829
+ onSelect: () => {
75830
+ setReviewed(setAllReviewed(files, false));
75831
+ }
75832
+ }]);
75833
+ }, [
75834
+ files,
75835
+ reviewMenu,
75836
+ t
75837
+ ]);
75210
75838
  const activeTab = explorer.tabs.find((candidate) => candidate.id === explorer.activeTabId);
75211
75839
  const visible = (0, react.useMemo)(() => {
75212
75840
  if (summary === null) return false;
@@ -75219,132 +75847,184 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
75219
75847
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
75220
75848
  className: "rvs-changes",
75221
75849
  "data-collapsed": collapsed ? "1" : "0",
75222
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
75223
- className: "rvs-changes-head",
75224
- children: [
75225
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
75226
- type: "button",
75227
- className: "rvs-changes-toggle",
75228
- "aria-expanded": !collapsed,
75229
- onClick: () => {
75230
- setCollapsed((value) => !value);
75231
- },
75232
- title: t("changes.toggle"),
75233
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
75234
- className: "rvs-changes-chevron",
75235
- "aria-hidden": "true",
75236
- children: collapsed ? "▸" : "▾"
75237
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
75238
- className: "rvs-changes-title",
75239
- children: title
75240
- })]
75241
- }),
75242
- files.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
75243
- className: "rvs-changes-totals",
75244
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
75245
- className: "rvs-chg-add",
75246
- children: ["+", summary?.added ?? 0]
75247
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
75248
- className: "rvs-chg-del",
75249
- children: ["−", summary?.deleted ?? 0]
75250
- })]
75251
- }),
75252
- summary?.pending === true && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
75253
- className: "rvs-changes-pending",
75254
- children: t("changes.pending")
75255
- }),
75256
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "rvs-changes-spacer" }),
75257
- stale && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
75258
- className: "rvs-changes-stale",
75259
- title: t("changes.staleHint"),
75260
- children: t("changes.stale")
75261
- }),
75262
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
75263
- type: "button",
75264
- className: "rvs-changes-refresh",
75265
- onClick: () => {
75266
- load(true);
75267
- },
75268
- title: t("changes.refresh"),
75269
- children: "⟳"
75270
- })
75271
- ]
75272
- }), !collapsed && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
75273
- className: "rvs-changes-body",
75274
- children: [
75275
- error !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
75276
- className: "rvs-changes-note rvs-changes-error",
75277
- children: [
75278
- t("changes.failed"),
75279
- ": ",
75280
- error
75281
- ]
75282
- }),
75283
- summary?.unavailable !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
75284
- className: "rvs-changes-note",
75285
- children: [
75286
- t("changes.unavailable"),
75287
- " · ",
75288
- summary.unavailable
75289
- ]
75290
- }),
75291
- files.length === 0 && summary?.unavailable === void 0 && summary?.pending !== true && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
75292
- className: "rvs-changes-note",
75293
- children: t("changes.empty")
75294
- }),
75295
- files.map((file) => {
75296
- const { dir, name } = splitDisplay(file.display);
75297
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
75850
+ children: [
75851
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
75852
+ className: "rvs-changes-head",
75853
+ children: [
75854
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
75298
75855
  type: "button",
75299
- className: `rvs-chg-row${busy === file.path ? " rvs-chg-loading" : ""}`,
75300
- title: `${file.path}\n${statusWord(file, t)}`,
75856
+ className: "rvs-changes-toggle",
75857
+ "aria-expanded": !collapsed,
75301
75858
  onClick: () => {
75302
- openChanged(file);
75859
+ setCollapsed((value) => !value);
75303
75860
  },
75861
+ title: t("changes.toggle"),
75862
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
75863
+ className: "rvs-changes-chevron",
75864
+ "aria-hidden": "true",
75865
+ children: collapsed ? "▸" : "▾"
75866
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
75867
+ className: "rvs-changes-title",
75868
+ children: title
75869
+ })]
75870
+ }),
75871
+ files.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
75872
+ className: "rvs-changes-totals",
75873
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
75874
+ className: "rvs-chg-add",
75875
+ children: ["+", summary?.added ?? 0]
75876
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
75877
+ className: "rvs-chg-del",
75878
+ children: ["−", summary?.deleted ?? 0]
75879
+ })]
75880
+ }),
75881
+ done > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
75882
+ type: "button",
75883
+ className: "rvs-changes-reviewed",
75884
+ title: t("changes.reviewMenu"),
75885
+ onClick: openReviewMenu,
75886
+ children: t("changes.reviewCount").replace("{done}", String(done)).replace("{total}", String(files.length))
75887
+ }),
75888
+ summary?.pending === true && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
75889
+ className: "rvs-changes-pending",
75890
+ children: t("changes.pending")
75891
+ }),
75892
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "rvs-changes-spacer" }),
75893
+ stale && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
75894
+ className: "rvs-changes-stale",
75895
+ title: t("changes.staleHint"),
75896
+ children: t("changes.stale")
75897
+ }),
75898
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
75899
+ type: "button",
75900
+ className: "rvs-changes-refresh",
75901
+ onClick: () => {
75902
+ load(true);
75903
+ },
75904
+ title: t("changes.refresh"),
75905
+ children: "⟳"
75906
+ })
75907
+ ]
75908
+ }),
75909
+ !collapsed && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
75910
+ className: "rvs-changes-body",
75911
+ children: [
75912
+ error !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
75913
+ className: "rvs-changes-note rvs-changes-error",
75304
75914
  children: [
75305
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
75306
- className: "rvs-chg-icon",
75307
- "aria-hidden": "true",
75308
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FileIcon, {
75309
- path: file.display,
75310
- size: 14
75311
- })
75312
- }),
75313
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
75314
- className: "rvs-chg-path",
75315
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
75316
- className: "rvs-chg-dir",
75317
- children: dir
75318
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
75319
- className: "rvs-chg-name",
75320
- children: name
75321
- })]
75322
- }),
75323
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
75324
- className: "rvs-chg-counts",
75325
- children: file.oversized === true ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
75326
- className: "rvs-chg-note",
75327
- children: t("changes.oversized")
75328
- }) : file.binary === true ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
75329
- className: "rvs-chg-note",
75330
- children: t("changes.binary")
75331
- }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
75332
- className: "rvs-chg-add",
75333
- children: ["+", file.added]
75334
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
75335
- className: "rvs-chg-del",
75336
- children: ["−", file.deleted]
75337
- })] })
75338
- })
75915
+ t("changes.failed"),
75916
+ ": ",
75917
+ error
75339
75918
  ]
75340
- }, file.path);
75341
- }),
75342
- summary?.truncated === true && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
75343
- className: "rvs-changes-note",
75344
- children: t("changes.truncated")
75345
- })
75346
- ]
75347
- })]
75919
+ }),
75920
+ summary?.unavailable !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
75921
+ className: "rvs-changes-note",
75922
+ children: [
75923
+ t("changes.unavailable"),
75924
+ " · ",
75925
+ summary.unavailable
75926
+ ]
75927
+ }),
75928
+ files.length === 0 && summary?.unavailable === void 0 && summary?.pending !== true && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
75929
+ className: "rvs-changes-note",
75930
+ children: t("changes.empty")
75931
+ }),
75932
+ files.map((file) => {
75933
+ const { dir, name } = splitDisplay(file.display);
75934
+ const marked = isReviewed(file, reviewed);
75935
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
75936
+ className: `rvs-chg-row${busy === file.path ? " rvs-chg-loading" : ""}`,
75937
+ "data-reviewed": marked ? "1" : "0",
75938
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
75939
+ type: "button",
75940
+ className: "rvs-chg-open",
75941
+ title: `${file.path}\n${statusWord(file, t)}`,
75942
+ onClick: () => {
75943
+ openChanged(file);
75944
+ },
75945
+ onContextMenu: (event) => {
75946
+ openRowMenu(event, file);
75947
+ },
75948
+ children: [
75949
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
75950
+ className: "rvs-chg-status",
75951
+ "data-status": file.status ?? "M",
75952
+ "aria-hidden": "true",
75953
+ children: file.status ?? "M"
75954
+ }),
75955
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
75956
+ className: "rvs-chg-icon",
75957
+ "aria-hidden": "true",
75958
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FileIcon, {
75959
+ path: file.display,
75960
+ size: 14
75961
+ })
75962
+ }),
75963
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
75964
+ className: "rvs-chg-path",
75965
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
75966
+ className: "rvs-chg-dir",
75967
+ children: dir
75968
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
75969
+ className: "rvs-chg-name",
75970
+ children: name
75971
+ })]
75972
+ }),
75973
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
75974
+ className: "rvs-chg-counts",
75975
+ children: file.oversized === true ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
75976
+ className: "rvs-chg-note",
75977
+ children: t("changes.oversized")
75978
+ }) : file.binary === true ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
75979
+ className: "rvs-chg-note",
75980
+ children: t("changes.binary")
75981
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
75982
+ className: "rvs-chg-add",
75983
+ children: ["+", file.added]
75984
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
75985
+ className: "rvs-chg-del",
75986
+ children: ["−", file.deleted]
75987
+ })] })
75988
+ })
75989
+ ]
75990
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
75991
+ type: "button",
75992
+ className: `rvs-chg-review${marked ? " is-on" : ""}`,
75993
+ "aria-pressed": marked,
75994
+ title: marked ? t("changes.unmarkReviewed") : t("changes.markReviewed"),
75995
+ onClick: () => {
75996
+ toggleReviewed$1(file);
75997
+ },
75998
+ children: marked ? "✓" : ""
75999
+ })]
76000
+ }, file.path);
76001
+ }),
76002
+ summary?.truncated === true && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
76003
+ className: "rvs-changes-note",
76004
+ children: t("changes.truncated")
76005
+ }),
76006
+ (summary?.excludedDirs?.length ?? 0) > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
76007
+ className: "rvs-changes-note",
76008
+ title: summary?.excludedDirs?.join(", "),
76009
+ children: t("changes.excluded").replace("{dirs}", summary?.excludedDirs?.join(", ") ?? "")
76010
+ })
76011
+ ]
76012
+ }),
76013
+ rowMenu.menu !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ContextMenu, {
76014
+ x: rowMenu.menu.x,
76015
+ y: rowMenu.menu.y,
76016
+ entries: rowMenu.menu.entries,
76017
+ onClose: rowMenu.close,
76018
+ className: "rvs-menu-dock"
76019
+ }),
76020
+ reviewMenu.menu !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ContextMenu, {
76021
+ x: reviewMenu.menu.x,
76022
+ y: reviewMenu.menu.y,
76023
+ entries: reviewMenu.menu.entries,
76024
+ onClose: reviewMenu.close,
76025
+ className: "rvs-menu-dock"
76026
+ })
76027
+ ]
75348
76028
  });
75349
76029
  }
75350
76030
  //#endregion
@@ -76756,6 +77436,7 @@ exit 0
76756
77436
  }), "dsh-remote-vs: float on tab double-click");
76757
77437
  ctx.effect(() => {
76758
77438
  let dispose;
77439
+ let disposeNotices;
76759
77440
  try {
76760
77441
  const slots = ctx.slots;
76761
77442
  dispose = slots.inject("shell.overlay", () => slots.register({
@@ -76763,16 +77444,25 @@ exit 0
76763
77444
  id: "remote-vs:floating-editor",
76764
77445
  order: 40
76765
77446
  }, () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FloatingEditorWindow, { ctx })));
77447
+ disposeNotices = slots.inject("shell.overlay", () => slots.register({
77448
+ name: "shell.overlay",
77449
+ id: "remote-vs:toast-host",
77450
+ order: 41
77451
+ }, () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DialogHost, {})));
76766
77452
  } catch (error) {
76767
77453
  console.warn("[dsh-remote-vs] shell.overlay registration failed (floating editor unavailable):", error);
76768
77454
  return () => {};
76769
77455
  }
76770
77456
  return () => {
76771
- try {
76772
- dispose?.();
77457
+ for (const teardown of [dispose, disposeNotices]) try {
77458
+ teardown?.();
76773
77459
  } catch {}
76774
77460
  };
76775
77461
  }, "dsh-remote-vs: floating editor window");
77462
+ ctx.effect(() => {
77463
+ setHostNoticeEmitter(toast);
77464
+ return () => setHostNoticeEmitter(void 0);
77465
+ }, "dsh-remote-vs: host notice toasts");
76776
77466
  }
76777
77467
  //#endregion
76778
77468
  exports.apply = apply;