@bakapiano/ccsm 0.10.3 → 0.12.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 (51) hide show
  1. package/CLAUDE.md +475 -475
  2. package/README.md +190 -190
  3. package/bin/ccsm.js +194 -194
  4. package/lib/atomicJson.js +48 -0
  5. package/lib/cliSessionWatcher.js +249 -249
  6. package/lib/config.js +188 -185
  7. package/lib/folders.js +105 -96
  8. package/lib/jsonStore.js +15 -10
  9. package/lib/localCliSessions.js +489 -177
  10. package/lib/persistedSessions.js +142 -134
  11. package/lib/webTerminal.js +208 -208
  12. package/lib/workspace.js +230 -255
  13. package/package.json +57 -57
  14. package/public/css/base.css +99 -99
  15. package/public/css/cards.css +183 -183
  16. package/public/css/feedback.css +303 -303
  17. package/public/css/forms.css +405 -405
  18. package/public/css/layout.css +160 -160
  19. package/public/css/modal.css +190 -183
  20. package/public/css/responsive.css +10 -10
  21. package/public/css/sidebar.css +608 -601
  22. package/public/css/terminals.css +294 -294
  23. package/public/css/tokens.css +81 -79
  24. package/public/css/wco.css +98 -98
  25. package/public/css/widgets.css +1596 -1375
  26. package/public/index.html +105 -103
  27. package/public/js/api.js +272 -260
  28. package/public/js/components/AdoptModal.js +343 -171
  29. package/public/js/components/App.js +35 -35
  30. package/public/js/components/DirectoryPicker.js +203 -203
  31. package/public/js/components/EntityFormModal.js +105 -105
  32. package/public/js/components/Modal.js +51 -51
  33. package/public/js/components/OfflineBanner.js +93 -93
  34. package/public/js/components/PageTitleBar.js +13 -13
  35. package/public/js/components/Picker.js +179 -179
  36. package/public/js/components/Popover.js +55 -55
  37. package/public/js/components/Sidebar.js +341 -270
  38. package/public/js/components/TerminalView.js +298 -298
  39. package/public/js/components/useDragSort.js +67 -67
  40. package/public/js/dialog.js +67 -67
  41. package/public/js/icons.js +177 -177
  42. package/public/js/main.js +132 -140
  43. package/public/js/pages/AboutPage.js +165 -165
  44. package/public/js/pages/ConfigurePage.js +475 -487
  45. package/public/js/pages/LaunchPage.js +369 -369
  46. package/public/js/pages/SessionsPage.js +97 -97
  47. package/public/js/state.js +231 -231
  48. package/public/manifest.webmanifest +15 -15
  49. package/scripts/dev.js +59 -0
  50. package/scripts/install.js +137 -137
  51. package/server.js +1147 -1117
