autosolutions-os 0.3.9 → 0.3.11

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/CHANGELOG.md CHANGED
@@ -1,5 +1,79 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.11 - 2026-11-04
4
+
5
+ The owner's three marks, so people can tell which tabs to trust: " (*)" for
6
+ sample data, " (Incomplete)" for real data with parts still missing, and no
7
+ mark for real, complete data.
8
+
9
+ ### autosolutions-os/nav
10
+
11
+ - `OsDataStatus` (`"mock" | "incomplete" | "working"`) and `osDataStatus(toolId,
12
+ where, tabId?)`: the status of a tool's page, or of one of its views. By
13
+ default an app's page (`where: "app"`) is `working` and a page in the Hub
14
+ (`where: "hub"`) is `mock`; a tool with an app is always `mock` in the Hub,
15
+ where its page shows no data of its own.
16
+ - `OS_TOOL_DATA`: the one record of the tools whose status is not their
17
+ default, each with what is missing (`missing`) and any view whose status
18
+ differs (`tabs`). Today it has one: Retailer sell out (POS) is
19
+ `incomplete`, since Ops Hub's POS dashboard reads retailers' sales only
20
+ (no retailer stock or ranging data, so Retailer stock cover and Ranging are
21
+ not built).
22
+ - osFrame marks every row that opens a page from it, after the name: a
23
+ `mock` row keeps " (*)" and now has a tooltip (`title`) that says what it
24
+ means; an `incomplete` row gets " (Incomplete)" (`OS_INCOMPLETE_MARK`,
25
+ `osIncompleteLabel()`) and a tooltip that says what is missing; a `working`
26
+ row is as before. A word in the label, not a row badge: in the menu's width
27
+ a badge squeezed "Retailer sell out (POS)" onto four lines. The same in the
28
+ Hub, in an app on the core and in an app off it, for this app's own tools
29
+ too. A locked row and the Hub panel have no mark.
30
+ - `osMarkedLabel(label, status)`: a label with its status's mark, for an
31
+ app's own tabs (the Hub's pages). `OS_MARK_HINTS`: the words for each mark,
32
+ for the tooltips and an app's legend.
33
+ - The menu search matches a row by its name without either mark, as it did
34
+ without " (*)".
35
+ - Unchanged: every id, link, lock, tab and route; `OS_SAMPLE_MARK` and
36
+ `osSampleLabel()`; which rows are samples.
37
+ - Apps take this release with a lockfile bump. An app whose tests compare a
38
+ sample row whole (`toEqual`) adds its new `title`; one that names Retailer
39
+ sell out (POS)'s row by its label sees " (Incomplete)" after it.
40
+
41
+ ## 0.3.10 - 2026-10-21
42
+
43
+ The owner removed two menu rows that are not on their sheet.
44
+
45
+ ### autosolutions-os/nav
46
+
47
+ - Commercial > Customer forecast collaboration (`customer-forecast`) is gone:
48
+ it came from Cliff's mock design only. Commercial > Tools now runs CRM,
49
+ Customer scorecard, Margin calculator, Trade marketing calendar, Line form
50
+ populator, Pricelist generator, Clearance list, Key accounts.
51
+ - Operations > Candidate hub (`candidate-hub`) is gone from the shared menu,
52
+ and its `OS_TOOL_LINKS` entry with it, so `staticLinks()` and
53
+ `catalogueLinks()` no longer name Candidate Hub. It is Enxgy's candidate
54
+ app, a standalone app: no other app's menu shows it, the Hub's included.
55
+ Operations > Tools now runs Action queue, Demand plan, Order planning,
56
+ Carton label generator, PM Copilot.
57
+ - The core catalogue's `candidate_hub` row is unchanged (no data changes) and
58
+ cannot put the row back: a catalogue app reaches a menu only through
59
+ `OS_TOOL_LINKS`, and its group, section and design keys feed the app
60
+ switcher and its artwork, never the menu (tested, held or not, and while
61
+ the catalogue is still being asked).
62
+ - The menu has 52 tools (was 54), 20 of them Live (was 21), and 18 fixed
63
+ addresses (was 19).
64
+ - Unchanged: every other id, link, tab and lock, Key accounts and PM Copilot,
65
+ and Finance (Steve Gordijn's brief).
66
+ - Candidate Hub must pass its tool with `fn: "operations"`, `section: "Tools"`,
67
+ `label: "Candidate hub"` and `icon: "hub-accounts"` (the old row's glyph)
68
+ when it takes this release: the map no longer has its id, and a tool the
69
+ map does not have is placed only with those four. Its own frame then shows
70
+ its row last in Operations > Tools, with its tabs, as before (tested).
71
+ Without them its console has no row in its own menu.
72
+ - The Hub drops its sample page for `customer-forecast` when it takes this
73
+ release, since every sample page must have a row. Every other app takes it
74
+ with a lockfile bump; an app whose tests name either row, count the menu's
75
+ tools or search it for "candidate" or "forecast" updates them.
76
+
3
77
  ## 0.3.9 - 2026-10-21
4
78
 
5
79
  The owner renamed every Assistants group to Tools.
package/README.md CHANGED
@@ -94,9 +94,11 @@ person signs out in the app.
94
94
 
95
95
  `OsWorkspaceFrame` is the frame every app on the core renders around its pages:
96
96
  the top bar with the company's mark and switcher, the rail, the OS menu (Cliff's
97
- menu map, 0.3.0: 56 tools and an Overview first in every function, Marketing's
98
- since 0.3.3, our Shelf simulator, Key accounts, PM Copilot and Candidate hub
99
- among them), the Hub panel, the footer with Admin for people who manage
97
+ menu map, 0.3.0, with Steve Gordijn's Finance since 0.3.6 and the owner's sheet
98
+ since 0.3.8: 52 tools and an Overview first in every function, Marketing's
99
+ since 0.3.3, our Shelf simulator, Key accounts and PM Copilot among them;
100
+ Candidate hub, a standalone app since 0.3.10, is a row of its own frame only),
101
+ the Hub panel, the footer with Admin for people who manage
100
102
  something, and the browser-tab icon. It needs `autosolutions-design-system`
