clay-server 4.0.0-beta.9 → 4.0.1-beta.1

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 (188) hide show
  1. package/lib/capsule-display-floor.js +51 -0
  2. package/lib/capsule-frame-server.js +255 -0
  3. package/lib/capsule-mate-turn.js +105 -0
  4. package/lib/capsule-pig-logic.js +300 -0
  5. package/lib/capsule-server-runtimes.js +39 -0
  6. package/lib/capsules/pig/display.js +198 -0
  7. package/lib/capsules/pig/manifest.json +9 -0
  8. package/lib/capsules/pig/ui.json +84 -0
  9. package/lib/config.js +25 -1
  10. package/lib/daemon-projects.js +13 -8
  11. package/lib/daemon.js +127 -14
  12. package/lib/git-cli.js +95 -1
  13. package/lib/knowledge-import.js +436 -0
  14. package/lib/knowledge-record-store.js +188 -0
  15. package/lib/knowledge-search.js +240 -0
  16. package/lib/mate-knowledge-mcp-server.js +151 -0
  17. package/lib/mate-knowledge-migration.js +283 -0
  18. package/lib/mate-knowledge-service.js +488 -0
  19. package/lib/mate-knowledge-sync.js +482 -0
  20. package/lib/migrate-single-user.js +2 -0
  21. package/lib/notes-lifecycle.js +149 -0
  22. package/lib/notes.js +60 -3
  23. package/lib/os-users.js +3 -1
  24. package/lib/project-capsule-catalog.js +9 -1
  25. package/lib/project-capsule-turn.js +96 -0
  26. package/lib/project-connection.js +15 -1
  27. package/lib/project-file-history.js +223 -0
  28. package/lib/project-file-watch.js +77 -49
  29. package/lib/project-filesystem.js +31 -220
  30. package/lib/project-http.js +15 -1
  31. package/lib/project-knowledge.js +22 -0
  32. package/lib/project-log-context.js +172 -0
  33. package/lib/project-log-feedback-delivery.js +118 -0
  34. package/lib/project-logs-comments.js +137 -0
  35. package/lib/project-logs-context-state.js +42 -0
  36. package/lib/project-logs-mcp-server.js +328 -0
  37. package/lib/project-logs-query.js +185 -0
  38. package/lib/project-logs-root.js +75 -0
  39. package/lib/project-logs-schema.js +259 -0
  40. package/lib/project-logs-service.js +463 -0
  41. package/lib/project-logs-snapshot.js +205 -0
  42. package/lib/project-logs-store.js +495 -0
  43. package/lib/project-logs-versioning.js +132 -0
  44. package/lib/project-logs.js +400 -0
  45. package/lib/project-mate-interaction.js +14 -0
  46. package/lib/project-mate-knowledge.js +110 -0
  47. package/lib/project-memory.js +22 -0
  48. package/lib/project-message-delivery.js +70 -0
  49. package/lib/project-pair-lifecycle.js +460 -0
  50. package/lib/project-request-access.js +66 -0
  51. package/lib/project-session-handoff.js +1 -1
  52. package/lib/project-session-notes.js +64 -13
  53. package/lib/project-session-pair.js +159 -146
  54. package/lib/project-session-spawn.js +1 -1
  55. package/lib/project-sessions.js +71 -16
  56. package/lib/project-user-message.js +53 -4
  57. package/lib/project-worker-permission.js +430 -0
  58. package/lib/project-worker-proposal.js +208 -62
  59. package/lib/project.js +191 -6
  60. package/lib/public/app.js +64 -35
  61. package/lib/public/css/admin.css +2 -2
  62. package/lib/public/css/capsule-ui.css +38 -0
  63. package/lib/public/css/command-palette.css +45 -9
  64. package/lib/public/css/git-placard.css +154 -0
  65. package/lib/public/css/home-hub.css +4 -0
  66. package/lib/public/css/home-session-actions.css +66 -0
  67. package/lib/public/css/home-sidebar.css +66 -0
  68. package/lib/public/css/input.css +84 -3
  69. package/lib/public/css/messages.css +40 -1
  70. package/lib/public/css/mobile-nav.css +80 -0
  71. package/lib/public/css/notifications-center.css +67 -0
  72. package/lib/public/css/pane.css +97 -10
  73. package/lib/public/css/project-logs.css +198 -0
  74. package/lib/public/css/scheduler.css +1 -1
  75. package/lib/public/css/session-actions.css +16 -101
  76. package/lib/public/css/sidebar.css +103 -0
  77. package/lib/public/css/sticky-notes.css +237 -229
  78. package/lib/public/css/worker-proposal.css +36 -3
  79. package/lib/public/index.html +43 -11
  80. package/lib/public/modules/admin.js +8 -8
  81. package/lib/public/modules/app-connection.js +124 -6
  82. package/lib/public/modules/app-home-hub.js +12 -8
  83. package/lib/public/modules/app-message-cards.js +2 -1
  84. package/lib/public/modules/app-message-router.js +1 -1
  85. package/lib/public/modules/app-messages.js +92 -11
  86. package/lib/public/modules/app-misc.js +2 -14
  87. package/lib/public/modules/app-notifications.js +11 -7
  88. package/lib/public/modules/app-panels.js +3 -2
  89. package/lib/public/modules/app-projects.js +56 -18
  90. package/lib/public/modules/app-rendering.js +1 -0
  91. package/lib/public/modules/capsule-preference.js +44 -0
  92. package/lib/public/modules/chat-bubble-renderer.js +1 -1
  93. package/lib/public/modules/clay-log-links.js +70 -0
  94. package/lib/public/modules/command-palette.js +52 -15
  95. package/lib/public/modules/context-sources.js +0 -3
  96. package/lib/public/modules/git-agent-sessions.js +85 -0
  97. package/lib/public/modules/git-panel.js +111 -84
  98. package/lib/public/modules/git-placard.js +161 -0
  99. package/lib/public/modules/home-chat-empty-state.js +39 -0
  100. package/lib/public/modules/home-chat-identity.js +9 -0
  101. package/lib/public/modules/home-conversations-sheet.js +102 -48
  102. package/lib/public/modules/home-mate-chat.js +15 -35
  103. package/lib/public/modules/home-session-actions.js +6 -0
  104. package/lib/public/modules/home-sidebar-chat-list.js +101 -41
  105. package/lib/public/modules/home-sidebar.js +7 -0
  106. package/lib/public/modules/home-surface-boot.js +7 -3
  107. package/lib/public/modules/home-tool-frame.js +182 -0
  108. package/lib/public/modules/home-tools.js +138 -1
  109. package/lib/public/modules/input.js +38 -7
  110. package/lib/public/modules/markdown.js +2 -0
  111. package/lib/public/modules/mate-sidebar.js +0 -8
  112. package/lib/public/modules/message-delivery.js +97 -0
  113. package/lib/public/modules/paste-modal.js +84 -0
  114. package/lib/public/modules/project-activation.js +45 -0
  115. package/lib/public/modules/project-logs-render.js +405 -0
  116. package/lib/public/modules/project-logs.js +461 -0
  117. package/lib/public/modules/project-removal-target.js +26 -0
  118. package/lib/public/modules/scheduler.js +17 -3
  119. package/lib/public/modules/search-clay-chat.js +47 -6
  120. package/lib/public/modules/search-clay-controls.js +86 -0
  121. package/lib/public/modules/session-actions.js +29 -105
  122. package/lib/public/modules/session-hierarchy.js +54 -0
  123. package/lib/public/modules/sidebar-mobile.js +40 -15
  124. package/lib/public/modules/sidebar-session-hierarchy.js +214 -0
  125. package/lib/public/modules/sidebar-sessions.js +77 -11
  126. package/lib/public/modules/sidebar.js +17 -5
  127. package/lib/public/modules/split-group-helpers.js +8 -0
  128. package/lib/public/modules/split-pair-ui.js +15 -4
  129. package/lib/public/modules/split-view.js +5 -2
  130. package/lib/public/modules/split-worker-runtime.js +24 -0
  131. package/lib/public/modules/sticky-note-markdown.js +5 -0
  132. package/lib/public/modules/sticky-notes-browser.js +326 -0
  133. package/lib/public/modules/sticky-notes-card.js +360 -0
  134. package/lib/public/modules/sticky-notes-editor.js +291 -0
  135. package/lib/public/modules/sticky-notes-shared.js +90 -0
  136. package/lib/public/modules/sticky-notes.js +170 -946
  137. package/lib/public/modules/thinking-lifecycle.js +175 -0
  138. package/lib/public/modules/thinking-summary.js +28 -0
  139. package/lib/public/modules/thinking-view.js +75 -0
  140. package/lib/public/modules/tool-palette-order.js +143 -0
  141. package/lib/public/modules/tool-palette-overlays.js +159 -0
  142. package/lib/public/modules/tool-palette.js +21 -188
  143. package/lib/public/modules/tools.js +31 -123
  144. package/lib/public/modules/update-snooze.js +169 -0
  145. package/lib/public/modules/user-settings.js +4 -0
  146. package/lib/public/modules/worker-pane-lock.js +176 -0
  147. package/lib/public/modules/worker-proposal-state.js +16 -0
  148. package/lib/public/modules/worker-proposal.js +49 -20
  149. package/lib/public/style.css +3 -1
  150. package/lib/sdk-bridge.js +136 -47
  151. package/lib/sdk-message-processor.js +36 -7
  152. package/lib/server-experimental-settings.js +49 -0
  153. package/lib/server-global-ws.js +11 -0
  154. package/lib/server-home-chat-events.js +34 -1
  155. package/lib/server-home-chat.js +62 -4
  156. package/lib/server-home-clay-entry.js +1 -1
  157. package/lib/server-home-clay-session-links.js +34 -5
  158. package/lib/server-settings.js +5 -0
  159. package/lib/server-tools.js +127 -9
  160. package/lib/server.js +137 -22
  161. package/lib/session-driver-eligibility.js +38 -0
  162. package/lib/session-driver-orchestration.js +31 -0
  163. package/lib/session-hygiene.js +3 -0
  164. package/lib/session-notes-mcp-server.js +25 -5
  165. package/lib/session-pair-factory.js +247 -0
  166. package/lib/session-pair-mcp-server.js +46 -8
  167. package/lib/session-pair-prompts.js +79 -0
  168. package/lib/session-pair-turn-control.js +153 -0
  169. package/lib/session-provenance.js +119 -0
  170. package/lib/session-spawn-mcp-server.js +1 -1
  171. package/lib/session-split-groups.js +4 -1
  172. package/lib/session-title-policy.js +60 -0
  173. package/lib/session-visibility.js +41 -0
  174. package/lib/sessions.js +57 -10
  175. package/lib/tools-registry.js +89 -10
  176. package/lib/update-snooze.js +437 -0
  177. package/lib/users-experimental-preferences.js +30 -0
  178. package/lib/users-permissions.js +6 -6
  179. package/lib/users.js +22 -16
  180. package/lib/workspace-query-access.js +102 -0
  181. package/lib/workspace-query-service.js +24 -17
  182. package/lib/worktree.js +25 -38
  183. package/lib/ws-schema.js +44 -7
  184. package/lib/yoke/adapters/claude-worker.js +16 -6
  185. package/lib/yoke/adapters/claude.js +12 -0
  186. package/lib/yoke/adapters/codex.js +24 -14
  187. package/lib/yoke/vendor-registry.js +1 -1
  188. package/package.json +2 -2