@@ -1,183 +1,190 @@
1
- /* Floating action button · modal backdrop / shell / sections ·
2
- nested repos-inline-config disclosure · ad-hoc confirm/prompt dialog */
3
-
4
- .fab {
5
- position: fixed;
6
- bottom: var(--s-6);
7
- right: var(--s-6);
8
- z-index: 90;
9
- width: 48px;
10
- height: 48px;
11
- border-radius: 50%;
12
- background: var(--ink);
13
- color: var(--bg-elev);
14
- border: 0;
15
- cursor: pointer;
16
- display: inline-flex;
17
- align-items: center;
18
- justify-content: center;
19
- box-shadow:
20
- 0 6px 16px -6px rgba(26, 24, 21, 0.25),
21
- 0 1px 0 rgba(26, 24, 21, 0.06);
22
- transition: background .12s ease, transform .15s ease, box-shadow .15s ease;
23
- }
24
- .fab:hover {
25
- background: #000;
26
- transform: translateY(-1px);
27
- box-shadow:
28
- 0 10px 22px -6px rgba(26, 24, 21, 0.26),
29
- 0 2px 0 rgba(26, 24, 21, 0.08);
30
- }
31
- .fab:active { transform: scale(0.96); }
32
-
33
- .modal-backdrop {
34
- position: fixed;
35
- inset: 0;
36
- z-index: 200;
37
- background: rgba(26, 24, 21, 0.42);
38
- backdrop-filter: blur(2px);
39
- -webkit-backdrop-filter: blur(2px);
40
- display: flex;
41
- align-items: center;
42
- justify-content: center;
43
- padding: var(--s-6);
44
- animation: backdrop-in .18s ease;
45
- }
46
- @keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
47
-
48
- .modal {
49
- background: var(--bg-elev);
50
- border: 1px solid var(--border);
51
- border-radius: 14px;
52
- width: min(560px, 100%);
53
- max-height: 90vh;
54
- display: flex;
55
- flex-direction: column;
56
- overflow: hidden;
57
- box-shadow:
58
- 0 32px 80px -20px rgba(26, 24, 21, 0.32),
59
- 0 8px 20px -4px rgba(26, 24, 21, 0.10),
60
- 0 0 0 1px rgba(26, 24, 21, 0.02);
61
- animation: modal-in .22s cubic-bezier(.4, 0, .2, 1);
62
- }
63
- @keyframes modal-in {
64
- from { opacity: 0; transform: translateY(12px) scale(0.98); }
65
- to { opacity: 1; transform: translateY(0) scale(1); }
66
- }
67
-
68
- .modal-head {
69
- display: flex;
70
- align-items: center;
71
- justify-content: space-between;
72
- gap: var(--s-3);
73
- padding: 16px 20px;
74
- border-bottom: 1px solid var(--border-soft);
75
- }
76
- .modal-head h2 {
77
- font-size: 15px;
78
- font-weight: 600;
79
- color: var(--ink);
80
- letter-spacing: -0.005em;
81
- margin: 0;
82
- }
83
-
84
- /* Red close X · subtle by default, fills red on hover. Available on
85
- <Modal> and on confirm/prompt dialogs via dialog.js. */
86
- .modal-close {
87
- appearance: none;
88
- background: transparent;
89
- border: 0;
90
- padding: 0;
91
- width: 26px;
92
- height: 26px;
93
- border-radius: 8px;
94
- cursor: pointer;
95
- color: #c44a4a;
96
- display: inline-flex;
97
- align-items: center;
98
- justify-content: center;
99
- transition: color .12s ease, background .12s ease, transform .12s ease;
100
- }
101
- .modal-close:hover {
102
- background: rgba(196, 74, 74, 0.10);
103
- color: #b03737;
104
- }
105
- .modal-close:active { transform: scale(0.94); }
106
- .modal-close svg { display: block; }
107
-
108
- .modal-body {
109
- padding: 18px 20px;
110
- overflow-y: auto;
111
- flex: 1;
112
- }
113
- .modal-hint {
114
- font-size: 13px;
115
- color: var(--ink-muted);
116
- margin-bottom: var(--s-4);
117
- }
118
- .modal-hint code {
119
- font-family: var(--mono);
120
- font-size: 11.5px;
121
- background: var(--bg);
122
- padding: 1px 5px;
123
- border-radius: 4px;
124
- border: 1px solid var(--border-soft);
125
- }
126
-
127
- .modal-foot {
128
- display: flex;
129
- justify-content: flex-end;
130
- gap: 8px;
131
- padding: 12px 20px;
132
- border-top: 1px solid var(--border-soft);
133
- background: var(--bg);
134
- }
135
-
136
- /* Nested "Edit repos" disclosure inside the new-session modal */
137
- .repos-inline-config {
138
- margin: var(--s-3) 0;
139
- border: 1px solid var(--border);
140
- border-radius: var(--r-sm);
141
- background: var(--bg);
142
- }
143
- .repos-inline-config summary {
144
- cursor: pointer;
145
- padding: 8px var(--s-3);
146
- font-size: 12.5px;
147
- color: var(--ink-mid);
148
- font-weight: 500;
149
- user-select: none;
150
- }
151
- .repos-inline-config summary::marker { color: var(--ink-mid); }
152
- .repos-inline-config summary:hover { color: var(--ink); }
153
- .repos-inline-config[open] summary { border-bottom: 1px solid var(--border); }
154
- .repos-inline-body {
155
- padding: var(--s-3);
156
- background: var(--bg-elev);
157
- border-radius: 0 0 var(--r-sm) var(--r-sm);
158
- }
159
- .repos-inline-actions {
160
- display: flex;
161
- gap: var(--s-3);
162
- align-items: center;
163
- margin-top: var(--s-3);
164
- }
165
-
166
- /* Narrower variant for confirm/prompt — keeps a head with the red close X */
167
- .modal-dialog { width: min(440px, 100%); }
168
- .modal-dialog .modal-body { padding: 14px 20px 16px; }
169
- .modal-dialog input[type="text"] {
170
- width: 100%;
171
- max-width: none;
172
- margin-top: 8px;
173
- }
174
-
175
- /* Picker modals (CLI / Folder / Repos on launch page) — body is flush
176
- so Picker.js controls inner padding. */
177
- .modal-picker .modal-body { padding: 0; }
178
-
179
- .dialog-msg {
180
- font-size: 13.5px;
181
- color: var(--ink-mid);
182
- line-height: 1.55;
183
- }
1
+ /* Floating action button · modal backdrop / shell / sections ·
2
+ nested repos-inline-config disclosure · ad-hoc confirm/prompt dialog */
3
+
4
+ .fab {
5
+ position: fixed;
6
+ bottom: var(--s-6);
7
+ right: var(--s-6);
8
+ z-index: 90;
9
+ width: 48px;
10
+ height: 48px;
11
+ border-radius: 50%;
12
+ background: var(--ink);
13
+ color: var(--bg-elev);
14
+ border: 0;
15
+ cursor: pointer;
16
+ display: inline-flex;
17
+ align-items: center;
18
+ justify-content: center;
19
+ box-shadow:
20
+ 0 6px 16px -6px rgba(26, 24, 21, 0.25),
21
+ 0 1px 0 rgba(26, 24, 21, 0.06);
22
+ transition: background .12s ease, transform .15s ease, box-shadow .15s ease;
23
+ }
24
+ .fab:hover {
25
+ background: #000;
26
+ transform: translateY(-1px);
27
+ box-shadow:
28
+ 0 10px 22px -6px rgba(26, 24, 21, 0.26),
29
+ 0 2px 0 rgba(26, 24, 21, 0.08);
30
+ }
31
+ .fab:active { transform: scale(0.96); }
32
+
33
+ .modal-backdrop {
34
+ position: fixed;
35
+ inset: 0;
36
+ z-index: 200;
37
+ /* Opaque scrim only — no backdrop-filter. `backdrop-filter: blur()` on
38
+ top of a complex page (sidebar tree + xterm canvas + scrollable
39
+ lists) forced a re-composite of the entire viewport every frame
40
+ during the open animation; on this machine that pegged the GPU and
41
+ made the modal feel "stuck". A slightly more opaque scrim conveys
42
+ the same "page is suspended" signal at zero GPU cost. */
43
+ background: rgba(26, 24, 21, 0.5);
44
+ display: flex;
45
+ align-items: center;
46
+ justify-content: center;
47
+ padding: var(--s-6);
48
+ animation: backdrop-in .12s ease-out;
49
+ }
50
+ @keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
51
+
52
+ .modal {
53
+ background: var(--bg-elev);
54
+ border: 1px solid var(--border);
55
+ border-radius: 14px;
56
+ width: min(560px, 100%);
57
+ max-height: 90vh;
58
+ display: flex;
59
+ flex-direction: column;
60
+ overflow: hidden;
61
+ /* Single shadow instead of three. The previous stack had an 80px-radius
62
+ drop-shadow that the GPU has to redraw on every transform tick during
63
+ modal-in — visually negligible difference, big perf win. */
64
+ box-shadow: 0 12px 32px -8px rgba(26, 24, 21, 0.28);
65
+ /* Pin a compositor layer + give the animated transform a stable rect so
66
+ the browser doesn't reflow on each frame. */
67
+ will-change: transform, opacity;
68
+ animation: modal-in .14s ease-out;
69
+ }
70
+ @keyframes modal-in {
71
+ from { opacity: 0; transform: translateY(8px); }
72
+ to { opacity: 1; transform: translateY(0); }
73
+ }
74
+
75
+ .modal-head {
76
+ display: flex;
77
+ align-items: center;
78
+ justify-content: space-between;
79
+ gap: var(--s-3);
80
+ padding: 16px 20px;
81
+ border-bottom: 1px solid var(--border-soft);
82
+ }
83
+ .modal-head h2 {
84
+ font-size: 15px;
85
+ font-weight: 600;
86
+ color: var(--ink);
87
+ letter-spacing: -0.005em;
88
+ margin: 0;
89
+ }
90
+
91
+ /* Red close X · subtle by default, fills red on hover. Available on
92
+ <Modal> and on confirm/prompt dialogs via dialog.js. */
93
+ .modal-close {
94
+ appearance: none;
95
+ background: transparent;
96
+ border: 0;
97
+ padding: 0;
98
+ width: 26px;
99
+ height: 26px;
100
+ border-radius: 8px;
101
+ cursor: pointer;
102
+ color: #c44a4a;
103
+ display: inline-flex;
104
+ align-items: center;
105
+ justify-content: center;
106
+ transition: color .12s ease, background .12s ease, transform .12s ease;
107
+ }
108
+ .modal-close:hover {
109
+ background: rgba(196, 74, 74, 0.10);
110
+ color: #b03737;
111
+ }
112
+ .modal-close:active { transform: scale(0.94); }
113
+ .modal-close svg { display: block; }
114
+
115
+ .modal-body {
116
+ padding: 18px 20px;
117
+ overflow-y: auto;
118
+ flex: 1;
119
+ }
120
+ .modal-hint {
121
+ font-size: 13px;
122
+ color: var(--ink-muted);
123
+ margin-bottom: var(--s-4);
124
+ }
125
+ .modal-hint code {
126
+ font-family: var(--mono);
127
+ font-size: 11.5px;
128
+ background: var(--bg);
129
+ padding: 1px 5px;
130
+ border-radius: 4px;
131
+ border: 1px solid var(--border-soft);
132
+ }
133
+
134
+ .modal-foot {
135
+ display: flex;
136
+ justify-content: flex-end;
137
+ gap: 8px;
138
+ padding: 12px 20px;
139
+ border-top: 1px solid var(--border-soft);
140
+ background: var(--bg);
141
+ }
142
+
143
+ /* Nested "Edit repos" disclosure inside the new-session modal */
144
+ .repos-inline-config {
145
+ margin: var(--s-3) 0;
146
+ border: 1px solid var(--border);
147
+ border-radius: var(--r-sm);
148
+ background: var(--bg);
149
+ }
150
+ .repos-inline-config summary {
151
+ cursor: pointer;
152
+ padding: 8px var(--s-3);
153
+ font-size: 12.5px;
154
+ color: var(--ink-mid);
155
+ font-weight: 500;
156
+ user-select: none;
157
+ }
158
+ .repos-inline-config summary::marker { color: var(--ink-mid); }
159
+ .repos-inline-config summary:hover { color: var(--ink); }
160
+ .repos-inline-config[open] summary { border-bottom: 1px solid var(--border); }
161
+ .repos-inline-body {
162
+ padding: var(--s-3);
163
+ background: var(--bg-elev);
164
+ border-radius: 0 0 var(--r-sm) var(--r-sm);
165
+ }
166
+ .repos-inline-actions {
167
+ display: flex;
168
+ gap: var(--s-3);
169
+ align-items: center;
170
+ margin-top: var(--s-3);
171
+ }
172
+
173
+ /* Narrower variant for confirm/prompt — keeps a head with the red close X */
174
+ .modal-dialog { width: min(440px, 100%); }
175
+ .modal-dialog .modal-body { padding: 14px 20px 16px; }
176
+ .modal-dialog input[type="text"] {
177
+ width: 100%;
178
+ max-width: none;
179
+ margin-top: 8px;
180
+ }
181
+
182
+ /* Picker modals (CLI / Folder / Repos on launch page) — body is flush
183
+ so Picker.js controls inner padding. */
184
+ .modal-picker .modal-body { padding: 0; }
185
+
186
+ .dialog-msg {
187
+ font-size: 13.5px;
188
+ color: var(--ink-mid);
189
+ line-height: 1.55;
190
+ }
@@ -1,10 +1,10 @@
1
- /* Narrow viewports: force-collapse sidebar, single-col config grid */
2
-
3
- @media (max-width: 900px) {
4
- .app { grid-template-columns: var(--sidebar-w-collapsed) 1fr !important; }
5
- .sidebar { padding: 0 var(--s-2); }
6
- .brand-name, .nav-label, .nav-badge { opacity: 0; pointer-events: none; }
7
- .main { padding: 0 var(--s-4); }
8
- .page-head { flex-direction: column; gap: var(--s-3); }
9
- .config-grid { grid-template-columns: 1fr; }
10
- }
1
+ /* Narrow viewports: force-collapse sidebar, single-col config grid */
2
+
3
+ @media (max-width: 900px) {
4
+ .app { grid-template-columns: var(--sidebar-w-collapsed) 1fr !important; }
5
+ .sidebar { padding: 0 var(--s-2); }
6
+ .brand-name, .nav-label, .nav-badge { opacity: 0; pointer-events: none; }
7
+ .main { padding: 0 var(--s-4); }
8
+ .page-head { flex-direction: column; gap: var(--s-3); }
9
+ .config-grid { grid-template-columns: 1fr; }
10
+ }