101
103
  6.5.0 or later (an optional peer: only this entry point uses it). Take this
102
104
  package's 0.3.0 and the design system's 6.5.0 together, in one commit: 0.3.0
@@ -158,7 +160,10 @@ why).
158
160
 
159
161
  - `tools` are this app's own rows, by menu-map id, with their routes. They are
160
162
  live whatever the map says. A row the map does not have takes `fn`, `section`,
161
- `label` and `icon`. A row can carry a `badge` (a count), and so can a tab.
163
+ `label` and `icon`, and is a row of this app's frame only: Candidate Hub,
164
+ which no other app's menu shows since 0.3.10, passes `fn: "operations"`,
165
+ `section: "Tools"`, `label: "Candidate hub"` and `icon: "hub-accounts"`. A
166
+ row can carry a `badge` (a count), and so can a tab.
162
167
  An id the map had before 0.3.0 still works (`OS_TOOL_ALIASES`: `pl-vs-budget`
163
168
  is `pl-vs-ly`, `live-sales-by-channel` is `sales`, `customer-otif` is
164
169
  `order-otif`, `new-customer-acquisition` and `at-risk-customers` are
@@ -170,7 +175,8 @@ why).
170
175
  function).
171
176
  - Every other row goes somewhere, in the same tab. A tool with an app of its
172
177
  own opens that app only if the person holds it: the menu reaches every app
173
- the app switcher offers (all but the Hub itself, which is the rail's Hub).
178
+ the app switcher offers (all but the Hub itself, which is the rail's Hub,
179
+ and Candidate Hub, a standalone app since 0.3.10).
174
180
  `OS_TOOL_LINKS` names each tool's app, and `os_context()` decides, whatever
175
181
  status the map gives the tool:
176
182
  - held, with an address: the tool goes there (plus its `path`) with
@@ -239,6 +245,17 @@ why).
239
245
  after its name, in every app (0.3.2, `OS_SAMPLE_MARK`): the owner's mark
240
246
  for work in progress. A row that opens an app has none, so a tool loses it
241
247
  the day it gets one.