@@ -926,6 +926,109 @@
926
926
  transition: opacity 0.15s;
927
927
  }
928
928
 
929
+ .session-driver-hierarchy {
930
+ position: relative;
931
+ }
932
+
933
+ .session-driver-header {
934
+ display: flex;
935
+ align-items: center;
936
+ }
937
+
938
+ .session-driver-header > .session-item {
939
+ min-width: 0;
940
+ flex: 1;
941
+ padding-left: 0;
942
+ }
943
+
944
+ .session-driver-toggle {
945
+ width: 18px;
946
+ height: 24px;
947
+ padding: 0;
948
+ border: 0;
949
+ border-radius: 5px;
950
+ display: inline-flex;
951
+ align-items: center;
952
+ justify-content: center;
953
+ flex-shrink: 0;
954
+ color: var(--text-dimmer);
955
+ background: transparent;
956
+ cursor: pointer;
957
+ }
958
+
959
+ .session-driver-toggle:hover,
960
+ .session-driver-toggle:focus-visible,
961
+ .session-orphan-toggle:hover,
962
+ .session-orphan-toggle:focus-visible {
963
+ color: var(--text);
964
+ background: rgba(var(--overlay-rgb), 0.05);
965
+ outline: none;
966
+ }
967
+
968
+ .session-driver-toggle .lucide,
969
+ .session-orphan-toggle .lucide {
970
+ width: 13px;
971
+ height: 13px;
972
+ transition: transform 0.15s ease;
973
+ }
974
+
975
+ .session-driver-toggle[aria-expanded="true"] .lucide,
976
+ .session-orphan-toggle[aria-expanded="true"] .lucide {
977
+ transform: rotate(90deg);
978
+ }
979
+
980
+ .session-worker-children {
981
+ margin-left: 17px;
982
+ padding-left: 8px;
983
+ border-left: 1px solid color-mix(in srgb, var(--text-dimmer) 22%, transparent);
984
+ }
985
+
986
+ .session-worker-item {
987
+ height: 33px;
988
+ border-radius: 7px;
989
+ }
990
+
991
+ .session-worker-generation,
992
+ .session-worker-count {
993
+ flex-shrink: 0;
994
+ padding: 1px 5px;
995
+ border-radius: 999px;
996
+ color: var(--text-dimmer);
997
+ background: rgba(var(--overlay-rgb), 0.04);
998
+ font-size: 9px;
999
+ font-weight: 650;
1000
+ letter-spacing: 0.02em;
1001
+ }
1002
+
1003
+ .session-worker-generation.current {
1004
+ color: var(--success);
1005
+ background: color-mix(in srgb, var(--success) 10%, transparent);
1006
+ }
1007
+
1008
+ .session-orphan-toggle {
1009
+ width: 100%;
1010
+ height: 32px;
1011
+ padding: 0 9px 0 4px;
1012
+ border: 0;
1013
+ border-radius: 8px;
1014
+ display: flex;
1015
+ align-items: center;
1016
+ gap: 7px;
1017
+ color: var(--text-dimmer);
1018
+ background: transparent;
1019
+ cursor: pointer;
1020
+ font: inherit;
1021
+ text-align: left;
1022
+ }
1023
+
1024
+ .session-orphan-title {
1025
+ flex: 1;
1026
+ overflow: hidden;
1027
+ text-overflow: ellipsis;
1028
+ white-space: nowrap;
1029
+ font-size: 12px;
1030
+ }
1031
+
929
1032
  .split-group-text {
930
1033
  display: flex;
931
1034
  align-items: center;
@@ -53,23 +53,23 @@
53
53
  .sticky-notes-count.hidden { display: none; }
54
54
 
55
55
  /* --- Clay brand stationery palette, independent of the selected editor skin --- */
56
- :is(.sticky-note, .notes-archive-card, .sticky-note-color-dot) {
56
+ :is(.sticky-note, .notes-browser-card, .sticky-note-color-dot) {
57
57
  --note-surface: color-mix(in oklch, var(--note-tone) 40%, var(--brand-paper));
58
58
  --note-border: color-mix(in oklch, var(--note-tone) 62%, #c7c7c1);
59
59
  --note-ink: color-mix(in oklch, var(--note-tone) 20%, var(--brand-ink));
60
60
  --note-swatch: color-mix(in srgb, var(--note-surface) 58%, transparent);
61
61
  }
62
- .dark-theme :is(.sticky-note, .notes-archive-card, .sticky-note-color-dot) {
62
+ .dark-theme :is(.sticky-note, .notes-browser-card, .sticky-note-color-dot) {
63
63
  --note-surface: color-mix(in oklch, var(--note-tone) 40%, var(--brand-ink));
64
64
  --note-border: color-mix(in oklch, var(--note-tone) 60%, #393934);
65
65
  --note-ink: color-mix(in oklch, var(--note-tone) 18%, var(--brand-paper));
66
66
  }
67
- :is(.sticky-note, .notes-archive-card, .sticky-note-color-dot)[data-color="purple"] { --note-tone: var(--brand-indigo); }
68
- :is(.sticky-note, .notes-archive-card, .sticky-note-color-dot)[data-color="green"] { --note-tone: var(--brand-green); }
69
- :is(.sticky-note, .notes-archive-card, .sticky-note-color-dot)[data-color="yellow"] { --note-tone: var(--brand-gold); }
70
- :is(.sticky-note, .notes-archive-card, .sticky-note-color-dot)[data-color="blue"] { --note-tone: var(--brand-blue); }
71
- :is(.sticky-note, .notes-archive-card, .sticky-note-color-dot)[data-color="pink"] { --note-tone: var(--brand-coral); }
72
- :is(.sticky-note, .notes-archive-card, .sticky-note-color-dot)[data-color="orange"] { --note-tone: var(--brand-clay); }
67
+ :is(.sticky-note, .notes-browser-card, .sticky-note-color-dot)[data-color="purple"] { --note-tone: var(--brand-indigo); }
68
+ :is(.sticky-note, .notes-browser-card, .sticky-note-color-dot)[data-color="green"] { --note-tone: var(--brand-green); }
69
+ :is(.sticky-note, .notes-browser-card, .sticky-note-color-dot)[data-color="yellow"] { --note-tone: var(--brand-gold); }
70
+ :is(.sticky-note, .notes-browser-card, .sticky-note-color-dot)[data-color="blue"] { --note-tone: var(--brand-blue); }
71
+ :is(.sticky-note, .notes-browser-card, .sticky-note-color-dot)[data-color="pink"] { --note-tone: var(--brand-coral); }
72
+ :is(.sticky-note, .notes-browser-card, .sticky-note-color-dot)[data-color="orange"] { --note-tone: var(--brand-clay); }
73
73
 
74
74
  /* --- Individual note --- */
75
75
  .sticky-note.hidden { display: none; }
@@ -90,6 +90,8 @@
90
90
  color: var(--note-ink);
91
91
  transition: box-shadow 0.15s;
92
92
  overflow: hidden;
93
+ contain: layout style;
94
+ will-change: transform, backdrop-filter;
93
95
  }
94
96
 
95
97
  .sticky-note:hover {
@@ -97,12 +99,12 @@
97
99
  }
98
100
 
99
101
  .sticky-note.sticky-note-attention {
100
- animation: sticky-note-attention-pulse 0.65s ease-in-out 3;
102
+ animation: sticky-note-attention-pulse 1.1s ease-out 1;
101
103
  }
102
104
 
103
105
  @keyframes sticky-note-attention-pulse {
104
- 0%, 100% { box-shadow: 0 2px 12px rgba(var(--shadow-rgb), 0.12); }
105
- 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 55%, transparent), 0 4px 20px rgba(var(--shadow-rgb), 0.2); }
106
+ 0% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent), 0 4px 20px rgba(var(--shadow-rgb), 0.2); }
107
+ 100% { box-shadow: 0 2px 12px rgba(var(--shadow-rgb), 0.12); }
106
108
  }
