@codemem/server 0.22.0-alpha.5 → 0.22.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.
package/static/index.html CHANGED
@@ -531,6 +531,58 @@
531
531
  outline-offset: 2px;
532
532
  }
533
533
 
534
+ .sync-redact-control {
535
+ display: inline-flex;
536
+ align-items: center;
537
+ gap: 6px;
538
+ }
539
+
540
+ .sync-redact-switch {
541
+ width: 34px;
542
+ height: 20px;
543
+ border: 1px solid color-mix(in srgb, var(--text-tertiary) 42%, var(--control-border));
544
+ border-radius: var(--radius-pill);
545
+ background: color-mix(in srgb, var(--surface-1) 82%, var(--surface-0));
546
+ box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text-tertiary) 8%, transparent);
547
+ cursor: pointer;
548
+ flex-shrink: 0;
549
+ padding: 1px;
550
+ transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
551
+ }
552
+
553
+ .sync-redact-switch:hover {
554
+ border-color: color-mix(in srgb, var(--accent) 38%, var(--control-hover-border));
555
+ }
556
+
557
+ .sync-redact-switch:focus-visible {
558
+ outline: 2px solid var(--accent);
559
+ outline-offset: 2px;
560
+ }
561
+
562
+ .sync-redact-switch[data-state="checked"] {
563
+ background: color-mix(in srgb, var(--accent) 18%, var(--surface-1));
564
+ border-color: color-mix(in srgb, var(--accent) 54%, var(--control-hover-border));
565
+ box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
566
+ }
567
+
568
+ .sync-redact-switch-thumb {
569
+ display: block;
570
+ width: 16px;
571
+ height: 16px;
572
+ border-radius: 50%;
573
+ background: color-mix(in srgb, var(--surface-0) 88%, white);
574
+ border: 1px solid color-mix(in srgb, var(--text-tertiary) 24%, transparent);
575
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
576
+ transition: transform 0.15s ease, background 0.15s ease;
577
+ transform: translateX(0);
578
+ }
579
+
580
+ .sync-redact-switch[data-state="checked"] .sync-redact-switch-thumb {
581
+ transform: translateX(14px);
582
+ background: color-mix(in srgb, var(--accent) 88%, white);
583
+ border-color: color-mix(in srgb, var(--accent) 42%, transparent);
584
+ }
585
+
534
586
  /* ── Selects / inputs ──────────────────────────────────── */
535
587
 
536
588
  .project-filter,
@@ -883,6 +935,7 @@
883
935
  border-radius: var(--radius-sm);
884
936
  background: var(--surface-2);
885
937
  }
938
+ .sync-action + .sync-action { margin-top: var(--sp-2); }
886
939
 
887
940
  .health-action-text, .sync-action-text { font-size: 13px; color: var(--text-primary); flex: 1; min-width: 0; }
888
941
  .health-action-command, .sync-action-command { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 12px; color: var(--text-tertiary); }
@@ -1051,11 +1104,81 @@
1051
1104
  color: var(--text-secondary);
1052
1105
  font-feature-settings: 'tnum' 1;
1053
1106
  }
