@promptctl/cc-candybar 1.36.0 → 1.38.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/dist/index.mjs +96 -93
- package/package.json +5 -5
- package/schema/cc-candybar.schema.json +124 -0
- package/src/check.ts +4 -4
- package/src/click/wire.ts +10 -1
- package/src/config/action.ts +110 -1
- package/src/config/default-dsl-config.ts +64 -228
- package/src/config/loader/actions.ts +138 -61
- package/src/config/loader/cross-ref.ts +48 -10
- package/src/config/loader/globals.ts +46 -1
- package/src/config/presets.ts +8 -3
- package/src/config/settings-menu.ts +338 -16
- package/src/daemon/render-payload.ts +7 -5
- package/src/daemon/server.ts +20 -7
- package/src/daemon/verbs/config-validators.ts +14 -11
- package/src/daemon/verbs/index.ts +39 -3
- package/src/daemon/verbs/state-validators.ts +26 -8
- package/src/demo/dsl.ts +7 -6
- package/src/help-text.ts +6 -3
- package/src/install/index.ts +2 -2
- package/src/render/action.ts +199 -45
- package/src/render/picker.ts +34 -32
- package/src/render/strip.ts +6 -10
- package/src/themes/index.ts +2 -0
- package/src/themes/policy.ts +199 -40
|
@@ -246,13 +246,22 @@ function etaHeatFg(etaRef: string, warnRef: string): string {
|
|
|
246
246
|
// hand-authored JSON5, so a malformed group is still caught loudly at import
|
|
247
247
|
// time — the type safety net just moves from tsc to that parse, never lost.
|
|
248
248
|
//
|
|
249
|
-
// One collapsed-by-default drawer holding
|
|
250
|
-
//
|
|
251
|
-
//
|
|
252
|
-
//
|
|
253
|
-
//
|
|
254
|
-
// segment
|
|
255
|
-
//
|
|
249
|
+
// One collapsed-by-default drawer holding what the SESSION-scoped settings
|
|
250
|
+
// menu deliberately does not: `charset` and `colorCompatibility` — terminal
|
|
251
|
+
// capability facts (glyph coverage, colour depth) rather than tastes that
|
|
252
|
+
// vary session to session, so they have no session half to choose between —
|
|
253
|
+
// and one segment-scoped persist control (directoryPaletteControl, a
|
|
254
|
+
// per-segment palette pin rather than a whole-bar default).
|
|
255
|
+
//
|
|
256
|
+
// [LAW:one-source-of-truth] candybar-settings-ui-aok.3 moved every setting
|
|
257
|
+
// with BOTH halves — theme/style/look/preset/autoWrap/padding — out of this
|
|
258
|
+
// drawer and into the synthesized settings menu, where each is ONE control
|
|
259
|
+
// whose destination the `persist?` selector chooses. They used to be spelled
|
|
260
|
+
// twice here (`{{ menu "applyTheme" }}` beside `📌{{ menu
|
|
261
|
+
// "applyThemeForever" }}`), which is exactly the second representation that
|
|
262
|
+
// collapse removed. What is left in this drawer is durable-only by nature,
|
|
263
|
+
// not by omission — there is nothing for a persist? selector to choose.
|
|
264
|
+
//
|
|
256
265
|
// Placed as a sibling in row 1's horizontal container, toggled from beside the
|
|
257
266
|
// quick-action tray — see `root` below.
|
|
258
267
|
//
|
|
@@ -262,26 +271,16 @@ function etaHeatFg(etaRef: string, warnRef: string): string {
|
|
|
262
271
|
// root too), so a second `settingsDrawer` reference embedded in a preset's
|
|
263
272
|
// own root would be a SECOND declaration of "settings" and collide with
|
|
264
273
|
// itself, not a reuse of the first. It stays only in the default `root`
|
|
265
|
-
// below; the library presets under `presets:` reach
|
|
266
|
-
//
|
|
267
|
-
//
|
|
268
|
-
//
|
|
274
|
+
// below; the library presets under `presets:` reach it by switching back to
|
|
275
|
+
// the "default" preset from the GLOBAL settings menu, which
|
|
276
|
+
// synthesizeSettingsMenu splices into every preset root
|
|
277
|
+
// (src/config/settings-menu.ts) — never by re-embedding this group.
|
|
269
278
|
const settingsDrawer = {
|
|
270
279
|
kind: "group",
|
|
271
280
|
name: "settings",
|
|
272
|
-
label: "⚙
|
|
281
|
+
label: "⚙ terminal",
|
|
273
282
|
direction: "horizontal",
|
|
274
|
-
children: [
|
|
275
|
-
"themeControl",
|
|
276
|
-
"lookControl",
|
|
277
|
-
"presetControl",
|
|
278
|
-
"styleControl",
|
|
279
|
-
"charsetControl",
|
|
280
|
-
"colorCompatControl",
|
|
281
|
-
"wrapToggleControl",
|
|
282
|
-
"paddingControl",
|
|
283
|
-
"directoryPaletteControl",
|
|
284
|
-
],
|
|
283
|
+
children: ["charsetControl", "colorCompatControl", "directoryPaletteControl"],
|
|
285
284
|
} as unknown as LayoutNode;
|
|
286
285
|
|
|
287
286
|
// ─── The default config ──────────────────────────────────────────────────────
|
|
@@ -304,8 +303,8 @@ export const RAW_DEFAULT_DSL_CONFIG = {
|
|
|
304
303
|
// catppuccin-latte — a light palette that landed as a drive-by in an
|
|
305
304
|
// unrelated formatting-cleanup commit and read poorly on the dark
|
|
306
305
|
// terminals most users run — after live-clicking every registry theme
|
|
307
|
-
// through the
|
|
308
|
-
// per-row hue-step
|
|
306
|
+
// through the settings menu's theme picker: it stays legible as the
|
|
307
|
+
// per-row hue-step shifts each
|
|
309
308
|
// row's hue, where warmer bases (gruvbox, dracula) drifted toward mud
|
|
310
309
|
// and the pastel ones (rose-pine, atom-one) washed out at this
|
|
311
310
|
// contrast.
|
|
@@ -775,14 +774,7 @@ export const RAW_DEFAULT_DSL_CONFIG = {
|
|
|
775
774
|
default: 0,
|
|
776
775
|
},
|
|
777
776
|
|
|
778
|
-
//
|
|
779
|
-
// [LAW:one-source-of-truth] `activeStyle` reads the SAME "style" SessionState
|
|
780
|
-
// key the daemon resolves into the strip joiner per render (see
|
|
781
|
-
// effectiveStripStyle wiring in src/daemon/server.ts) — the picker's write
|
|
782
|
-
// and the render's read are one value. Empty default ⇒ the daemon's
|
|
783
|
-
// "powerline" floor is in effect and styleControl shows "(default)".
|
|
784
|
-
activeStyle: { kind: "state", key: "style", default: "" },
|
|
785
|
-
// No page-cursor var: the styleControl {{ menu }} synthesizes its own page
|
|
777
|
+
// No page-cursor var: a {{ menu }} synthesizes its own page
|
|
786
778
|
// cursor (state var + int action, named by menuPageKey) under the reserved
|
|
787
779
|
// menus.* namespace, alongside its open-state.
|
|
788
780
|
},
|
|
@@ -1128,104 +1120,16 @@ export const RAW_DEFAULT_DSL_CONFIG = {
|
|
|
1128
1120
|
" .metrics.sessionDuration .metrics.messageCount" +
|
|
1129
1121
|
" .metrics.linesAdded .metrics.linesRemoved }}",
|
|
1130
1122
|
},
|
|
1131
|
-
//
|
|
1132
|
-
//
|
|
1133
|
-
//
|
|
1134
|
-
//
|
|
1135
|
-
//
|
|
1136
|
-
//
|
|
1137
|
-
//
|
|
1138
|
-
//
|
|
1139
|
-
//
|
|
1140
|
-
//
|
|
1141
|
-
// render) and stay-open, so shapes can be tried in a row; ▾/✕ collapse.
|
|
1142
|
-
// [LAW:dataflow-not-control-flow] No display state from the provider — the
|
|
1143
|
-
// label is the one "style" value the click writes and the render reads.
|
|
1144
|
-
// Lives inside the settingsDrawer group (candybar-config-engine-71o.4) — not
|
|
1145
|
-
// on `root` directly — so it renders only while the drawer is open.
|
|
1146
|
-
// The 📌 "make default" menu + ↺ reset, one per control below, is
|
|
1147
|
-
// styleControl/themeControl/lookControl's PERSIST twin (candybar-config-
|
|
1148
|
-
// engine-71o.5) — the exact pairing charsetControl/colorCompatControl/
|
|
1149
|
-
// wrapToggleControl/paddingControl already use, since theme/style/look
|
|
1150
|
-
// are the only three of the drawer's seven knobs with a session `set`
|
|
1151
|
-
// half at all. Its own "pickersForever" accordion key keeps the
|
|
1152
|
-
// persist tier visually distinct from the existing "pickers" try tier
|
|
1153
|
-
// (opening a session preview and opening a "pin as default" picker are
|
|
1154
|
-
// different intents; auto-closing one when the other opens would
|
|
1155
|
-
// conflate them) without touching the already-shipped/tested "pickers"
|
|
1156
|
-
// accordion's membership.
|
|
1157
|
-
styleControl: {
|
|
1158
|
-
template:
|
|
1159
|
-
"✦ {{ if .activeStyle }}{{ .activeStyle }}{{ else }}(default){{ end }} " +
|
|
1160
|
-
'{{ menu "applyStyle" }} ' +
|
|
1161
|
-
'📌{{ menu "applyStyleForever" (dict "key" "pickersForever") }} ' +
|
|
1162
|
-
'{{ action "resetStyle" "↺" }}',
|
|
1163
|
-
bg: "surface",
|
|
1164
|
-
fg: "foreground",
|
|
1165
|
-
},
|
|
1166
|
-
// Theme control — the palette switcher, wired into the DEFAULT bar
|
|
1167
|
-
// (brandon-theming-8uj.1) so theme selection is discoverable without
|
|
1168
|
-
// reading docs/interaction-authoring.md or hand-authoring a config.
|
|
1169
|
-
// [LAW:one-source-of-truth] The trigger reads `.theme.effective` — the
|
|
1170
|
-
// SAME daemon-resolved name (effectiveThemeName) the rendered basePalette
|
|
1171
|
-
// is built from — so the label and the colors can never drift; unlike
|
|
1172
|
-
// styleControl (no "effective style" input exists), no extra `state`
|
|
1173
|
-
// variable is needed here. Shares the "pickers" accordion key with
|
|
1174
|
-
// lookControl so opening one closes the other, the docs' canonical
|
|
1175
|
-
// two-menu pairing. Moved inside the settingsDrawer group
|
|
1176
|
-
// (candybar-config-engine-71o.4) alongside style/look/charset/
|
|
1177
|
-
// colorCompatibility/autoWrap/padding — one collapsed home for every
|
|
1178
|
-
// bar-mutable display default, instead of its own always-on row.
|
|
1179
|
-
themeControl: {
|
|
1180
|
-
template:
|
|
1181
|
-
"🎨 {{ .theme.effective }} " +
|
|
1182
|
-
'{{ menu "applyTheme" (dict "key" "pickers") }} ' +
|
|
1183
|
-
'📌{{ menu "applyThemeForever" (dict "key" "pickersForever") }} ' +
|
|
1184
|
-
'{{ action "resetTheme" "↺" }}',
|
|
1185
|
-
bg: "surface",
|
|
1186
|
-
fg: "foreground",
|
|
1187
|
-
},
|
|
1188
|
-
// Look control — the theme-ADAPTATION switcher (see the `looks` block
|
|
1189
|
-
// below), the exact twin of themeControl one dimension over:
|
|
1190
|
-
// `.look.effective` is the daemon-resolved name (effectiveLookName) the
|
|
1191
|
-
// rendered ThemeKey composes from. closeOnPick collapses the drop after a
|
|
1192
|
-
// pick — looks are tried one at a time against the chosen theme, not
|
|
1193
|
-
// stacked open.
|
|
1194
|
-
lookControl: {
|
|
1195
|
-
template:
|
|
1196
|
-
"◐ {{ .look.effective }} " +
|
|
1197
|
-
'{{ menu "applyLook" (dict "key" "pickers" "closeOnPick" true) }} ' +
|
|
1198
|
-
'📌{{ menu "applyLookForever" (dict "key" "pickersForever" "closeOnPick" true) }} ' +
|
|
1199
|
-
'{{ action "resetLook" "↺" }}',
|
|
1200
|
-
bg: "surface",
|
|
1201
|
-
fg: "foreground",
|
|
1202
|
-
},
|
|
1203
|
-
// Preset control — the whole-arrangement switcher (brandon-presets-0yk.3),
|
|
1204
|
-
// the exact twin of themeControl/lookControl one level up: `.preset.
|
|
1205
|
-
// effective` is the daemon-resolved name (effectivePresetName) that chose
|
|
1206
|
-
// BOTH the compiled root this render walked and the globals it rendered
|
|
1207
|
-
// with, so the label can never name an arrangement the bar is not in.
|
|
1208
|
-
// closeOnPick on both menus, like lookControl: a preset swap is a
|
|
1209
|
-
// decisive whole-bar change tried one at a time, not a stackable tweak.
|
|
1210
|
-
// Lives inside settingsDrawer (never inside a preset's own staged root —
|
|
1211
|
-
// see settingsDrawer's comment), so every bundled preset — including the
|
|
1212
|
-
// narrow `compact` one — keeps the one control that switches back.
|
|
1213
|
-
presetControl: {
|
|
1214
|
-
template:
|
|
1215
|
-
"▦ {{ .preset.effective }} " +
|
|
1216
|
-
'{{ menu "applyPreset" (dict "key" "pickers" "closeOnPick" true) }} ' +
|
|
1217
|
-
'📌{{ menu "applyPresetForever" (dict "key" "pickersForever" "closeOnPick" true) }} ' +
|
|
1218
|
-
'{{ action "resetPreset" "↺" }}',
|
|
1219
|
-
bg: "surface",
|
|
1220
|
-
fg: "foreground",
|
|
1221
|
-
},
|
|
1222
|
-
// ── The four .3 globals steppers, folded into the settingsDrawer group
|
|
1223
|
-
// (candybar-config-engine-71o.4) alongside theme/style/look above. Each
|
|
1224
|
-
// pairs a `persist` control with a `↺` reset (docs' persist/reset
|
|
1225
|
-
// convention) — these four have no SessionState half at all, so persist
|
|
1226
|
-
// is their only seam, unlike theme/style/look's session `set`. Labels
|
|
1227
|
-
// read `.field.effective` (the daemon-resolved value BuildLineOptions
|
|
1228
|
-
// actually rendered with), never a restated literal.
|
|
1123
|
+
// ── The TWO globals steppers left in this drawer. `charset` and
|
|
1124
|
+
// `colorCompatibility` have no SessionState half at all — they describe
|
|
1125
|
+
// the terminal, not a taste that varies per session — so `persist` is
|
|
1126
|
+
// genuinely their only seam and there is no destination for a `persist?`
|
|
1127
|
+
// selector to choose between. Everything with both halves
|
|
1128
|
+
// (theme/style/look/preset/autoWrap/padding) moved to the synthesized
|
|
1129
|
+
// settings menu as ONE dual control each (candybar-settings-ui-aok.3).
|
|
1130
|
+
// Each pairs a `persist` control with a `↺` reset (docs' persist/reset
|
|
1131
|
+
// convention); labels read `.field.effective` (the daemon-resolved value
|
|
1132
|
+
// BuildLineOptions actually rendered with), never a restated literal.
|
|
1229
1133
|
charsetControl: {
|
|
1230
1134
|
template:
|
|
1231
1135
|
"{{ .charset.effective }} " +
|
|
@@ -1240,20 +1144,6 @@ export const RAW_DEFAULT_DSL_CONFIG = {
|
|
|
1240
1144
|
bg: "surface",
|
|
1241
1145
|
fg: "foreground",
|
|
1242
1146
|
},
|
|
1243
|
-
wrapToggleControl: {
|
|
1244
|
-
template:
|
|
1245
|
-
'{{ action "toggleWrapForever" "wrap: on" "wrap: off" }} ' +
|
|
1246
|
-
'{{ action "resetAutoWrap" "↺" }}',
|
|
1247
|
-
bg: "surface",
|
|
1248
|
-
fg: "foreground",
|
|
1249
|
-
},
|
|
1250
|
-
paddingControl: {
|
|
1251
|
-
template:
|
|
1252
|
-
'{{ action "paddingDownForever" "◀" }} padding {{ .padding.effective }} ' +
|
|
1253
|
-
'{{ action "paddingUpForever" "▶" }} {{ action "resetPadding" "↺" }}',
|
|
1254
|
-
bg: "surface",
|
|
1255
|
-
fg: "foreground",
|
|
1256
|
-
},
|
|
1257
1147
|
// [LAW:verifiable-goals] candybar-config-engine-71o.6's own acceptance
|
|
1258
1148
|
// bar, mirrored from .3/.5: at least ONE segment-scoped field must be
|
|
1259
1149
|
// menu-able from the BUNDLED default with no hand-authored actions.
|
|
@@ -1265,7 +1155,7 @@ export const RAW_DEFAULT_DSL_CONFIG = {
|
|
|
1265
1155
|
// (loader/persist-target.ts) — the SAME `from: "themes"` domain
|
|
1266
1156
|
// applyThemeForever already uses.
|
|
1267
1157
|
// [LAW:one-source-of-truth] exception: unlike charsetControl/
|
|
1268
|
-
//
|
|
1158
|
+
// the other controls' `.field.effective` labels, there is no
|
|
1269
1159
|
// `segments.directory.palette.effective` payload projection — adding one
|
|
1270
1160
|
// would require threading the full DslConfig through
|
|
1271
1161
|
// buildRenderPayload's signature (today built from EffectiveGlobals
|
|
@@ -1367,67 +1257,19 @@ export const RAW_DEFAULT_DSL_CONFIG = {
|
|
|
1367
1257
|
openProject: { open: "{{ .project_dir }}" },
|
|
1368
1258
|
openTranscript: { open: "{{ .transcript_path }}" },
|
|
1369
1259
|
|
|
1370
|
-
// [LAW:locality-or-seam] The
|
|
1371
|
-
// styleControl {{ menu }} above. The disclosure's open-state toggle, its
|
|
1372
|
-
// backing state var, AND the picker body's page cursor (state var + int
|
|
1373
|
-
// action) are all SYNTHESIZED by the menu pass (under the reserved menus.*
|
|
1374
|
-
// namespace) — no hand-authored open/close or page plumbing. This one action
|
|
1375
|
-
// is the picker body's apply effect, gated by derivation
|
|
1376
|
-
// (deriveActionValidators): it writes the chosen shape, gated to the
|
|
1377
|
-
// STRIP_STYLES allow-list because its value source is `from: "styles"`. The
|
|
1378
|
-
// rendered click and the wire gate share that one source — a template cannot
|
|
1379
|
-
// smuggle an un-gated style write.
|
|
1380
|
-
applyStyle: { set: "style", from: "styles" },
|
|
1381
|
-
|
|
1382
|
-
// [LAW:locality-or-seam] The theme/look pickers' behaviors, decoupled by
|
|
1383
|
-
// NAME from themeControl/lookControl {{ menu }}s above — same seam as
|
|
1384
|
-
// applyStyle. "theme" is the baseline permanent state key (validateTheme,
|
|
1385
|
-
// registered in state-validators.ts); dropBaselineAllowLists reuses that
|
|
1386
|
-
// gate for an allow-list contribution instead of re-registering it, so
|
|
1387
|
-
// this action derives nothing new. "look" has no baseline entry, so this
|
|
1388
|
-
// action derives a fresh allow-list validator ranging the merged `looks`
|
|
1389
|
-
// block's names — the same derivation test/dsl-looks.test.ts exercises.
|
|
1390
|
-
applyTheme: { set: "theme", from: "themes" },
|
|
1391
|
-
applyLook: { set: "look", from: "looks" },
|
|
1392
|
-
// [LAW:one-type-per-behavior] The preset picker's session-preview
|
|
1393
|
-
// behavior (brandon-presets-0yk.3), the exact twin of applyLook one level
|
|
1394
|
-
// up: "preset" has no baseline SessionState entry, so this derives a
|
|
1395
|
-
// fresh allow-list validator ranging the merged `presets` block's names
|
|
1396
|
-
// (the floor included — presetNames always seeds it) via the same
|
|
1397
|
-
// `from`-sourced derivation every picker above uses.
|
|
1398
|
-
applyPreset: { set: "preset", from: "presets" },
|
|
1399
|
-
|
|
1400
|
-
// [LAW:one-source-of-truth] The persist-forever twins of applyTheme/
|
|
1401
|
-
// applyStyle/applyLook/applyPreset above (candybar-config-engine-71o.5,
|
|
1402
|
-
// brandon-presets-0yk.3) — same domain sources (`from`), same picker
|
|
1403
|
-
// mechanism, but the target is the Globals field the config DEFAULT
|
|
1404
|
-
// reads (`palette`/`style`/`look`/`preset`, isGlobalsField-checked at
|
|
1405
|
-
// load), not the SessionState key the session preview writes.
|
|
1406
|
-
// Precedence is unchanged: a session's own `set` pick still wins over a
|
|
1407
|
-
// persisted default for that session — effectiveThemeName/
|
|
1408
|
-
// effectiveStripStyle/effectiveLookName/effectivePresetName all read
|
|
1409
|
-
// SessionState before globals. Paired with a `reset` each, per the docs'
|
|
1410
|
-
// persist/reset convention.
|
|
1411
|
-
applyThemeForever: { persist: "palette", from: "themes" },
|
|
1412
|
-
resetTheme: { reset: "palette" },
|
|
1413
|
-
applyStyleForever: { persist: "style", from: "styles" },
|
|
1414
|
-
resetStyle: { reset: "style" },
|
|
1415
|
-
applyLookForever: { persist: "look", from: "looks" },
|
|
1416
|
-
resetLook: { reset: "look" },
|
|
1417
|
-
applyPresetForever: { persist: "preset", from: "presets" },
|
|
1418
|
-
resetPreset: { reset: "preset" },
|
|
1419
|
-
|
|
1420
|
-
// [LAW:locality-or-seam] The settings-drawer steppers' behaviors
|
|
1260
|
+
// [LAW:locality-or-seam] The settings-drawer controls' behaviors
|
|
1421
1261
|
// (candybar-config-engine-71o.4), decoupled by NAME from
|
|
1422
|
-
// charsetControl/colorCompatControl
|
|
1423
|
-
//
|
|
1424
|
-
//
|
|
1425
|
-
//
|
|
1426
|
-
//
|
|
1427
|
-
//
|
|
1428
|
-
//
|
|
1429
|
-
//
|
|
1430
|
-
//
|
|
1262
|
+
// charsetControl/colorCompatControl below. These are durable-only by
|
|
1263
|
+
// NATURE, not by omission: `charset` and `colorCompatibility` describe the
|
|
1264
|
+
// terminal (glyph coverage, colour depth) rather than a taste that varies
|
|
1265
|
+
// between sessions, so they have no SessionState half for a `persist?`
|
|
1266
|
+
// selector to choose between — which is exactly why
|
|
1267
|
+
// candybar-settings-ui-aok.3 left them here while moving every
|
|
1268
|
+
// both-halves setting into the settings menu as one dual control. Each
|
|
1269
|
+
// writes the config DEFAULT through the daemon-owned overrides layer
|
|
1270
|
+
// (never the hand-authored file itself), gated by the SAME
|
|
1271
|
+
// deriveConfigActionValidators pass, and is paired with a `reset` so a
|
|
1272
|
+
// drawer choice is always undoable from the bar.
|
|
1431
1273
|
applyCharsetForever: { persist: "charset", from: "charsets" },
|
|
1432
1274
|
resetCharset: { reset: "charset" },
|
|
1433
1275
|
applyColorCompatForever: {
|
|
@@ -1435,11 +1277,6 @@ export const RAW_DEFAULT_DSL_CONFIG = {
|
|
|
1435
1277
|
from: "colorCompatibilities",
|
|
1436
1278
|
},
|
|
1437
1279
|
resetColorCompat: { reset: "colorCompatibility" },
|
|
1438
|
-
toggleWrapForever: { persist: "autoWrap", cycle: ["true", "false"] },
|
|
1439
|
-
resetAutoWrap: { reset: "autoWrap" },
|
|
1440
|
-
paddingDownForever: { persist: "padding", min: 0, max: 16, by: -1 },
|
|
1441
|
-
paddingUpForever: { persist: "padding", min: 0, max: 16, by: 1 },
|
|
1442
|
-
resetPadding: { reset: "padding" },
|
|
1443
1280
|
|
|
1444
1281
|
// [LAW:locality-or-seam] The segment-palette control's behavior
|
|
1445
1282
|
// (candybar-config-engine-71o.6), decoupled by NAME from
|
|
@@ -1447,7 +1284,7 @@ export const RAW_DEFAULT_DSL_CONFIG = {
|
|
|
1447
1284
|
// palette` — NOT a Globals field — so it rides the SAME generic
|
|
1448
1285
|
// `from`/`reset` machinery every other persist pair here uses, over a
|
|
1449
1286
|
// key namespace loader/persist-target.ts opened alongside the pre-
|
|
1450
|
-
// existing Globals-field one. Like
|
|
1287
|
+
// existing Globals-field one. Like charset/colorCompatibility, this field has
|
|
1451
1288
|
// no SessionState half at all: a per-segment `palette:` is a static pin
|
|
1452
1289
|
// that ignores the session theme by design (src/dsl/render.ts), so
|
|
1453
1290
|
// `persist` is its only seam.
|
|
@@ -1516,10 +1353,10 @@ export const RAW_DEFAULT_DSL_CONFIG = {
|
|
|
1516
1353
|
// Named config FRAGMENTS — each an alternative `root` + display `globals`,
|
|
1517
1354
|
// i.e. a whole arrangement of the bar rather than one knob. A preset is to
|
|
1518
1355
|
// configuration what a look is to a theme, and rides the identical seam:
|
|
1519
|
-
// selected per session via the `preset` SessionState key
|
|
1520
|
-
//
|
|
1521
|
-
//
|
|
1522
|
-
// globals.preset over this floor.
|
|
1356
|
+
// selected per session via the `preset` SessionState key — or pinned as the
|
|
1357
|
+
// durable default via `globals.preset` — through the settings menu's ONE
|
|
1358
|
+
// dual preset control (src/config/settings-menu.ts), resolved as session
|
|
1359
|
+
// pick over globals.preset over this floor.
|
|
1523
1360
|
// [LAW:one-source-of-truth] Merges by name (user wins per name), so this
|
|
1524
1361
|
// stdlib is present in every merged config by construction, exactly as
|
|
1525
1362
|
// looks' "none"/"vivid"/"muted"/… is — a user redefining "compact" or
|
|
@@ -1558,11 +1395,13 @@ export const RAW_DEFAULT_DSL_CONFIG = {
|
|
|
1558
1395
|
// `gitaculous`, and `padding: 0` to buy back the chrome a narrow column
|
|
1559
1396
|
// can't spare.
|
|
1560
1397
|
//
|
|
1561
|
-
// [LAW:no-silent-failure]
|
|
1562
|
-
//
|
|
1563
|
-
//
|
|
1564
|
-
//
|
|
1565
|
-
//
|
|
1398
|
+
// [LAW:no-silent-failure] A session that switches TO compact is never
|
|
1399
|
+
// stranded: synthesizeSettingsMenu splices the global settings menu — and
|
|
1400
|
+
// with it the preset switcher — into EVERY preset root, so one click back
|
|
1401
|
+
// to "default" restores everything compact traded away for width. That is
|
|
1402
|
+
// why this root carries no preset control of its own: one guaranteed door
|
|
1403
|
+
// per root, minted once and referenced, not a segment each preset must
|
|
1404
|
+
// remember to carry [LAW:one-source-of-truth].
|
|
1566
1405
|
compact: {
|
|
1567
1406
|
root: {
|
|
1568
1407
|
kind: "container",
|
|
@@ -1571,7 +1410,6 @@ export const RAW_DEFAULT_DSL_CONFIG = {
|
|
|
1571
1410
|
{ kind: "segment", name: "directory" },
|
|
1572
1411
|
{ kind: "segment", name: "git" },
|
|
1573
1412
|
{ kind: "segment", name: "context" },
|
|
1574
|
-
{ kind: "segment", name: "presetControl" },
|
|
1575
1413
|
],
|
|
1576
1414
|
},
|
|
1577
1415
|
globals: { padding: 0 },
|
|
@@ -1584,10 +1422,9 @@ export const RAW_DEFAULT_DSL_CONFIG = {
|
|
|
1584
1422
|
// picture rather than the quiet default. A third row carries the two
|
|
1585
1423
|
// per-turn throughput segments, which read "—" between turns
|
|
1586
1424
|
// ([LAW:no-silent-failure] on speed/tokenSparkline) rather than an empty
|
|
1587
|
-
// or stale row.
|
|
1588
|
-
//
|
|
1589
|
-
//
|
|
1590
|
-
// the drawer and every other bar-mutable default from there.
|
|
1425
|
+
// or stale row. Like `compact`, it carries no preset control of its own —
|
|
1426
|
+
// the global settings menu is spliced into every preset root and is the
|
|
1427
|
+
// one door back.
|
|
1591
1428
|
verbose: {
|
|
1592
1429
|
root: {
|
|
1593
1430
|
kind: "container",
|
|
@@ -1601,7 +1438,6 @@ export const RAW_DEFAULT_DSL_CONFIG = {
|
|
|
1601
1438
|
{ kind: "segment", name: "gitaculous" },
|
|
1602
1439
|
{ kind: "segment", name: "gitPr" },
|
|
1603
1440
|
{ kind: "segment", name: "toolbar" },
|
|
1604
|
-
{ kind: "segment", name: "presetControl" },
|
|
1605
1441
|
],
|
|
1606
1442
|
},
|
|
1607
1443
|
{
|
|
@@ -1764,7 +1600,7 @@ const AUTHORED_PALETTE_NAMES = new Set(
|
|
|
1764
1600
|
// the zero-config daemon path (loadConfig: no config file found ⇒ raw={},
|
|
1765
1601
|
// merged directly against this constant — see src/config/dsl-loader.ts and
|
|
1766
1602
|
// src/config/loader/merge.ts) would ship an UNSYNTHESIZED default: a
|
|
1767
|
-
// `{{ menu (dict "key" …) }}` accordion pairing (
|
|
1603
|
+
// `{{ menu (dict "key" …) }}` accordion pairing (the settings menu's pickers,
|
|
1768
1604
|
// brandon-theming-8uj.1) would render its glyph, but clicking it would reject
|
|
1769
1605
|
// with "unknown state key" — the synthesis that derives a menu's `menus.*`
|
|
1770
1606
|
// state var + cycle action only ever ran over TEXT a user typed, never over
|