107
109
 
108
110
  .sticky-note.dragging,
@@ -508,7 +510,7 @@
508
510
  .sn-fmt-strike { text-decoration: line-through; }
509
511
  .sn-fmt-code .lucide { width: 14px; height: 14px; }
510
512
 
511
- /* --- Note flash animation (when clicking from archive) --- */
513
+ /* --- Note flash animation (when jumping to a note from the browser) --- */
512
514
  @keyframes noteFlash {
513
515
  0%, 100% { box-shadow: 0 2px 12px rgba(var(--shadow-rgb), 0.12); }
514
516
  30% { box-shadow: 0 0 0 3px var(--accent), 0 4px 20px rgba(var(--shadow-rgb), 0.3); }
@@ -519,284 +521,292 @@
519
521
  }
520
522
 
521
523
  /* ==========================================================================
522
- Notes Archive View
524
+ Sticky Notes browser
523
525
  ========================================================================== */
524
526
 
525
- /* Hide messages and input when archive is open */
527
+ /* These are shared with the other workbench panels' fullscreen mode. */
526
528
  #messages.hidden { display: none; }
527
529
  #input-area.hidden { display: none; }
528
530
  .title-bar-content.hidden { display: none !important; }
529
531
 
530
- #notes-archive {
531
- position: absolute;
532
- inset: 0;
533
- z-index: 40;
534
- background: var(--bg);
535
- display: flex;
536
- flex-direction: column;
537
- overflow: hidden;
532
+ /* ==========================================================================
533
+ Sticky Notes browser — bounded right workbench window
534
+ The conversation and composer stay visible beside it, exactly like the
535
+ document viewer, the terminal, and Project Logs.
536
+ ========================================================================== */
537
+
538
+ @media (min-width: 1024px) {
539
+ #notes-browser {
540
+ width: 50%;
541
+ max-width: 720px;
542
+ min-width: 360px;
543
+ height: calc(100% - 16px);
544
+ min-height: 0;
545
+ align-self: center;
546
+ margin: 8px 8px 8px 10px;
547
+ border: 1px solid var(--border);
548
+ border-radius: 12px;
549
+ background: var(--bg);
550
+ display: flex;
551
+ flex-direction: column;
552
+ overflow: hidden;
553
+ flex-shrink: 0;
554
+ box-shadow:
555
+ 4px 8px 18px rgba(var(--shadow-rgb), 0.14),
556
+ 2px 2px 4px rgba(var(--shadow-rgb), 0.08),
557
+ inset 0 1px 0 rgba(255, 255, 255, 0.04);
558
+ animation: workbench-panel-in 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
559
+ transition: max-width 0.2s ease, width 0.2s ease, box-shadow 0.2s ease;
560
+ }
561
+ #notes-browser.hidden { display: none; }
562
+ #notes-browser.notes-browser-wide { width: 70%; max-width: 1200px; }
563
+ #notes-browser.panel-fullscreen {
564
+ width: 100%;
565
+ max-width: none;
566
+ min-width: 0;
567
+ height: 100%;
568
+ margin: 0;
569
+ border: 0;
570
+ border-radius: 0;
571
+ box-shadow: none;
572
+ animation: none;
573
+ }
538
574
  }