1054
- .sync-legacy-claim-row { margin-top: 12px; gap: 12px; align-items: center; flex-wrap: wrap; }
1055
- .sync-legacy-select {
1107
+ .sync-radix-select-host {
1108
+ min-width: 0;
1109
+ max-width: 100%;
1110
+ }
1111
+ .sync-actor-select-host {
1112
+ min-width: 220px;
1113
+ max-width: 100%;
1114
+ flex: 1 1 220px;
1115
+ }
1116
+ .sync-legacy-select-host {
1056
1117
  min-width: 320px;
1057
1118
  max-width: 100%;
1058
1119
  flex: 1 1 320px;
1120
+ }
1121
+ .sync-radix-select-trigger {
1122
+ display: inline-flex;
1123
+ align-items: center;
1124
+ justify-content: space-between;
1125
+ gap: 8px;
1126
+ width: 100%;
1127
+ text-align: left;
1128
+ }
1129
+ .sync-radix-select-trigger > span:first-child {
1130
+ min-width: 0;
1131
+ overflow: hidden;
1132
+ text-overflow: ellipsis;
1133
+ white-space: nowrap;
1134
+ }
1135
+ .sync-radix-select-icon {
1136
+ color: var(--text-tertiary);
1137
+ flex: 0 0 auto;
1138
+ }
1139
+ .sync-radix-select-content {
1140
+ z-index: 30;
1141
+ min-width: var(--radix-select-trigger-width);
1142
+ max-width: min(420px, calc(100vw - 24px));
1143
+ overflow: hidden;
1144
+ border: 1px solid var(--border);
1145
+ border-radius: var(--radius-md);
1146
+ background: var(--surface-1);
1147
+ box-shadow: var(--shadow-lg);
1148
+ }
1149
+ .sync-radix-select-viewport {
1150
+ padding: 6px;
1151
+ }
1152
+ .sync-radix-select-item {
1153
+ position: relative;
1154
+ display: flex;
1155
+ align-items: center;
1156
+ justify-content: space-between;
1157
+ gap: 12px;
1158
+ min-height: 36px;
1159
+ padding: 8px 12px;
1160
+ border-radius: var(--radius-sm);
1161
+ color: var(--text-primary);
1162
+ font-family: var(--font-sans);
1163
+ font-size: 13px;
1164
+ cursor: pointer;
1165
+ user-select: none;
1166
+ }
1167
+ .sync-radix-select-item[data-highlighted] {
1168
+ outline: none;
1169
+ background: var(--accent-subtle);
1170
+ color: var(--accent);
1171
+ }
1172
+ .sync-radix-select-item[data-disabled] {
1173
+ opacity: 0.45;
1174
+ cursor: default;
1175
+ }
1176
+ .sync-radix-select-indicator {
1177
+ color: var(--accent);
1178
+ flex: 0 0 auto;
1179
+ }
1180
+ .sync-legacy-claim-row { margin-top: 12px; gap: 12px; align-items: center; flex-wrap: wrap; }
1181
+ .sync-legacy-select {
1059
1182
  padding: 8px 12px;
1060
1183
  border-radius: var(--radius-md);
1061
1184
  border: 1px solid var(--border);
@@ -1098,9 +1221,6 @@
1098
1221
  transform: none;
1099
1222
  }
1100
1223
  .sync-actor-select {
1101
- min-width: 220px;
1102
- max-width: 100%;
1103
- flex: 1 1 220px;
1104
1224
  padding: 8px 12px;
1105
1225
  border-radius: var(--radius-md);
1106
1226
  border: 1px solid var(--border);
@@ -1397,6 +1517,38 @@
1397
1517
  transition: background 0.15s ease;
1398
1518
  }
1399
1519
  .settings-save:hover { background: var(--control-hover-bg); }
1520
+ .sync-dialog-card {
1521
+ width: min(560px, 100%);
1522
+ }
1523
+ .sync-dialog-actions {
1524
+ display: flex;
1525
+ gap: var(--sp-2);
1526
+ align-items: center;
1527
+ }
1528
+ .sync-dialog-input {
1529
+ width: 100%;
1530
+ padding: var(--sp-2) var(--sp-3);
1531
+ border-radius: var(--radius-sm);
1532
+ border: 1px solid var(--border);
1533
+ background: var(--input-bg);
1534
+ color: var(--text-primary);
1535
+ font-family: var(--font-sans);
1536
+ font-size: 13px;
1537
+ }
1538
+ .sync-dialog-input:focus {
1539
+ outline: none;
1540
+ border-color: var(--accent);
1541
+ box-shadow: 0 0 0 3px var(--focus-ring);
1542
+ }
1543
+ .sync-dialog-confirm.danger {
1544
+ background: rgba(182, 75, 47, 0.12);
1545
+ border-color: rgba(182, 75, 47, 0.28);
1546
+ color: var(--accent-warm);
1547
+ }
1548
+ .sync-dialog-confirm.danger:hover {
1549
+ background: rgba(182, 75, 47, 0.18);
1550
+ border-color: rgba(182, 75, 47, 0.38);
1551
+ }
1400
1552
  .settings-save:disabled { opacity: 0.6; cursor: not-allowed; }
1401
1553
  .settings-note { color: var(--text-tertiary); font-size: 12px; }
1402
1554
 
@@ -1493,8 +1645,8 @@
1493
1645
  <div class="app-notice" id="globalNotice" hidden aria-live="polite"></div>
1494
1646
 
1495
1647
  <!-- ── Settings modal ──────────────────────────────────── -->
1496
- <div class="modal-backdrop" id="settingsBackdrop" hidden></div>
1497
- <div class="modal" id="settingsModal" hidden role="dialog" aria-modal="true" aria-labelledby="settingsTitle" aria-describedby="settingsDescription" tabindex="-1">
1648
+ <div id="settingsDialogMount"></div>
1649
+ <template id="settingsDialogTemplate">
1498
1650
  <div class="modal-card">
1499
1651
  <div class="modal-header">
1500
1652
  <h2 id="settingsTitle">Memory & model settings</h2>
@@ -1673,7 +1825,7 @@
1673
1825
  <button class="settings-save" id="settingsSave">Save</button>
1674
1826
  </div>
1675
1827
  </div>
1676
- </div>
1828
+ </template>
1677
1829
 
1678
1830
  <!-- ── Tab: Feed ───────────────────────────────────────── -->
1679
1831
  <div class="tab-panel" id="tab-feed">
@@ -1748,28 +1900,7 @@
1748
1900
  </div>
1749
1901
  </div>
1750
1902
  <div id="syncAdminSection">
1751
- <button class="sync-toggle-admin" id="syncToggleAdmin" aria-expanded="false" aria-controls="syncInvitePanel">Set up a new team instead…</button>
1752
- <div id="syncInvitePanel" hidden>
1753
- <h3 class="settings-group-title" style="margin-top:12px">Create a team</h3>
1754
- <div class="section-meta">Generate an invite to share with teammates.</div>
1755
- <div class="actor-create-row">
1756
- <label for="syncInviteGroup" class="sr-only">Team name</label>
1757
- <input class="peer-scope-input" id="syncInviteGroup" placeholder="Team name (e.g. my-team)" />
1758
- <label for="syncInvitePolicy" class="sr-only">Join policy</label>
1759
- <select class="sync-actor-select" id="syncInvitePolicy">
1760
- <option value="auto_admit">Auto-admit</option>
1761
- <option value="approval_required">Approval required</option>
1762
- </select>
1763
- <div class="sync-ttl-group">
1764
- <label for="syncInviteTtl">Expires in</label>
1765
- <input class="peer-scope-input" id="syncInviteTtl" type="number" min="1" value="24" style="width:64px" />
1766
- <label>hours</label>
1767
- </div>
1768
- <button class="settings-button" id="syncCreateInviteButton">Create invite</button>
1769
- </div>
1770
- <label for="syncInviteOutput" class="sr-only">Generated invite</label>
1771
- <textarea class="feed-search" id="syncInviteOutput" placeholder="Invite will appear here" readonly hidden></textarea>
1772
- </div>
1903
+ <div id="syncAdminDisclosureMount" style="display: contents"></div>
1773
1904
  </div>
1774
1905
  </div>
1775
1906
  <h3 class="settings-group-title" style="margin-top: 20px">Team status</h3>
@@ -1818,7 +1949,7 @@
1818
1949
  <div class="peer-meta" id="syncLegacyClaimsMeta"></div>
1819
1950
  <div class="peer-actions sync-legacy-claim-row">
1820
1951
  <label for="syncLegacyDeviceSelect" class="sr-only">Legacy device</label>
1821
- <select class="sync-legacy-select" id="syncLegacyDeviceSelect"></select>
1952
+ <div class="sync-radix-select-host sync-legacy-select-host" id="syncLegacyDeviceSelectMount"></div>
1822
1953
  <button class="sync-legacy-button" id="syncLegacyClaimButton">Attach device history</button>
1823
1954
  </div>
1824
1955
  </div>
@@ -1829,10 +1960,10 @@
1829
1960
  <div class="section-header">
1830
1961
  <h2>Advanced diagnostics</h2>
1831
1962
  <div class="section-actions">
1832
- <button class="settings-button" id="syncPairingToggle">Show pairing</button>
1833
- <label class="small" style="display:inline-flex;align-items:center;gap:6px;">
1834
- <input id="syncRedact" type="checkbox" checked />
1835
- Redact
1963
+ <div id="syncPairingDisclosureMount" style="display: contents"></div>
1964
+ <label class="small sync-redact-control">
1965
+ <span id="syncRedactMount"></span>
1966
+ <span id="syncRedactLabel">Redact</span>
1836
1967
  </label>
1837
1968
  </div>
1838
1969
  </div>
@@ -1845,16 +1976,7 @@
1845
1976
  <div class="sync-actions" id="syncActions"></div>
1846
1977
  <div class="grid-2" id="syncStatusGrid"></div>
1847
1978
 
1848
- <div class="pairing-card" id="syncPairing" hidden>
1849
- <div class="peer-title">
1850
- <strong>Pairing command</strong>
1851
- <div class="peer-actions"><button id="pairingCopy">Copy command</button></div>
1852
- </div>
1853
- <div class="pairing-body">
1854
- <pre id="pairingPayload" style="user-select:all">Loading…</pre>
1855
- </div>
1856
- <div class="peer-meta" id="pairingHint">Copy and run on the other device. Use --include/--exclude to control which projects sync.</div>
1857
- </div>
1979
+ <div id="syncPairingPanelMount" style="display: contents"></div>
1858
1980
 
1859
1981
  <h3 class="settings-group-title" style="margin-top: 20px">Recent sync attempts</h3>
1860
1982
  <div class="attempts-list" id="syncAttempts"></div>