248
+ - Every row that opens a page carries the mark of that page's data (0.3.11,
249
+ `osDataStatus()`), so people can tell which numbers to trust: " (*)" after
250
+ the name for sample data (`mock`), " (Incomplete)" in its place for real
251
+ data with parts still missing (`incomplete`, `OS_INCOMPLETE_MARK`), and no
252
+ mark for real, complete data (`working`). The row's tooltip says what its
253
+ mark means (`OS_MARK_HINTS`), and for an incomplete one what is missing. By
254
+ default an app's page is `working` and a page in the Hub `mock`;
255
+ `OS_TOOL_DATA` is the one record of the tools (and views) whose status is
256
+ not their default (today: Retailer sell out (POS), whose dashboard reads
257
+ retailers' sales only). A locked row and the Hub panel have no mark. The Hub
258
+ marks its pages' tabs from the same record (`osMarkedLabel()`).
242
259
  - Operations' Overview is Ops Hub's home dashboard (0.3.3): it opens Ops Hub
243
260
  for someone who holds it, and is locked for someone who does not, like
244
261
  Ops Hub's tools. In the Hub a locked row's page files under its function,
@@ -286,7 +303,9 @@ const grouped = [...groups, { title: "Setup", items: [osSettingsTab("/b2b-frank/
286
303
  Supabase: the rail (`OS_FUNCTIONS`), the menu map (`OS_MENU`), the Hub panel
287
304
  (`OS_HUB_MENU`), `OS_TOOL_LINKS`, `OS_TOOL_ALIASES` and `osToolId()`,
288
305
  `osHubPath()`, `HUB_URL`, `HUB_PATHS`, `HINTS`, `osFooter()`, `staticLinks()`,
289
- `osSettingsTab()`, `OS_SAMPLE_MARK` and `osSampleLabel()`, `osMenuEntries()`
306
+ `osSettingsTab()`, `OS_SAMPLE_MARK` and `osSampleLabel()`, the data marks
307
+ (`OS_TOOL_DATA`, `osDataStatus()`, `OS_INCOMPLETE_MARK`, `osIncompleteLabel()`,
308
+ `osMarkedLabel()`, `OS_MARK_HINTS`), `osMenuEntries()`
290
309
  and `searchOsMenu()` (the menu search's data and matching), and `osFrame()`,
291
310
  the routing rules the frame runs on. An app on its own
292
311
  project (Ops Hub: see "Linked, not federated" in `docs/CONTRACT.md`) pairs it
package/dist/nav.d.ts CHANGED
@@ -71,14 +71,13 @@ export declare const OS_FUNCTIONS: OsNavItem[];
71
71
  * views, an Overview at the top of every function (Cliff draws one for
72
72
  * Finance, Commercial and Operations; Marketing's is the owner's, 0.3.3), and
73
73
  * the two rows the design keeps from before its merge (Customer scorecard,
74
- * Clearance list). Then our four Live apps the map does not have, at the end
74
+ * Clearance list). Then our three Live apps the map does not have, at the end
75
75
  * of their groups, so they stay reachable: Shelf simulator (Marketing >
76
- * Tools), Key accounts (Commercial > Tools), PM Copilot and Candidate
77
- * hub (Operations > Tools); they borrow ops-inventory-value (a stocked
78
- * shelf), com-customer-scorecard, hub-tasks and hub-accounts. Owner, source
79
- * and cadence stay in the sheet. Icons are glyph ids from the design
80
- * system's NAV_ICONS, which draws them inline. Ids renamed in 0.3.0 are in
81
- * OS_TOOL_ALIASES.
76
+ * Tools), Key accounts (Commercial > Tools) and PM Copilot (Operations >
77
+ * Tools); they borrow ops-inventory-value (a stocked shelf),
78
+ * com-customer-scorecard and hub-tasks. Owner, source and cadence stay in
79
+ * the sheet. Icons are glyph ids from the design system's NAV_ICONS, which
80
+ * draws them inline. Ids renamed in 0.3.0 are in OS_TOOL_ALIASES.
82
81
  *
83
82
  * Finance is not Cliff's since 0.3.6: it is Steve Gordijn's Finance build
84
83
  * briefs ("UMG Hub OS: Finance Reporting Build Briefs", 5 October 2026), the
@@ -104,6 +103,14 @@ export declare const OS_FUNCTIONS: OsNavItem[];
104
103
  * accuracy). Our rows the tab does not have stay, after its rows. Each tool's
105
104
  * views keep their names, and every id stays, so no link changes. Finance
106
105
  * stays Steve's.
106
+ *
107
+ * Two rows are gone since 0.3.10 (the owner's calls, 21 October 2026), as
108
+ * neither is on the sheet: Commercial > Customer forecast collaboration
109
+ * (customer-forecast), which came from Cliff's design only, and Operations >
110
+ * Candidate hub (candidate-hub), Enxgy's candidate app, which is a
111
+ * standalone app: no other app's menu shows it, the Hub's included. Candidate
112
+ * Hub places its own row in its own frame, as any app places a tool the map
113
+ * does not have (OsAppTool's `fn`, `section`, `label` and `icon`).
107
114
  */
108
115
  export declare const OS_MENU: Record<OsMenuFunction, OsToolGroup[]>;
109
116
  /**
@@ -164,15 +171,21 @@ export type OsToolLink = {
164
171
  * fixed address is asset-portal.autosolutions.app, which shares the Hub's
165
172
  * sign-in (self-asset-manager.lovable.app cannot read it).
166
173
  *
167
- * Since 0.3.5: Key Accounts and Candidate Hub have their autosolutions.app
168
- * addresses (key-accounts, candidate-hub), as the core catalogue does. The
169
- * lovable.app ones only redirect there, and some internet providers block
170
- * lovable.app.
174
+ * Since 0.3.5: Key Accounts and Candidate Hub (until 0.3.10) have their
175
+ * autosolutions.app addresses (key-accounts, candidate-hub), as the core
176
+ * catalogue does. The lovable.app ones only redirect there, and some internet
177
+ * providers block lovable.app.
171
178
  *
172
179
  * Since 0.3.6: Commercial > Retailer sell out (POS) opens Ops Hub's POS
173
180
  * dashboard (/pos-dashboard), real NetSuite data, not its sample page in the
174
181
  * Hub. Operations > Forecast accuracy stays in the Hub: Ops Hub's /forecast
175
182
  * is the issued forecast, not a measure of past forecasts against actuals.
183
+ *
184
+ * Since 0.3.10 Candidate Hub (candidate_hub) has no entry: it is a standalone
185
+ * app, in no other app's menu. This map is the only way a catalogue app
186
+ * reaches a menu (catalogueLinks and staticLinks read nothing else), so its
187
+ * catalogue row, which the app switcher still lists for the people who hold
188
+ * it, puts no row in any app's menu.
176
189
  */
177
190
  export declare const OS_TOOL_LINKS: Record<string, OsToolLink>;
178
191
  /** The Hub's own pages, for the rail's Hub, Admin and Settings rows in other apps. */
@@ -205,10 +218,60 @@ export declare const HINTS: {
205
218
  * an app. A row that opens an app, this app's own tools, a locked row and
206
219
  * the Hub panel (the Hub's real pages) have none. The Hub's sample pages put
207
220
  * it on their tabs too (`osSampleLabel`), since all their data is mock.
221
+ * Since 0.3.11 the mark follows the row's data status (`osDataStatus`): it
222
+ * is the mark of `mock`, and a marked row's tooltip says what it means.
208
223
  */
209
224
  export declare const OS_SAMPLE_MARK = " (*)";
210
225
  /** `label` with the sample mark after it, once. */
211
226
  export declare function osSampleLabel(label: string): string;
227
+ /**
228
+ * What a row's page shows (0.3.11), so people can tell which numbers to
229
+ * trust: `mock`, sample numbers (" (*)" after the name, `OS_SAMPLE_MARK`);
230
+ * `incomplete`, real data with parts still missing (" (Incomplete)" in the
231
+ * asterisk's place, `OS_INCOMPLETE_MARK`); `working`, real and complete data
232
+ * (no mark).
233
+ */
234
+ export type OsDataStatus = "mock" | "incomplete" | "working";
235
+ /** A tool whose data status is not its default (0.3.11). */
236
+ export type OsToolData = {
237
+ /** Its page's status: its app's page when the tool has an app, else its page in the Hub. */
238
+ data: OsDataStatus;
239
+ /** For `incomplete`: what is still missing, in plain words. The row's tooltip says it. */
240
+ missing?: string;
241
+ /** A view (tab, by id) whose status is not the tool's. */
242
+ tabs?: Readonly<Record<string, OsDataStatus>>;
243
+ };
244
+ /**
245
+ * The one record of data statuses (0.3.11, the owner's three marks of
246
+ * 4 November 2026). By default a tool with an app shows that app's real data
247
+ * (`working`), and every other tool's page in the Hub is one of the design's
248
+ * sample dashboards (`mock`). A tool is listed only where its default is
249
+ * wrong, and when its data changes, this is the one place to change:
250
+ * osFrame marks every app's menu from it, and the Hub marks its pages and
251
+ * their tabs from it (`osDataStatus`).
252
+ */
253
+ export declare const OS_TOOL_DATA: Readonly<Record<string, OsToolData>>;
254
+ /**
255
+ * The mark after the name of a row, or a tab, whose real data is not complete
256
+ * yet (0.3.11): the asterisk's place, in words. A word in the row's label
257
+ * rather than a badge at its end, which in the menu's width would squeeze a
258
+ * long name onto four lines.
259
+ */
260
+ export declare const OS_INCOMPLETE_MARK = " (Incomplete)";
261
+ /** `label` with the incomplete mark after it, once (0.3.11). */
262
+ export declare function osIncompleteLabel(label: string): string;
263
+ /** `label` with the mark its data status calls for (0.3.11): " (*)", " (Incomplete)", or none. */
264
+ export declare function osMarkedLabel(label: string, status: OsDataStatus): string;
265
+ /** What each mark means (0.3.11): a marked row's tooltip, and the words of an app's legend. */
266
+ export declare const OS_MARK_HINTS: Readonly<Record<OsDataStatus, string>>;
267
+ /**
268
+ * The data status of a tool's page, or of one of its views (0.3.11), from
269
+ * `OS_TOOL_DATA`. `where` is the page the person is shown: "app", the tool's
270
+ * app (or this app's own page for it); "hub", its page in the Hub. A tool
271
+ * with an app shows no data of its own in the Hub (its page there only sends
272
+ * people to the app, or says why it cannot), so its Hub page is `mock`.
273
+ */
274
+ export declare function osDataStatus(toolId: string, where: "app" | "hub", tabId?: string): OsDataStatus;
212
275
  /** The Settings tab's id, label and glyph (the rail's own settings glyph), 0.3.2. */
213
276
  export declare const OS_SETTINGS_TAB: Readonly<OsNavItem>;
214
277
  /**
@@ -280,7 +343,9 @@ export type OsTabGroup = {
280
343
  * One of this app's own tools. `id` is an OS_MENU tool id (or one it had
281
344
  * before 0.3.0, OS_TOOL_ALIASES), which places it in the menu and enables it
282
345
  * however the map marks it; an id the map does not have needs `fn`,
283
- * `section`, `label` and `icon` to be placed.
346
+ * `section`, `label` and `icon` to be placed, and is then a row of this app's
347
+ * frame only (Candidate Hub's own row since 0.3.10: `fn: "operations"`,
348
+ * `section: "Tools"`, `label: "Candidate hub"`, `icon: "hub-accounts"`).
284
349
  */
285
350
  export type OsAppTool = OsRoute & {
286
351
  id: string;
package/dist/nav.js CHANGED
@@ -47,14 +47,13 @@ const overview = (fn) => ({
47
47
  * views, an Overview at the top of every function (Cliff draws one for
48
48
  * Finance, Commercial and Operations; Marketing's is the owner's, 0.3.3), and
49
49
  * the two rows the design keeps from before its merge (Customer scorecard,
50
- * Clearance list). Then our four Live apps the map does not have, at the end
50
+ * Clearance list). Then our three Live apps the map does not have, at the end
51
51
  * of their groups, so they stay reachable: Shelf simulator (Marketing >
52
- * Tools), Key accounts (Commercial > Tools), PM Copilot and Candidate
53
- * hub (Operations > Tools); they borrow ops-inventory-value (a stocked
54
- * shelf), com-customer-scorecard, hub-tasks and hub-accounts. Owner, source
55
- * and cadence stay in the sheet. Icons are glyph ids from the design
56
- * system's NAV_ICONS, which draws them inline. Ids renamed in 0.3.0 are in
57
- * OS_TOOL_ALIASES.
52
+ * Tools), Key accounts (Commercial > Tools) and PM Copilot (Operations >
53
+ * Tools); they borrow ops-inventory-value (a stocked shelf),
54
+ * com-customer-scorecard and hub-tasks. Owner, source and cadence stay in
55
+ * the sheet. Icons are glyph ids from the design system's NAV_ICONS, which
56
+ * draws them inline. Ids renamed in 0.3.0 are in OS_TOOL_ALIASES.
58
57
  *
59
58
  * Finance is not Cliff's since 0.3.6: it is Steve Gordijn's Finance build
60
59
  * briefs ("UMG Hub OS: Finance Reporting Build Briefs", 5 October 2026), the
@@ -80,6 +79,14 @@ const overview = (fn) => ({
80
79
  * accuracy). Our rows the tab does not have stay, after its rows. Each tool's
81
80
  * views keep their names, and every id stays, so no link changes. Finance
82
81
  * stays Steve's.
82
+ *
83
+ * Two rows are gone since 0.3.10 (the owner's calls, 21 October 2026), as
84
+ * neither is on the sheet: Commercial > Customer forecast collaboration
85
+ * (customer-forecast), which came from Cliff's design only, and Operations >
86
+ * Candidate hub (candidate-hub), Enxgy's candidate app, which is a
87
+ * standalone app: no other app's menu shows it, the Hub's included. Candidate
88
+ * Hub places its own row in its own frame, as any app places a tool the map
89
+ * does not have (OsAppTool's `fn`, `section`, `label` and `icon`).
83
90
  */
84
91
  export const OS_MENU = {
85
92
  finance: [
@@ -142,7 +149,6 @@ export const OS_MENU = {
142
149
  tool("line-form-populator", "Line form populator", "com-line-form-populator", "In progress"),
143
150
  tool("pricelist-generator", "Pricelist generator", "com-pricelist-generator", "To build"),
144
151
  tool("clearance-list", "Clearance list", "com-clearance-list", "No status"),
145
- tool("customer-forecast", "Customer forecast collaboration", "ops-forecast-accuracy", "In progress", [["lines", "Lines to decide"], ["cycle", "This cycle"]]),
146
152
  tool("key-accounts", "Key accounts", "com-customer-scorecard", "Live"),
147
153
  ] },
148
154
  ],
@@ -163,7 +169,6 @@ export const OS_MENU = {
163
169
  tool("ordering-tool", "Order planning", "ops-order-planing", "Live", [["order-suggest", "Suggestions"], ["order-draft", "Draft"], ["order-approvals", "Approvals"]]),
164
170
  tool("carton-label-generator", "Carton label generator", "ops-carton-label-generator", "Live"),
165
171
  tool("pm-copilot", "PM Copilot", "hub-tasks", "Live"),
166
- tool("candidate-hub", "Candidate hub", "hub-accounts", "Live"),
167
172
  ] },
168
173
  ],
169
174
  };
@@ -233,15 +238,21 @@ const opsHub = (path) => ({ app: "ops_hub", url: OPS_HUB, path });
233
238
  * fixed address is asset-portal.autosolutions.app, which shares the Hub's
234
239
  * sign-in (self-asset-manager.lovable.app cannot read it).
235
240
  *
236
- * Since 0.3.5: Key Accounts and Candidate Hub have their autosolutions.app
237
- * addresses (key-accounts, candidate-hub), as the core catalogue does. The
238
- * lovable.app ones only redirect there, and some internet providers block
239
- * lovable.app.
241
+ * Since 0.3.5: Key Accounts and Candidate Hub (until 0.3.10) have their
242
+ * autosolutions.app addresses (key-accounts, candidate-hub), as the core
243
+ * catalogue does. The lovable.app ones only redirect there, and some internet
244
+ * providers block lovable.app.
240
245
  *
241
246
  * Since 0.3.6: Commercial > Retailer sell out (POS) opens Ops Hub's POS
242
247
  * dashboard (/pos-dashboard), real NetSuite data, not its sample page in the
243
248
  * Hub. Operations > Forecast accuracy stays in the Hub: Ops Hub's /forecast
244
249
  * is the issued forecast, not a measure of past forecasts against actuals.
250
+ *
251
+ * Since 0.3.10 Candidate Hub (candidate_hub) has no entry: it is a standalone
252
+ * app, in no other app's menu. This map is the only way a catalogue app
253
+ * reaches a menu (catalogueLinks and staticLinks read nothing else), so its
254
+ * catalogue row, which the app switcher still lists for the people who hold
255
+ * it, puts no row in any app's menu.
245
256
  */
246
257
  export const OS_TOOL_LINKS = {
247
258
  "live-ecomm-sales": { app: "alive_reporting", url: "https://e-sales.autosolutions.app" },
@@ -271,7 +282,6 @@ export const OS_TOOL_LINKS = {
271
282
  "ordering-tool": opsHub("/ordering"),
272
283
  "carton-label-generator": { app: "label_maker", url: "https://label-maker.autosolutions.app" },
273
284
  "pm-copilot": { app: "pm_copilot", url: "https://pm-copilot.autosolutions.app", path: "/ops" },
274
- "candidate-hub": { app: "candidate_hub", url: "https://candidate-hub.autosolutions.app" },
275
285
  };
276
286
  /** The Hub's own pages, for the rail's Hub, Admin and Settings rows in other apps. */
277
287
  export const HUB_PATHS = {
@@ -303,12 +313,89 @@ export const HINTS = {
303
313
  * an app. A row that opens an app, this app's own tools, a locked row and
304
314
  * the Hub panel (the Hub's real pages) have none. The Hub's sample pages put
305
315
  * it on their tabs too (`osSampleLabel`), since all their data is mock.
316
+ * Since 0.3.11 the mark follows the row's data status (`osDataStatus`): it
317
+ * is the mark of `mock`, and a marked row's tooltip says what it means.
306
318
  */
307
319
  export const OS_SAMPLE_MARK = " (*)";
308
320
  /** `label` with the sample mark after it, once. */
309
321
  export function osSampleLabel(label) {
310
322
  return label.endsWith(OS_SAMPLE_MARK) ? label : `${label}${OS_SAMPLE_MARK}`;
311
323
  }
324
+ /**
325
+ * The one record of data statuses (0.3.11, the owner's three marks of
326
+ * 4 November 2026). By default a tool with an app shows that app's real data
327
+ * (`working`), and every other tool's page in the Hub is one of the design's
328
+ * sample dashboards (`mock`). A tool is listed only where its default is
329
+ * wrong, and when its data changes, this is the one place to change:
330
+ * osFrame marks every app's menu from it, and the Hub marks its pages and
331
+ * their tabs from it (`osDataStatus`).
332
+ */
333
+ export const OS_TOOL_DATA = {
334
+ /* Ops Hub's POS dashboard (0.3.6) reads retailers' sales only: Ops Hub's
335
+ menu shows its other two views locked, not built. */
336
+ "retailer-sell-out": {
337
+ data: "incomplete",
338
+ missing: "Sell in vs sell out only. Retailer stock and ranging data are not in yet, so Retailer stock cover and Ranging are not built.",
339
+ },
340
+ };
341
+ /**
342
+ * The mark after the name of a row, or a tab, whose real data is not complete
343
+ * yet (0.3.11): the asterisk's place, in words. A word in the row's label
344
+ * rather than a badge at its end, which in the menu's width would squeeze a
345
+ * long name onto four lines.
346
+ */
347
+ export const OS_INCOMPLETE_MARK = " (Incomplete)";
348
+ /** `label` with the incomplete mark after it, once (0.3.11). */
349
+ export function osIncompleteLabel(label) {
350
+ return label.endsWith(OS_INCOMPLETE_MARK) ? label : `${label}${OS_INCOMPLETE_MARK}`;
351
+ }
352
+ /** `label` with the mark its data status calls for (0.3.11): " (*)", " (Incomplete)", or none. */
353
+ export function osMarkedLabel(label, status) {
354
+ if (status === "mock")
355
+ return osSampleLabel(label);
356
+ return status === "incomplete" ? osIncompleteLabel(label) : label;
357
+ }
358
+ /** What each mark means (0.3.11): a marked row's tooltip, and the words of an app's legend. */
359
+ export const OS_MARK_HINTS = {
360
+ mock: "(*) Sample data: not real numbers yet.",
361
+ incomplete: "(Incomplete) Real data, but some parts are still missing.",
362
+ working: "No mark: real data.",
363
+ };
364
+ const hasOwn = (object, key) => Object.prototype.hasOwnProperty.call(object, key);
365
+ /** Whether the tool has an app to open (an `OS_TOOL_LINKS` entry with an app or an address). */
366
+ function hasApp(id) {
367
+ const link = hasOwn(OS_TOOL_LINKS, id) ? OS_TOOL_LINKS[id] : undefined;
368
+ return Boolean(link?.app || link?.url);
369
+ }
370
+ /**
371
+ * The data status of a tool's page, or of one of its views (0.3.11), from
372
+ * `OS_TOOL_DATA`. `where` is the page the person is shown: "app", the tool's
373
+ * app (or this app's own page for it); "hub", its page in the Hub. A tool
374
+ * with an app shows no data of its own in the Hub (its page there only sends
375
+ * people to the app, or says why it cannot), so its Hub page is `mock`.
376
+ */
377
+ export function osDataStatus(toolId, where, tabId) {
378
+ const id = osToolId(toolId);
379
+ if (where === "hub" && hasApp(id))
380
+ return "mock";
381
+ const note = hasOwn(OS_TOOL_DATA, id) ? OS_TOOL_DATA[id] : undefined;
382
+ const status = note?.data ?? (where === "app" ? "working" : "mock");
383
+ const tabs = note?.tabs;
384
+ return tabId !== undefined && tabs && hasOwn(tabs, tabId) ? tabs[tabId] : status;
385
+ }
386
+ /* A row with the mark its page's data status calls for (0.3.11), after its
387
+ name, and a tooltip that says what the mark means: for an incomplete row
388
+ also what is missing. A working row is as it was. */
389
+ function marked(row, id, status) {
390
+ if (status === "working")
391
+ return row;
392
+ const missing = status === "incomplete" && hasOwn(OS_TOOL_DATA, id) ? OS_TOOL_DATA[id].missing : undefined;
393
+ return {
394
+ ...row,
395
+ label: osMarkedLabel(row.label, status),
396
+ title: missing ? `${OS_MARK_HINTS[status]} ${missing}` : OS_MARK_HINTS[status],
397
+ };
398
+ }
312
399
  /** The Settings tab's id, label and glyph (the rail's own settings glyph), 0.3.2. */
313
400
  export const OS_SETTINGS_TAB = { id: "settings", label: "Settings", icon: "settings" };
314
401
  /**
@@ -509,9 +596,12 @@ export function osFrame(options) {
509
596
  ...(group.title ? { title: group.title } : {}),
510
597
  items: group.items.map((entry) => {
511
598
  const base = { id: entry.id, label: entry.label, icon: entry.icon };
599
+ /* Every row that opens a page carries the mark of that page's data
600
+ (0.3.11): this app's own page or the tool's app, or its page in
601
+ the Hub. A locked row opens nothing, and carries none. */
512
602
  const mine = own.get(entry.id);
513
603
  if (mine)
514
- return rowFor(base, mine);
604
+ return marked(rowFor(base, mine), entry.id, osDataStatus(entry.id, "app"));
515
605
  /* Its page in the Hub, which in the Hub also places a location there
516
606
  on this row when the row itself opens an app. */
517
607
  const page = osHubPath(fn, entry.overview ? null : entry.id);
@@ -519,7 +609,7 @@ export function osFrame(options) {
519
609
  knows what this person holds. */
520
610
  const href = links[entry.id];
521
611
  if (href)
522
- return { ...base, ...(isHub ? { match: [page] } : {}), href };
612
+ return marked({ ...base, ...(isHub ? { match: [page] } : {}), href }, entry.id, osDataStatus(entry.id, "app"));
523
613
  const reason = locked[entry.id];
524
614
  if (reason) {
525
615
  if (isHub)
@@ -528,8 +618,9 @@ export function osFrame(options) {
528
618
  }
529
619
  /* No app of its own (or one this frame cannot reach: off the core
530
620
  with no fixed address, or held and not deployed yet): its page in
531
- the Hub, a sample, marked so (0.3.2). */
532
- return inHub({ ...base, label: osSampleLabel(base.label) }, page);
621
+ the Hub, a sample unless OS_TOOL_DATA says otherwise, marked so
622
+ (0.3.2, from its data status since 0.3.11). */
623
+ return marked(inHub(base, page), entry.id, osDataStatus(entry.id, "hub"));
533
624
  }),
534
625
  }));
535
626
  }
@@ -724,8 +815,9 @@ export function searchOsMenu(entries, query, limit = 8) {
724
815
  const typed = words.join(" ");
725
816
  const ranked = [];
726
817
  entries.forEach((entry, at) => {
727
- /* The sample mark is no part of the name. */
728
- const label = fold(entry.label.endsWith(OS_SAMPLE_MARK) ? entry.label.slice(0, -OS_SAMPLE_MARK.length) : entry.label);
818
+ /* A data mark, the sample mark or (0.3.11) the incomplete one, is no part of the name. */
819
+ const mark = [OS_SAMPLE_MARK, OS_INCOMPLETE_MARK].find((m) => entry.label.endsWith(m));
820
+ const label = fold(mark ? entry.label.slice(0, -mark.length) : entry.label);
729
821
  const all = `${label} ${fold(entry.context)}`;
730
822
  if (!words.every((word) => all.includes(word)))
731
823
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autosolutions-os",
3
- "version": "0.3.9",
3
+ "version": "0.3.11",
4
4
  "description": "One sign-in, one company switcher, one app grid. What every AutoSolutions app imports instead of copying.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",