539
575
 
540
- #notes-archive.hidden { display: none; }
576
+ @media (prefers-reduced-motion: reduce) {
577
+ #notes-browser { animation: none; }
578
+ }
579
+
580
+ /* Narrow screens: full viewport overlay, like the other workbench tools. */
581
+ @media (max-width: 1023px) {
582
+ #notes-browser {
583
+ position: fixed;
584
+ top: 0;
585
+ left: 0;
586
+ right: 0;
587
+ bottom: 0;
588
+ z-index: 60;
589
+ padding-top: var(--safe-top);
590
+ padding-bottom: var(--safe-bottom);
591
+ background: var(--bg);
592
+ display: flex;
593
+ flex-direction: column;
594
+ overflow: hidden;
595
+ }
596
+ #notes-browser.hidden { display: none; }
597
+ /* Width and fullscreen are meaningless when the pane is already the viewport. */
598
+ #notes-browser-wide,
599
+ #notes-browser-fullscreen { display: none; }
600
+ }
541
601
 
542
- /* --- Archive header (matches scheduler-top-bar) --- */
543
- .notes-archive-header {
602
+ /* --- Top bar --- */
603
+ .notes-browser-topbar {
544
604
  display: flex;
545
605
  align-items: center;
546
- height: 48px;
547
- padding: 0 16px;
548
- flex-shrink: 0;
606
+ gap: 8px;
607
+ padding: 10px 12px;
549
608
  border-bottom: 1px solid var(--border-subtle);
609
+ flex: 0 0 auto;
550
610
  }
551
-
552
- .notes-archive-title-wrap {
553
- display: flex;
554
- align-items: baseline;
555
- gap: 6px;
556
- flex: 1;
557
- }
558
- .notes-archive-title-wrap .lucide {
559
- align-self: center;
560
- }
561
-
562
- .notes-archive-title-wrap .lucide {
563
- width: 15px;
564
- height: 15px;
565
- color: var(--accent);
566
- flex-shrink: 0;
567
- }
568
-
569
- .notes-archive-title-wrap h2 {
570
- font-size: 15px;
571
- font-weight: 700;
611
+ .notes-browser-title {
612
+ display: inline-flex;
613
+ align-items: center;
614
+ gap: 7px;
615
+ font-size: 13px;
616
+ font-weight: 600;
572
617
  color: var(--text);
573
- margin: 0;
618
+ flex: 0 0 auto;
574
619
  }
575
-
576
- .notes-archive-count {
620
+ .notes-browser-title .lucide { width: 15px; height: 15px; color: var(--text-dimmer); }
621
+ .notes-browser-subtitle {
622
+ flex: 1;
623
+ min-width: 0;
577
624
  font-size: 11px;
578
- font-weight: 600;
579
625
  color: var(--text-dimmer);
580
- margin-left: 2px;
626
+ overflow: hidden;
627
+ text-overflow: ellipsis;
628
+ white-space: nowrap;
581
629
  }
582
-
583
- .notes-archive-close {
584
- display: flex;
630
+ .notes-browser-window-actions { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
631
+ .notes-browser-icon-btn {
632
+ display: inline-flex;
585
633
  align-items: center;
586
634
  justify-content: center;
587
- width: 30px;
588
- height: 30px;
589
- border: none;
590
- border-radius: 6px;
591
- background: none;
592
- color: var(--text-muted);
635
+ width: 28px;
636
+ height: 28px;
637
+ border: 0;
638
+ border-radius: 7px;
639
+ background: transparent;
640
+ color: var(--text-dimmer);
593
641
  cursor: pointer;
594
- margin-left: auto;
595
- transition: background 0.12s, color 0.12s;
596
- flex-shrink: 0;
597
- }
598
-
599
- .notes-archive-close .lucide { width: 16px; height: 16px; }
600
- .notes-archive-close:hover { background: rgba(var(--overlay-rgb), 0.08); color: var(--text); }
601
-
602
- /* --- Archive grid --- */
603
- .notes-archive-grid {
604
- flex: 1;
605
- overflow-y: auto;
606
- padding: 20px 28px 40px;
607
- display: grid;
608
- grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
609
- gap: 12px;
610
- align-content: start;
611
642
  }
643
+ .notes-browser-icon-btn .lucide { width: 15px; height: 15px; }
644
+ .notes-browser-icon-btn:hover:not(:disabled) { background: rgba(var(--overlay-rgb), 0.08); color: var(--text); }
645
+ .notes-browser-icon-btn:disabled { opacity: 0.4; cursor: default; }
646
+ .notes-browser-icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
612
647
 
613
- /* --- Empty state --- */
614
- .notes-archive-empty {
615
- grid-column: 1 / -1;
648
+ /* --- Open / Closed tabs --- */
649
+ .notes-browser-tabs {
616
650
  display: flex;
617
- flex-direction: column;
618
651
  align-items: center;
619
- justify-content: center;
620
- padding: 80px 20px;
621
- color: var(--text-dimmer);
622
- text-align: center;
652
+ gap: 4px;
653
+ padding: 8px 12px;
654
+ border-bottom: 1px solid var(--border-subtle);
655
+ flex: 0 0 auto;
623
656
  }
624
-
625
- .notes-archive-empty .lucide {
626
- width: 48px;
627
- height: 48px;
628
- margin-bottom: 16px;
629
- opacity: 0.3;
657
+ .notes-browser-tab {
658
+ display: inline-flex;
659
+ align-items: center;
660
+ gap: 6px;
661
+ height: 28px;
662
+ padding: 0 10px;
663
+ border: 1px solid transparent;
664
+ border-radius: 7px;
665
+ background: transparent;
666
+ color: var(--text-dimmer);
667
+ font: inherit;
668
+ font-size: 12px;
669
+ cursor: pointer;
630
670
  }
631
-
632
- .notes-archive-empty p {
633
- margin: 0;
634
- font-size: 15px;
671
+ .notes-browser-tab:hover { background: rgba(var(--overlay-rgb), 0.06); color: var(--text); }
672
+ .notes-browser-tab.active {
673
+ background: var(--bg-alt);
674
+ border-color: var(--border);
675
+ color: var(--text);
635
676
  font-weight: 600;
636
- color: var(--text-muted);
637
677
  }
638
-
639
- .notes-archive-empty-sub {
640
- font-size: 13px !important;
641
- font-weight: 400 !important;
642
- color: var(--text-dimmer) !important;
643
- margin-top: 6px !important;
644
- max-width: 520px;
645
- display: flex;
646
- align-items: center;
647
- justify-content: center;
648
- gap: 4px;
649
- line-height: 1.55;
678
+ .notes-browser-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
679
+ .notes-browser-tab-count {
680
+ min-width: 18px;
681
+ padding: 0 5px;
682
+ border-radius: 9px;
683
+ background: rgba(var(--overlay-rgb), 0.1);
684
+ font-size: 11px;
685
+ font-variant-numeric: tabular-nums;
686
+ text-align: center;
650
687
  }
651
688
 
652
- .notes-archive-empty-sub .lucide {
653
- width: 14px;
654
- height: 14px;
655
- margin: 0;
656
- display: inline;
657
- opacity: 0.6;
689
+ /* --- Card grid --- */
690
+ .notes-browser-grid {
691
+ flex: 1;
692
+ min-height: 0;
693
+ overflow-y: auto;
694
+ display: grid;
695
+ grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
696
+ gap: 10px;
697
+ padding: 12px 12px 28px;
698
+ align-content: start;
658
699
  }
659
700
 
660
- /* --- Archive card --- */
661
- .notes-archive-card {
701
+ .notes-browser-card {
662
702
  position: relative;
663
- border-radius: 8px;
664
- overflow: hidden;
665
- cursor: pointer;
666
703
  display: flex;
667
704
  flex-direction: column;
668
- min-height: 80px;
669
- max-height: 200px;
705
+ gap: 6px;
706
+ min-height: 96px;
707
+ padding: 10px 11px 14px;
670
708
  border: 1px solid var(--note-border);
709
+ border-radius: 10px;
671
710
  background: var(--note-surface);
672
711
  color: var(--note-ink);
673
- transition: transform 0.15s, box-shadow 0.15s;
674
- box-shadow: 0 1px 4px rgba(var(--shadow-rgb), 0.1);
675
- }
676
-
677
- .notes-archive-card:hover {
678
- transform: translateY(-2px);
679
- box-shadow: 0 4px 16px rgba(var(--shadow-rgb), 0.18);
680
- }
681
-
682
- /* Archived (hidden from canvas) cards — dimmed with indicator */
683
- .notes-archive-card.archived {
684
- opacity: 0.55;
685
- }
686
- .notes-archive-card.archived:hover {
687
- opacity: 0.85;
712
+ overflow: hidden;
713
+ cursor: pointer;
714
+ transition: box-shadow 0.15s ease, transform 0.15s ease;
688
715
  }
716
+ .notes-browser-card:hover { box-shadow: 0 2px 10px rgba(var(--shadow-rgb), 0.12); }
717
+ .notes-browser-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
718
+ /* A closed note is calm, not crossed out: still fully readable. */
719
+ .notes-browser-card.closed { opacity: 0.72; cursor: default; }
720
+ .notes-browser-card.closed:hover { box-shadow: none; }
689
721
 
690
- /* --- Card header --- */
691
- .notes-archive-card-header {
692
- display: flex;
693
- align-items: center;
694
- gap: 6px;
695
- padding: 10px 10px 0;
696
- flex-shrink: 0;
697
- }
722
+ .notes-browser-card-title { color: var(--note-ink); }
723
+ .notes-browser-card-body { color: var(--note-ink); }
698
724
 
699
- .notes-archive-card-title {
725
+ .notes-browser-card-header { display: flex; align-items: flex-start; gap: 8px; }
726
+ .notes-browser-card-title {
700
727
  flex: 1;
701
- font-size: 13px;
702
- font-weight: 700;
703
- line-height: 1.3;
704
- overflow: hidden;
705
- text-overflow: ellipsis;
706
- white-space: nowrap;
707
728
  min-width: 0;
729
+ margin: 0;
730
+ font-size: 12.5px;
731
+ font-weight: 600;
732
+ line-height: 1.35;
733
+ overflow: hidden;
734
+ display: -webkit-box;
735
+ -webkit-line-clamp: 2;
736
+ -webkit-box-orient: vertical;
708
737
  }
709
-
710
- .notes-archive-card-title { color: var(--note-ink); }
711
-
712
- /* --- Delete button --- */
713
- .notes-archive-card-delete {
714
- display: flex;
715
- align-items: center;
716
- justify-content: center;
717
- width: 24px;
718
- height: 24px;
719
- border: none;
720
- background: none;
721
- border-radius: 6px;
722
- cursor: pointer;
723
- opacity: 0;
724
- flex-shrink: 0;
725
- transition: opacity 0.15s, background 0.15s, color 0.15s;
726
- color: inherit;
727
- }
728
-
729
- .notes-archive-card-delete .lucide { width: 14px; height: 14px; }
730
- .notes-archive-card:hover .notes-archive-card-delete { opacity: 0.5; }
731
- .notes-archive-card-delete:hover { opacity: 1 !important; background: color-mix(in srgb, var(--note-ink) 9%, transparent); }
732
-
733
- /* --- Restore button (archived cards) --- */
734
- .notes-archive-card-restore {
735
- display: flex;
738
+ .notes-browser-card-action {
739
+ display: inline-flex;
736
740
  align-items: center;
737
741
  gap: 4px;
742
+ flex: 0 0 auto;
738
743
  height: 24px;
739
- border: none;
740
- background: color-mix(in srgb, var(--note-ink) 7%, transparent);
741
- border-radius: 6px;
742
- cursor: pointer;
743
- flex-shrink: 0;
744
744
  padding: 0 8px;
745
- font-family: "Pretendard", system-ui, sans-serif;
745
+ border: 1px solid var(--border);
746
+ border-radius: 6px;
747
+ background: var(--bg);
748
+ color: var(--text-secondary);
749
+ font: inherit;
746
750
  font-size: 11px;
747
- font-weight: 600;
748
- color: inherit;
749
- opacity: 0.6;
750
- transition: opacity 0.15s, background 0.15s;
751
- }
752
- .notes-archive-card-restore .lucide { width: 12px; height: 12px; }
753
- .notes-archive-card-restore:hover { opacity: 1; background: color-mix(in srgb, var(--note-ink) 12%, transparent); }
754
-
755
- /* Confirm-delete state: red trash */
756
- .notes-archive-card.confirm-delete .notes-archive-card-delete {
757
- opacity: 1 !important;
758
- color: #E53935;
759
- background: rgba(229, 57, 53, 0.12);
760
- }
761
-
762
- /* Deleting animation */
763
- .notes-archive-card.deleting {
764
- opacity: 0;
765
- transform: scale(0.9);
766
- transition: opacity 0.2s, transform 0.2s;
767
- pointer-events: none;
751
+ cursor: pointer;
768
752
  }
753
+ .notes-browser-card-action .lucide { width: 12px; height: 12px; }
754
+ .notes-browser-card-action:hover { background: var(--bg-alt); color: var(--text); }
755
+ .notes-browser-card-action:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
769
756
 
770
- /* --- Card body --- */
771
- .notes-archive-card-body {
757
+ .notes-browser-card-body {
772
758
  flex: 1;
773
- padding: 4px 10px 10px;
774
- font-size: 12px;
775
- line-height: 1.5;
759
+ font-size: 11.5px;
760
+ line-height: 1.45;
776
761
  overflow: hidden;
777
- min-height: 0;
778
- word-break: break-word;
762
+ display: -webkit-box;
763
+ -webkit-line-clamp: 5;
764
+ -webkit-box-orient: vertical;
779
765
  }
780
-
781
- .notes-archive-card-body { color: var(--note-ink); }
782
-
783
- .notes-archive-card-body code {
784
- font-family: "Roboto Mono", monospace;
785
- font-size: 11px;
766
+ .notes-browser-card-body code {
786
767
  padding: 1px 3px;
787
768
  border-radius: 3px;
788
- background: rgba(0,0,0,0.06);
769
+ background: rgba(0, 0, 0, 0.06);
789
770
  }
790
- .dark-theme .notes-archive-card-body code {
791
- background: rgba(255,255,255,0.08);
771
+ .dark-theme .notes-browser-card-body code { background: rgba(255, 255, 255, 0.08); }
772
+
773
+ .notes-browser-card-meta {
774
+ margin: 0;
775
+ font-size: 10.5px;
776
+ color: var(--text-dimmer);
792
777
  }
793
778
 
779
+ .notes-browser-card-color {
780
+ position: absolute;
781
+ left: 0;
782
+ right: 0;
783
+ bottom: 0;
784
+ height: 3px;
785
+ background: var(--note-tone, var(--border));
786
+ }
787
+
788
+ /* --- Empty states --- */
789
+ .notes-browser-empty {
790
+ grid-column: 1 / -1;
791
+ display: flex;
792
+ flex-direction: column;
793
+ align-items: center;
794
+ gap: 6px;
795
+ padding: 44px 24px;
796
+ text-align: center;
797
+ color: var(--text-dimmer);
798
+ }
799
+ .notes-browser-empty .lucide { width: 26px; height: 26px; opacity: 0.5; }
800
+ .notes-browser-empty p { margin: 0; font-size: 13px; color: var(--text-secondary); }
801
+ .notes-browser-empty-sub { max-width: 40ch; font-size: 11.5px !important; color: var(--text-dimmer) !important; }
802
+
794
803
  @media (prefers-reduced-transparency: reduce) {
795
804
  .sticky-note {
796
805
  -webkit-backdrop-filter: none;
797
806
  backdrop-filter: none;
798
807
  border-color: var(--note-border);
799
808
  background: var(--note-surface);
809
+ will-change: transform;
800
810
  }
801
811
  }
802
812
 
@@ -824,12 +834,10 @@
824
834
  display: none !important;
825
835
  }
826
836
 
827
- .notes-archive-grid {
837
+ .notes-browser-grid {
828
838
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
829
- padding: 12px 16px 32px;
839
+ padding: 12px 14px 32px;
830
840
  }
831
841
 
832
- .notes-archive-header {
833
- padding: 10px 12px;
834
- }
842
+ .notes-browser-topbar { padding: 10px 12px; }
835
843
  }