@qontinui/navigation 0.2.0 → 0.3.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.
package/dist/index.cjs CHANGED
@@ -75,6 +75,7 @@ __export(index_exports, {
75
75
  isGroupExpanded: () => isGroupExpanded,
76
76
  isItemActive: () => isItemActive,
77
77
  isItemAvailable: () => isItemAvailable,
78
+ isItemDemoted: () => isItemDemoted,
78
79
  isItemExpanded: () => isItemExpanded,
79
80
  isSecondaryOpenFor: () => isSecondaryOpenFor,
80
81
  isValidIconName: () => isValidIconName,
@@ -97,7 +98,16 @@ var WORKSPACE_ITEMS = [
97
98
  description: "Visual automation dashboard",
98
99
  route: "/tools/visual-automation",
99
100
  color: "#10B981",
100
- productMode: "visual"
101
+ productMode: "visual",
102
+ // Web-only: `/tools/visual-automation` is a Next.js route in qontinui-web.
103
+ // The runner has no tab for this id — it is in no `MainTabId` union member
104
+ // and `TabContent` has no case — so on the runner the item rendered and its
105
+ // click was REFUSED by the sidebar's id guard with a console error. Dead
106
+ // nav items are worse than absent ones: the user reads the refusal as the
107
+ // app being broken. (Latent since the item was added; surfaced when Visual
108
+ // mode became a deliberate opt-in and this became one of only four items
109
+ // in it.)
110
+ platforms: ["web"]
101
111
  },
102
112
  {
103
113
  id: "prompt-home",
@@ -106,7 +116,13 @@ var WORKSPACE_ITEMS = [
106
116
  description: "Tell the runner what to do in plain English",
107
117
  route: "/prompt-home",
108
118
  color: "#8B5CF6",
109
- productMode: "ai"
119
+ productMode: "ai",
120
+ // Runner-only demotion. On the runner this page COMPOSES a loop workflow
121
+ // (setup → verification → agentic → completion) from a prompt and hands it
122
+ // to the executor — it is the loop paradigm's front door, not the
123
+ // Terminal's, so it belongs behind the advanced disclosure there. On
124
+ // qontinui-web the same route is the app's landing page, so it stays.
125
+ hidden: ["runner"]
110
126
  },
111
127
  {
112
128
  id: "gui-automation",
@@ -115,7 +131,10 @@ var WORKSPACE_ITEMS = [
115
131
  description: "Run and schedule workflows",
116
132
  route: "/execute",
117
133
  color: "#10B981",
118
- productMode: "visual"
134
+ productMode: "visual",
135
+ // Web demotes it (coord+sessions default); the runner reaches it through
136
+ // the Visual product mode, which is itself disclosure-gated there.
137
+ hidden: ["web"]
119
138
  },
120
139
  {
121
140
  id: "terminal",
@@ -134,7 +153,12 @@ var WORKSPACE_ITEMS = [
134
153
  description: "Monitor active executions",
135
154
  route: "/runs/active",
136
155
  color: "#4A90D9",
137
- productMode: "ai"
156
+ productMode: "ai",
157
+ // The loop-workflow cockpit: phase badge, iteration counter, GUI/Playwright
158
+ // widgets and the "did the fix work?" verification panel. A Terminal
159
+ // session watches itself in the Terminal, so this is advanced on both
160
+ // platforms (web already demoted it locally).
161
+ hidden: true
138
162
  },
139
163
  {
140
164
  id: "productivity",
@@ -167,7 +191,9 @@ var SESSION_ITEMS = [
167
191
  icon: "Zap",
168
192
  description: "Action execution log",
169
193
  route: "/runs/actions",
170
- color: "#4A90D9"
194
+ color: "#4A90D9",
195
+ // GUI action log — only ever populated by a visual/loop workflow run.
196
+ hidden: true
171
197
  },
172
198
  {
173
199
  id: "run-image",
@@ -175,7 +201,8 @@ var SESSION_ITEMS = [
175
201
  icon: "Image",
176
202
  description: "Visual recognition results",
177
203
  route: "/runs/image-recognition",
178
- color: "#4A90D9"
204
+ color: "#4A90D9",
205
+ hidden: true
179
206
  },
180
207
  {
181
208
  id: "run-findings",
@@ -191,7 +218,9 @@ var SESSION_ITEMS = [
191
218
  icon: "FileSearch",
192
219
  description: "State exploration results",
193
220
  route: "/runs/state-exploration",
194
- color: "#4A90D9"
221
+ color: "#4A90D9",
222
+ // State-machine exploration is a visual-GUI-automation artifact.
223
+ hidden: true
195
224
  },
196
225
  {
197
226
  id: "run-tests",
@@ -199,7 +228,9 @@ var SESSION_ITEMS = [
199
228
  icon: "TestTube",
200
229
  description: "Playwright test results",
201
230
  route: "/runs/test-results",
202
- color: "#4A90D9"
231
+ color: "#4A90D9",
232
+ // Populated by the loop's verification phase, never by a chat session.
233
+ hidden: true
203
234
  },
204
235
  {
205
236
  id: "run-ai-output",
@@ -253,7 +284,12 @@ var REVIEW_ITEMS = [
253
284
  hasOwnPage: true,
254
285
  route: "/runs",
255
286
  color: "#4A90D9",
256
- productMode: "ai"
287
+ productMode: "ai",
288
+ // Runner keeps it: a Terminal/Claude session creates a `task_run`
289
+ // (`workflow_type: "chat"`), so this IS the runner's session history.
290
+ // qontinui-web demotes it — its sessions live in `coord.sessions` and
291
+ // produce no task_runs.
292
+ hidden: ["web"]
257
293
  },
258
294
  {
259
295
  id: "run-findings",
@@ -262,7 +298,8 @@ var REVIEW_ITEMS = [
262
298
  description: "Review findings and HITL questions across runs",
263
299
  route: "/runs/findings",
264
300
  color: "#4A90D9",
265
- productMode: "ai"
301
+ productMode: "ai",
302
+ hidden: ["web"]
266
303
  },
267
304
  {
268
305
  // Id is "observations" (NOT "memory"): it must match the runner's
@@ -457,9 +494,15 @@ var BUILD_ITEMS = [
457
494
  description: "Visual GUI automation \u2014 build state machines and inspect runs",
458
495
  route: "/vga",
459
496
  color: "var(--brand-secondary)",
460
- // Visual GUI automation belongs to Visual mode, not AI Dev (removed from
461
- // the AI Dev sidebar on both runner and web).
462
- productMode: "visual"
497
+ // Visual GUI automation belongs to Visual mode, not AI Dev.
498
+ productMode: "visual",
499
+ // Web-only for the same reason as `visual-dashboard`: `/vga` is a
500
+ // qontinui-web route and the runner has no `vga` tab, so the item was a
501
+ // dead click there. `hidden: ["web"]` additionally keeps it out of web's
502
+ // coord+sessions default menu — so it now appears in exactly one place:
503
+ // web, in Visual mode, with the advanced disclosure on.
504
+ platforms: ["web"],
505
+ hidden: ["web"]
463
506
  },
464
507
  {
465
508
  id: "orchestration-loop",
@@ -660,7 +703,11 @@ var CONFIGURE_ITEMS = [
660
703
  icon: "Radio",
661
704
  description: "Workflow event bus, queue status, circuit breaker",
662
705
  hiddenInProd: true,
663
- productMode: "ai"
706
+ productMode: "ai",
707
+ // Workflow event bus — a loop-workflow internal. Dev-only AND advanced, so
708
+ // the CONFIGURE group has no default-visible item left and the group header
709
+ // is dropped entirely by filterGroupsForPlatform.
710
+ hidden: true
664
711
  }
665
712
  ];
666
713
  var CONFIGURE_GROUP = {
@@ -1104,11 +1151,16 @@ function setShowHiddenItems(show) {
1104
1151
  function getShowHiddenItems() {
1105
1152
  return _showHiddenItems;
1106
1153
  }
1154
+ function isItemDemoted(item, platform) {
1155
+ const demoted = item.hidden;
1156
+ if (!demoted) return false;
1157
+ return demoted === true || demoted.includes(platform);
1158
+ }
1107
1159
  function isItemAvailable(item, platform) {
1108
1160
  if (item.hiddenInProd && !isDevelopmentMode()) {
1109
1161
  return false;
1110
1162
  }
1111
- if (item.hidden && !_showHiddenItems) {
1163
+ if (isItemDemoted(item, platform) && !_showHiddenItems) {
1112
1164
  return false;
1113
1165
  }
1114
1166
  if (_productMode && item.productMode && item.productMode !== "both" && item.productMode !== _productMode) {
@@ -1454,6 +1506,7 @@ function NavigationItemShell({
1454
1506
  isGroupExpanded,
1455
1507
  isItemActive,
1456
1508
  isItemAvailable,
1509
+ isItemDemoted,
1457
1510
  isItemExpanded,
1458
1511
  isSecondaryOpenFor,
1459
1512
  isValidIconName,
package/dist/index.d.cts CHANGED
@@ -65,10 +65,18 @@ interface NavigationItem {
65
65
  * sidebar until the user opts in via the "Show advanced automation features"
66
66
  * setting (wired through `setShowHiddenItems(true)`). The route/tab id is
67
67
  * still registered, so deep-links and programmatic tab-activation continue
68
- * to resolve. Used to demote the workflow-authoring surfaces (workflow
69
- * builder, DAG editor, orchestration loop, step builders) now that the
70
- * Terminal is the primary entry point. */
71
- hidden?: boolean;
68
+ * to resolve. Used to demote the verification-agentic loop-workflow surfaces
69
+ * (workflow builder, DAG editor, orchestration loop, step builders, the
70
+ * run/execution dashboards) now that the Terminal is the primary entry point.
71
+ *
72
+ * `true` demotes the item on EVERY platform. A platform list demotes it only
73
+ * on the named platforms — the runner and qontinui-web disagree about a
74
+ * handful of items (the runner's Home/prompt entry is advanced there but is
75
+ * still web's landing page; web's coord+sessions default drops runs/findings
76
+ * the runner keeps), and expressing that at the source beats each app
77
+ * carrying its own parallel demotion list that silently drifts.
78
+ */
79
+ hidden?: boolean | Platform[];
72
80
  /** Product mode visibility - "ai", "visual", or "both" (default: shown in all modes) */
73
81
  productMode?: "ai" | "visual" | "both";
74
82
  /** URL path for web routing (e.g., "/build/workflows") */
@@ -177,10 +185,12 @@ type NavigationAction = {
177
185
  * - platform: "runner" | "web" | both (default) — which app shows the item
178
186
  * - productMode: "ai" | "visual" | "both" | undefined (default=both) — which product mode
179
187
  * - hiddenInProd: true — dev-only items hidden in production
180
- * - hidden: true — "advanced" surfaces (the workflow-authoring tools) kept
181
- * out of the default sidebar until the user opts in via "Show advanced
182
- * automation features" (setShowHiddenItems). Route/tab id stays registered,
183
- * so deep-links (e.g. the Terminal "save as workflow" disclosure) resolve.
188
+ * - hidden: true | Platform[] — "advanced" surfaces (the loop-workflow and
189
+ * workflow-authoring tools) kept out of the default sidebar until the user
190
+ * opts in via "Show advanced automation features" (setShowHiddenItems).
191
+ * Route/tab id stays registered, so deep-links (e.g. the Terminal
192
+ * "save as workflow" disclosure) resolve. A platform list demotes on only
193
+ * those platforms — see `NavigationItem.hidden`.
184
194
  *
185
195
  * ---------------------------------------------------------------------------
186
196
  * Terminal-centric information architecture (2026-06).
@@ -203,9 +213,21 @@ type NavigationAction = {
203
213
  * (Groups that end up with no visible items are dropped by
204
214
  * filterGroupsForPlatform, so no bare group header renders.)
205
215
  *
216
+ * 2026-07 follow-up — the loop-workflow残り. The first pass demoted the
217
+ * BUILDERS but left the loop's RUNTIME surfaces in the default set: the
218
+ * natural-language Home prompt (which composes and launches a
219
+ * setup→verification→agentic→completion workflow), the Active dashboard
220
+ * (phase badge, iteration counter, "did the fix work?" verification widget),
221
+ * and the GUI/loop-specific run detail tabs (Actions, Image Recognition,
222
+ * State Explorer, Test Results). Those are the loop paradigm's cockpit, not
223
+ * the Terminal's, so they are demoted too. What stays under Runs is the set a
224
+ * Terminal session actually produces — chat sessions create `task_runs` with
225
+ * `workflow_type: "chat"`, so Summary / Findings / AI Output / Statistics /
226
+ * AI Data remain first-class.
227
+ *
206
228
  * The default (toggle OFF, AI Dev mode) is therefore the lean, Terminal-first
207
- * set: WORKSPACE (Home / Terminal / Active / Productivity), REVIEW (Runs /
208
- * Findings / Memory / Knowledge), and SYSTEM (Settings / Help). This mirrors
229
+ * set: WORKSPACE (Terminal / Productivity), REVIEW (Runs / Findings / Memory /
230
+ * Knowledge / Helper Tasks), and SYSTEM (Settings / Help). This mirrors
209
231
  * qontinui-web's coord+sessions-centric default menu.
210
232
  *
211
233
  * Both platforms share this structure; per-item `platforms`/`productMode`
@@ -320,6 +342,13 @@ declare function setShowHiddenItems(show: boolean): void;
320
342
  * Whether `hidden` items are currently shown.
321
343
  */
322
344
  declare function getShowHiddenItems(): boolean;
345
+ /**
346
+ * Whether an item's `hidden` ("advanced") demotion applies on this platform.
347
+ *
348
+ * `hidden: true` demotes everywhere; `hidden: ["runner"]` demotes only on the
349
+ * runner. Absent/false is never demoted.
350
+ */
351
+ declare function isItemDemoted(item: NavigationItem, platform: Platform): boolean;
323
352
  /**
324
353
  * Filter a navigation item based on platform.
325
354
  * Returns true if the item should be shown on the given platform.
@@ -498,4 +527,4 @@ interface NavigationItemShellProps {
498
527
  */
499
528
  declare function NavigationItemShell({ item, onActivate, children, }: NavigationItemShellProps): React.ReactElement;
500
529
 
501
- export { AUTOMATE_GROUP, AUTOMATE_ITEMS, BUILD_GROUP, BUILD_ITEMS, CHILDREN_MAP, CONFIGURE_GROUP, CONFIGURE_ITEMS, DEV_GROUP, DEV_ITEMS, ICON_NAMES, INSIGHTS_GROUP, INSIGHTS_ITEMS, type IconName, NAVIGATION_GROUPS, type NavigationAction, type NavigationBadge, type NavigationGroup, type NavigationItem, type NavigationItemLike, NavigationItemShell, type NavigationItemShellProps, type NavigationState, type Platform, REVIEW_GROUP, REVIEW_ITEMS, RUNS_ITEMS, SESSION_ITEMS, SETTINGS_ITEMS, SPEND_GROUP, SPEND_ITEMS, STORAGE_KEYS, SYSTEM_GROUP, SYSTEM_ITEMS, type SecondarySidebarState, WORKSPACE_GROUP, WORKSPACE_ITEMS, createInitialState, deserializeState, filterGroupForPlatform, filterGroupsForPlatform, filterItemsForPlatform, findItemById, getAllItems, getChildrenForPlatform, getChildrenItems, getItemGroup, getNavigationGroups, getProductMode, getRunnerNavigation, getShowHiddenItems, getWebNavigation, isDevelopmentMode, isGroupExpanded, isItemActive, isItemAvailable, isItemExpanded, isSecondaryOpenFor, isValidIconName, navigationActions, navigationReducer, serializeState, setDevelopmentMode, setProductMode, setShowHiddenItems, useNavigationItem };
530
+ export { AUTOMATE_GROUP, AUTOMATE_ITEMS, BUILD_GROUP, BUILD_ITEMS, CHILDREN_MAP, CONFIGURE_GROUP, CONFIGURE_ITEMS, DEV_GROUP, DEV_ITEMS, ICON_NAMES, INSIGHTS_GROUP, INSIGHTS_ITEMS, type IconName, NAVIGATION_GROUPS, type NavigationAction, type NavigationBadge, type NavigationGroup, type NavigationItem, type NavigationItemLike, NavigationItemShell, type NavigationItemShellProps, type NavigationState, type Platform, REVIEW_GROUP, REVIEW_ITEMS, RUNS_ITEMS, SESSION_ITEMS, SETTINGS_ITEMS, SPEND_GROUP, SPEND_ITEMS, STORAGE_KEYS, SYSTEM_GROUP, SYSTEM_ITEMS, type SecondarySidebarState, WORKSPACE_GROUP, WORKSPACE_ITEMS, createInitialState, deserializeState, filterGroupForPlatform, filterGroupsForPlatform, filterItemsForPlatform, findItemById, getAllItems, getChildrenForPlatform, getChildrenItems, getItemGroup, getNavigationGroups, getProductMode, getRunnerNavigation, getShowHiddenItems, getWebNavigation, isDevelopmentMode, isGroupExpanded, isItemActive, isItemAvailable, isItemDemoted, isItemExpanded, isSecondaryOpenFor, isValidIconName, navigationActions, navigationReducer, serializeState, setDevelopmentMode, setProductMode, setShowHiddenItems, useNavigationItem };
package/dist/index.d.ts CHANGED
@@ -65,10 +65,18 @@ interface NavigationItem {
65
65
  * sidebar until the user opts in via the "Show advanced automation features"
66
66
  * setting (wired through `setShowHiddenItems(true)`). The route/tab id is
67
67
  * still registered, so deep-links and programmatic tab-activation continue
68
- * to resolve. Used to demote the workflow-authoring surfaces (workflow
69
- * builder, DAG editor, orchestration loop, step builders) now that the
70
- * Terminal is the primary entry point. */
71
- hidden?: boolean;
68
+ * to resolve. Used to demote the verification-agentic loop-workflow surfaces
69
+ * (workflow builder, DAG editor, orchestration loop, step builders, the
70
+ * run/execution dashboards) now that the Terminal is the primary entry point.
71
+ *
72
+ * `true` demotes the item on EVERY platform. A platform list demotes it only
73
+ * on the named platforms — the runner and qontinui-web disagree about a
74
+ * handful of items (the runner's Home/prompt entry is advanced there but is
75
+ * still web's landing page; web's coord+sessions default drops runs/findings
76
+ * the runner keeps), and expressing that at the source beats each app
77
+ * carrying its own parallel demotion list that silently drifts.
78
+ */
79
+ hidden?: boolean | Platform[];
72
80
  /** Product mode visibility - "ai", "visual", or "both" (default: shown in all modes) */
73
81
  productMode?: "ai" | "visual" | "both";
74
82
  /** URL path for web routing (e.g., "/build/workflows") */
@@ -177,10 +185,12 @@ type NavigationAction = {
177
185
  * - platform: "runner" | "web" | both (default) — which app shows the item
178
186
  * - productMode: "ai" | "visual" | "both" | undefined (default=both) — which product mode
179
187
  * - hiddenInProd: true — dev-only items hidden in production
180
- * - hidden: true — "advanced" surfaces (the workflow-authoring tools) kept
181
- * out of the default sidebar until the user opts in via "Show advanced
182
- * automation features" (setShowHiddenItems). Route/tab id stays registered,
183
- * so deep-links (e.g. the Terminal "save as workflow" disclosure) resolve.
188
+ * - hidden: true | Platform[] — "advanced" surfaces (the loop-workflow and
189
+ * workflow-authoring tools) kept out of the default sidebar until the user
190
+ * opts in via "Show advanced automation features" (setShowHiddenItems).
191
+ * Route/tab id stays registered, so deep-links (e.g. the Terminal
192
+ * "save as workflow" disclosure) resolve. A platform list demotes on only
193
+ * those platforms — see `NavigationItem.hidden`.
184
194
  *
185
195
  * ---------------------------------------------------------------------------
186
196
  * Terminal-centric information architecture (2026-06).
@@ -203,9 +213,21 @@ type NavigationAction = {
203
213
  * (Groups that end up with no visible items are dropped by
204
214
  * filterGroupsForPlatform, so no bare group header renders.)
205
215
  *
216
+ * 2026-07 follow-up — the loop-workflow残り. The first pass demoted the
217
+ * BUILDERS but left the loop's RUNTIME surfaces in the default set: the
218
+ * natural-language Home prompt (which composes and launches a
219
+ * setup→verification→agentic→completion workflow), the Active dashboard
220
+ * (phase badge, iteration counter, "did the fix work?" verification widget),
221
+ * and the GUI/loop-specific run detail tabs (Actions, Image Recognition,
222
+ * State Explorer, Test Results). Those are the loop paradigm's cockpit, not
223
+ * the Terminal's, so they are demoted too. What stays under Runs is the set a
224
+ * Terminal session actually produces — chat sessions create `task_runs` with
225
+ * `workflow_type: "chat"`, so Summary / Findings / AI Output / Statistics /
226
+ * AI Data remain first-class.
227
+ *
206
228
  * The default (toggle OFF, AI Dev mode) is therefore the lean, Terminal-first
207
- * set: WORKSPACE (Home / Terminal / Active / Productivity), REVIEW (Runs /
208
- * Findings / Memory / Knowledge), and SYSTEM (Settings / Help). This mirrors
229
+ * set: WORKSPACE (Terminal / Productivity), REVIEW (Runs / Findings / Memory /
230
+ * Knowledge / Helper Tasks), and SYSTEM (Settings / Help). This mirrors
209
231
  * qontinui-web's coord+sessions-centric default menu.
210
232
  *
211
233
  * Both platforms share this structure; per-item `platforms`/`productMode`
@@ -320,6 +342,13 @@ declare function setShowHiddenItems(show: boolean): void;
320
342
  * Whether `hidden` items are currently shown.
321
343
  */
322
344
  declare function getShowHiddenItems(): boolean;
345
+ /**
346
+ * Whether an item's `hidden` ("advanced") demotion applies on this platform.
347
+ *
348
+ * `hidden: true` demotes everywhere; `hidden: ["runner"]` demotes only on the
349
+ * runner. Absent/false is never demoted.
350
+ */
351
+ declare function isItemDemoted(item: NavigationItem, platform: Platform): boolean;
323
352
  /**
324
353
  * Filter a navigation item based on platform.
325
354
  * Returns true if the item should be shown on the given platform.
@@ -498,4 +527,4 @@ interface NavigationItemShellProps {
498
527
  */
499
528
  declare function NavigationItemShell({ item, onActivate, children, }: NavigationItemShellProps): React.ReactElement;
500
529
 
501
- export { AUTOMATE_GROUP, AUTOMATE_ITEMS, BUILD_GROUP, BUILD_ITEMS, CHILDREN_MAP, CONFIGURE_GROUP, CONFIGURE_ITEMS, DEV_GROUP, DEV_ITEMS, ICON_NAMES, INSIGHTS_GROUP, INSIGHTS_ITEMS, type IconName, NAVIGATION_GROUPS, type NavigationAction, type NavigationBadge, type NavigationGroup, type NavigationItem, type NavigationItemLike, NavigationItemShell, type NavigationItemShellProps, type NavigationState, type Platform, REVIEW_GROUP, REVIEW_ITEMS, RUNS_ITEMS, SESSION_ITEMS, SETTINGS_ITEMS, SPEND_GROUP, SPEND_ITEMS, STORAGE_KEYS, SYSTEM_GROUP, SYSTEM_ITEMS, type SecondarySidebarState, WORKSPACE_GROUP, WORKSPACE_ITEMS, createInitialState, deserializeState, filterGroupForPlatform, filterGroupsForPlatform, filterItemsForPlatform, findItemById, getAllItems, getChildrenForPlatform, getChildrenItems, getItemGroup, getNavigationGroups, getProductMode, getRunnerNavigation, getShowHiddenItems, getWebNavigation, isDevelopmentMode, isGroupExpanded, isItemActive, isItemAvailable, isItemExpanded, isSecondaryOpenFor, isValidIconName, navigationActions, navigationReducer, serializeState, setDevelopmentMode, setProductMode, setShowHiddenItems, useNavigationItem };
530
+ export { AUTOMATE_GROUP, AUTOMATE_ITEMS, BUILD_GROUP, BUILD_ITEMS, CHILDREN_MAP, CONFIGURE_GROUP, CONFIGURE_ITEMS, DEV_GROUP, DEV_ITEMS, ICON_NAMES, INSIGHTS_GROUP, INSIGHTS_ITEMS, type IconName, NAVIGATION_GROUPS, type NavigationAction, type NavigationBadge, type NavigationGroup, type NavigationItem, type NavigationItemLike, NavigationItemShell, type NavigationItemShellProps, type NavigationState, type Platform, REVIEW_GROUP, REVIEW_ITEMS, RUNS_ITEMS, SESSION_ITEMS, SETTINGS_ITEMS, SPEND_GROUP, SPEND_ITEMS, STORAGE_KEYS, SYSTEM_GROUP, SYSTEM_ITEMS, type SecondarySidebarState, WORKSPACE_GROUP, WORKSPACE_ITEMS, createInitialState, deserializeState, filterGroupForPlatform, filterGroupsForPlatform, filterItemsForPlatform, findItemById, getAllItems, getChildrenForPlatform, getChildrenItems, getItemGroup, getNavigationGroups, getProductMode, getRunnerNavigation, getShowHiddenItems, getWebNavigation, isDevelopmentMode, isGroupExpanded, isItemActive, isItemAvailable, isItemDemoted, isItemExpanded, isSecondaryOpenFor, isValidIconName, navigationActions, navigationReducer, serializeState, setDevelopmentMode, setProductMode, setShowHiddenItems, useNavigationItem };
package/dist/index.js CHANGED
@@ -7,7 +7,16 @@ var WORKSPACE_ITEMS = [
7
7
  description: "Visual automation dashboard",
8
8
  route: "/tools/visual-automation",
9
9
  color: "#10B981",
10
- productMode: "visual"
10
+ productMode: "visual",
11
+ // Web-only: `/tools/visual-automation` is a Next.js route in qontinui-web.
12
+ // The runner has no tab for this id — it is in no `MainTabId` union member
13
+ // and `TabContent` has no case — so on the runner the item rendered and its
14
+ // click was REFUSED by the sidebar's id guard with a console error. Dead
15
+ // nav items are worse than absent ones: the user reads the refusal as the
16
+ // app being broken. (Latent since the item was added; surfaced when Visual
17
+ // mode became a deliberate opt-in and this became one of only four items
18
+ // in it.)
19
+ platforms: ["web"]
11
20
  },
12
21
  {
13
22
  id: "prompt-home",
@@ -16,7 +25,13 @@ var WORKSPACE_ITEMS = [
16
25
  description: "Tell the runner what to do in plain English",
17
26
  route: "/prompt-home",
18
27
  color: "#8B5CF6",
19
- productMode: "ai"
28
+ productMode: "ai",
29
+ // Runner-only demotion. On the runner this page COMPOSES a loop workflow
30
+ // (setup → verification → agentic → completion) from a prompt and hands it
31
+ // to the executor — it is the loop paradigm's front door, not the
32
+ // Terminal's, so it belongs behind the advanced disclosure there. On
33
+ // qontinui-web the same route is the app's landing page, so it stays.
34
+ hidden: ["runner"]
20
35
  },
21
36
  {
22
37
  id: "gui-automation",
@@ -25,7 +40,10 @@ var WORKSPACE_ITEMS = [
25
40
  description: "Run and schedule workflows",
26
41
  route: "/execute",
27
42
  color: "#10B981",
28
- productMode: "visual"
43
+ productMode: "visual",
44
+ // Web demotes it (coord+sessions default); the runner reaches it through
45
+ // the Visual product mode, which is itself disclosure-gated there.
46
+ hidden: ["web"]
29
47
  },
30
48
  {
31
49
  id: "terminal",
@@ -44,7 +62,12 @@ var WORKSPACE_ITEMS = [
44
62
  description: "Monitor active executions",
45
63
  route: "/runs/active",
46
64
  color: "#4A90D9",
47
- productMode: "ai"
65
+ productMode: "ai",
66
+ // The loop-workflow cockpit: phase badge, iteration counter, GUI/Playwright
67
+ // widgets and the "did the fix work?" verification panel. A Terminal
68
+ // session watches itself in the Terminal, so this is advanced on both
69
+ // platforms (web already demoted it locally).
70
+ hidden: true
48
71
  },
49
72
  {
50
73
  id: "productivity",
@@ -77,7 +100,9 @@ var SESSION_ITEMS = [
77
100
  icon: "Zap",
78
101
  description: "Action execution log",
79
102
  route: "/runs/actions",
80
- color: "#4A90D9"
103
+ color: "#4A90D9",
104
+ // GUI action log — only ever populated by a visual/loop workflow run.
105
+ hidden: true
81
106
  },
82
107
  {
83
108
  id: "run-image",
@@ -85,7 +110,8 @@ var SESSION_ITEMS = [
85
110
  icon: "Image",
86
111
  description: "Visual recognition results",
87
112
  route: "/runs/image-recognition",
88
- color: "#4A90D9"
113
+ color: "#4A90D9",
114
+ hidden: true
89
115
  },
90
116
  {
91
117
  id: "run-findings",
@@ -101,7 +127,9 @@ var SESSION_ITEMS = [
101
127
  icon: "FileSearch",
102
128
  description: "State exploration results",
103
129
  route: "/runs/state-exploration",
104
- color: "#4A90D9"
130
+ color: "#4A90D9",
131
+ // State-machine exploration is a visual-GUI-automation artifact.
132
+ hidden: true
105
133
  },
106
134
  {
107
135
  id: "run-tests",
@@ -109,7 +137,9 @@ var SESSION_ITEMS = [
109
137
  icon: "TestTube",
110
138
  description: "Playwright test results",
111
139
  route: "/runs/test-results",
112
- color: "#4A90D9"
140
+ color: "#4A90D9",
141
+ // Populated by the loop's verification phase, never by a chat session.
142
+ hidden: true
113
143
  },
114
144
  {
115
145
  id: "run-ai-output",
@@ -163,7 +193,12 @@ var REVIEW_ITEMS = [
163
193
  hasOwnPage: true,
164
194
  route: "/runs",
165
195
  color: "#4A90D9",
166
- productMode: "ai"
196
+ productMode: "ai",
197
+ // Runner keeps it: a Terminal/Claude session creates a `task_run`
198
+ // (`workflow_type: "chat"`), so this IS the runner's session history.
199
+ // qontinui-web demotes it — its sessions live in `coord.sessions` and
200
+ // produce no task_runs.
201
+ hidden: ["web"]
167
202
  },
168
203
  {
169
204
  id: "run-findings",
@@ -172,7 +207,8 @@ var REVIEW_ITEMS = [
172
207
  description: "Review findings and HITL questions across runs",
173
208
  route: "/runs/findings",
174
209
  color: "#4A90D9",
175
- productMode: "ai"
210
+ productMode: "ai",
211
+ hidden: ["web"]
176
212
  },
177
213
  {
178
214
  // Id is "observations" (NOT "memory"): it must match the runner's
@@ -367,9 +403,15 @@ var BUILD_ITEMS = [
367
403
  description: "Visual GUI automation \u2014 build state machines and inspect runs",
368
404
  route: "/vga",
369
405
  color: "var(--brand-secondary)",
370
- // Visual GUI automation belongs to Visual mode, not AI Dev (removed from
371
- // the AI Dev sidebar on both runner and web).
372
- productMode: "visual"
406
+ // Visual GUI automation belongs to Visual mode, not AI Dev.
407
+ productMode: "visual",
408
+ // Web-only for the same reason as `visual-dashboard`: `/vga` is a
409
+ // qontinui-web route and the runner has no `vga` tab, so the item was a
410
+ // dead click there. `hidden: ["web"]` additionally keeps it out of web's
411
+ // coord+sessions default menu — so it now appears in exactly one place:
412
+ // web, in Visual mode, with the advanced disclosure on.
413
+ platforms: ["web"],
414
+ hidden: ["web"]
373
415
  },
374
416
  {
375
417
  id: "orchestration-loop",
@@ -570,7 +612,11 @@ var CONFIGURE_ITEMS = [
570
612
  icon: "Radio",
571
613
  description: "Workflow event bus, queue status, circuit breaker",
572
614
  hiddenInProd: true,
573
- productMode: "ai"
615
+ productMode: "ai",
616
+ // Workflow event bus — a loop-workflow internal. Dev-only AND advanced, so
617
+ // the CONFIGURE group has no default-visible item left and the group header
618
+ // is dropped entirely by filterGroupsForPlatform.
619
+ hidden: true
574
620
  }
575
621
  ];
576
622
  var CONFIGURE_GROUP = {
@@ -1014,11 +1060,16 @@ function setShowHiddenItems(show) {
1014
1060
  function getShowHiddenItems() {
1015
1061
  return _showHiddenItems;
1016
1062
  }
1063
+ function isItemDemoted(item, platform) {
1064
+ const demoted = item.hidden;
1065
+ if (!demoted) return false;
1066
+ return demoted === true || demoted.includes(platform);
1067
+ }
1017
1068
  function isItemAvailable(item, platform) {
1018
1069
  if (item.hiddenInProd && !isDevelopmentMode()) {
1019
1070
  return false;
1020
1071
  }
1021
- if (item.hidden && !_showHiddenItems) {
1072
+ if (isItemDemoted(item, platform) && !_showHiddenItems) {
1022
1073
  return false;
1023
1074
  }
1024
1075
  if (_productMode && item.productMode && item.productMode !== "both" && item.productMode !== _productMode) {
@@ -1363,6 +1414,7 @@ export {
1363
1414
  isGroupExpanded,
1364
1415
  isItemActive,
1365
1416
  isItemAvailable,
1417
+ isItemDemoted,
1366
1418
  isItemExpanded,
1367
1419
  isSecondaryOpenFor,
1368
1420
  isValidIconName,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qontinui/navigation",
3
- "version": "0.2.0",
3
+ "version": "0.3.1",
4
4
  "description": "Shared navigation structure for Qontinui applications",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -13,6 +13,7 @@
13
13
  "build": "tsup src/index.ts --format cjs,esm --dts && node -e \"if(!require('fs').statSync('dist/index.d.ts').size)process.exit(1)\"",
14
14
  "dev": "tsup src/index.ts --format cjs,esm --dts --watch",
15
15
  "typecheck": "tsc --noEmit",
16
+ "test": "vitest run",
16
17
  "lint": "eslint src/",
17
18
  "clean": "rm -rf dist",
18
19
  "prepublishOnly": "npm run build"
@@ -56,6 +57,7 @@
56
57
  "react": "^19.0.0",
57
58
  "tsup": "^8.0.1",
58
59
  "typescript": "^6.0.2",
59
- "typescript-eslint": "^8.61.0"
60
+ "typescript-eslint": "^8.61.0",
61
+ "vitest": "^3.2.7"
60
62
  }
61
63
  }