@bakers-build/addon-bakers-ui 0.6.1-next.5 → 0.6.1-next.7
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/src/Component/section-list/index.d.ts +5 -5
- package/dist/src/Component/section-list/index.js +2 -2
- package/dist/src/Entity/conductor/Data/conductors.d.ts +2 -12
- package/dist/src/Entity/conductor/Data/conductors.js +3 -25
- package/dist/src/Entity/conductor/Data/own-conductor.d.ts +5 -7
- package/dist/src/Entity/conductor/Data/own-conductor.js +9 -16
- package/dist/src/Entity/project/Screen/projects-screen.js +1 -4
- package/dist/src/Entity/run/Component/run-detail/index.d.ts +1 -1
- package/dist/src/Entity/run/Component/run-detail/index.js +1 -1
- package/dist/src/Entity/run/Data/query.d.ts +0 -5
- package/dist/src/Entity/run/Data/query.js +0 -8
- package/dist/src/Entity/run/Data/runs.d.ts +0 -2
- package/dist/src/Entity/run/Data/runs.js +1 -26
- package/dist/src/Entity/run/Screen/run-detail.d.ts +5 -2
- package/dist/src/Entity/run/Screen/run-detail.js +13 -2
- package/dist/src/Entity/ticket/Component/edit-form/index.d.ts +1 -2
- package/dist/src/Entity/ticket/Component/edit-form/index.js +1 -2
- package/dist/src/Entity/ticket/Component/ticket-content/index.d.ts +3 -8
- package/dist/src/Entity/ticket/Component/ticket-content/index.js +4 -71
- package/dist/src/Entity/ticket/Component/ticket-content/model.d.ts +0 -25
- package/dist/src/Entity/ticket/Component/ticket-content/model.js +0 -195
- package/dist/src/Entity/ticket/Data/parents.d.ts +3 -3
- package/dist/src/Entity/ticket/Data/parents.js +8 -9
- package/dist/src/Entity/ticket/Data/query.d.ts +0 -2
- package/dist/src/Entity/ticket/Data/query.js +0 -8
- package/dist/src/Entity/ticket/Data/tickets.d.ts +0 -2
- package/dist/src/Entity/ticket/Data/tickets.js +1 -20
- package/dist/src/Entity/ticket/Data/write.d.ts +0 -32
- package/dist/src/Entity/ticket/Data/write.js +0 -94
- package/dist/src/Entity/ticket/Form/edit-data.js +10 -4
- package/dist/src/Entity/ticket/Form/edit-parent-source.d.ts +1 -1
- package/dist/src/Entity/ticket/Form/edit.d.ts +11 -8
- package/dist/src/Entity/ticket/Form/edit.js +1 -1
- package/dist/src/Entity/ticket/Form/parent-filter.d.ts +2 -2
- package/dist/src/Entity/ticket/Form/parent-filter.js +1 -1
- package/dist/src/Entity/ticket/Form/parent-source.d.ts +11 -2
- package/dist/src/Entity/ticket/Form/parent-source.js +5 -7
- package/dist/src/Entity/ticket/Screen/edit-assignment-form.d.ts +2 -2
- package/dist/src/Entity/ticket/Screen/edit-assignment-form.js +3 -3
- package/dist/src/Entity/ticket/Screen/parent-filter-form.js +3 -4
- package/dist/src/Entity/ticket/Screen/ticket-content-screen.d.ts +1 -1
- package/dist/src/Entity/ticket/Screen/ticket-content-screen.js +1 -1
- package/dist/src/Entity/ticket/Screen/ticket-react-markdown.js +2 -2
- package/dist/src/Entity/ticket/Screen/ticket-runs.d.ts +2 -0
- package/dist/src/Entity/ticket/Screen/ticket-runs.js +26 -16
- package/dist/src/Entity/ticket/Screen/ticket-search.d.ts +1 -1
- package/dist/src/Entity/ticket/Screen/tickets.d.ts +1 -2
- package/dist/src/Entity/ticket/Screen/tickets.js +0 -23
- package/dist/src/Entity/user/Data/member-context.d.ts +1 -1
- package/dist/src/Entity/user/Data/users.d.ts +17 -98
- package/dist/src/Entity/user/Data/users.js +27 -74
- package/dist/src/Entity/user/Screen/member-overview.d.ts +12 -29
- package/dist/src/Entity/user/Screen/member-overview.js +38 -38
- package/dist/src/Entity/workspace/Screen/workspace-picker.js +1 -2
- package/dist/src/Form/field.js +1 -1
- package/dist/src/Kernel/key-input.d.ts +1 -2
- package/dist/src/Kernel/key-input.js +1 -2
- package/dist/src/Kernel/logo.d.ts +3 -0
- package/dist/src/Kernel/logo.js +48 -0
- package/dist/src/Kernel/splash.js +5 -5
- package/dist/src/Kernel/tui-kernel.js +1 -5
- package/dist/src/Routing/context.d.ts +0 -5
- package/dist/src/Routing/context.js +0 -6
- package/dist/src/Routing/registry.js +3 -6
- package/dist/src/Routing/routes.js +1 -24
- package/dist/src/Screen/async-modal-screen.d.ts +1 -1
- package/dist/src/Screen/async-modal-screen.js +1 -1
- package/dist/src/Widget/chrome.d.ts +1 -1
- package/dist/src/Widget/chrome.js +1 -1
- package/dist/src/Widget/option-source.js +3 -3
- package/dist/src/Widget/types.d.ts +2 -3
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.js +1 -2
- package/dist/src/launcher.d.ts +7 -14
- package/dist/src/launcher.js +2 -10
- package/dist/src/lib/cursor.d.ts +5 -5
- package/dist/src/lib/cursor.js +5 -5
- package/dist/src/lib/refresh-signal.d.ts +2 -2
- package/dist/src/lib/refresh-signal.js +3 -2
- package/dist/src/lib/theme.d.ts +7 -23
- package/dist/src/lib/theme.js +7 -23
- package/dist/src/plugin.d.ts +1 -2
- package/dist/src/plugin.js +3 -7
- package/dist/src/react-experiment.js +0 -2
- package/dist/src/route.js +1 -1
- package/dist/src/types.d.ts +5 -56
- package/package.json +4 -4
- package/dist/src/Agent/launch.d.ts +0 -25
- package/dist/src/Agent/launch.js +0 -57
- package/dist/src/Component/badge/index.d.ts +0 -11
- package/dist/src/Component/badge/index.js +0 -10
- package/dist/src/Component/bar-chart/index.d.ts +0 -16
- package/dist/src/Component/bar-chart/index.js +0 -63
- package/dist/src/Component/heat-map/index.d.ts +0 -21
- package/dist/src/Component/heat-map/index.js +0 -86
- package/dist/src/Component/stats-panel/index.d.ts +0 -61
- package/dist/src/Component/stats-panel/index.js +0 -112
- package/dist/src/Component/team-member-workload-list/index.d.ts +0 -9
- package/dist/src/Component/team-member-workload-list/index.js +0 -31
- package/dist/src/Entity/team/Data/members.d.ts +0 -30
- package/dist/src/Entity/team/Data/members.js +0 -83
- package/dist/src/Entity/team/Data/projects.d.ts +0 -3
- package/dist/src/Entity/team/Data/projects.js +0 -23
- package/dist/src/Entity/team/Data/team.d.ts +0 -22
- package/dist/src/Entity/team/Data/team.js +0 -38
- package/dist/src/Entity/team/Data/teams.d.ts +0 -223
- package/dist/src/Entity/team/Data/teams.js +0 -268
- package/dist/src/Entity/team/Data/workload.d.ts +0 -25
- package/dist/src/Entity/team/Data/workload.js +0 -60
- package/dist/src/Entity/team/Screen/team-member-work.d.ts +0 -41
- package/dist/src/Entity/team/Screen/team-member-work.js +0 -56
- package/dist/src/Entity/team/Screen/team-users.d.ts +0 -63
- package/dist/src/Entity/team/Screen/team-users.js +0 -210
- package/dist/src/Entity/team/Screen/team-work.d.ts +0 -39
- package/dist/src/Entity/team/Screen/team-work.js +0 -112
- package/dist/src/Entity/team/Screen/teams-screen.d.ts +0 -110
- package/dist/src/Entity/team/Screen/teams-screen.js +0 -264
- package/dist/src/Entity/ticket/Component/create-form/index.d.ts +0 -28
- package/dist/src/Entity/ticket/Component/create-form/index.js +0 -74
- package/dist/src/Entity/ticket/Component/demo-statistics.d.ts +0 -14
- package/dist/src/Entity/ticket/Component/demo-statistics.js +0 -88
- package/dist/src/Entity/ticket/Component/react-statistics.d.ts +0 -14
- package/dist/src/Entity/ticket/Component/react-statistics.js +0 -23
- package/dist/src/Entity/ticket/Data/workflow.d.ts +0 -9
- package/dist/src/Entity/ticket/Data/workflow.js +0 -18
- package/dist/src/Entity/ticket/Form/create-data.d.ts +0 -75
- package/dist/src/Entity/ticket/Form/create-data.js +0 -217
- package/dist/src/Entity/ticket/Form/create.d.ts +0 -230
- package/dist/src/Entity/ticket/Form/create.js +0 -198
- package/dist/src/Entity/ticket/Screen/create-ticket-form.d.ts +0 -133
- package/dist/src/Entity/ticket/Screen/create-ticket-form.js +0 -621
- package/dist/src/Entity/ticket/Screen/ticket-agents.d.ts +0 -134
- package/dist/src/Entity/ticket/Screen/ticket-agents.js +0 -253
- package/dist/src/Entity/ticket/Screen/ticket-react.d.ts +0 -41
- package/dist/src/Entity/ticket/Screen/ticket-react.js +0 -136
- package/dist/src/Entity/ticket-template/Data/templates.d.ts +0 -26
- package/dist/src/Entity/ticket-template/Data/templates.js +0 -62
- package/dist/src/Kernel/braid.d.ts +0 -4
- package/dist/src/Kernel/braid.js +0 -10
- package/dist/src/Screen/empty-overview.d.ts +0 -9
- package/dist/src/Screen/empty-overview.js +0 -14
- package/dist/src/Statistics/client.d.ts +0 -73
- package/dist/src/Statistics/client.js +0 -220
- package/dist/src/Statistics/comparison-chart.d.ts +0 -7
- package/dist/src/Statistics/comparison-chart.js +0 -525
- package/dist/src/Statistics/dashboard.d.ts +0 -93
- package/dist/src/Statistics/dashboard.js +0 -206
- package/dist/src/Statistics/figures.d.ts +0 -18
- package/dist/src/Statistics/figures.js +0 -162
- package/dist/src/Statistics/member-stats.d.ts +0 -58
- package/dist/src/Statistics/member-stats.js +0 -152
- package/dist/src/Statistics/presentation.d.ts +0 -8
- package/dist/src/Statistics/presentation.js +0 -36
- package/dist/src/Statistics/screen.d.ts +0 -44
- package/dist/src/Statistics/screen.js +0 -204
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import { actionItem } from '../../../Component/footer-actions/index.js';
|
|
2
|
-
import {
|
|
2
|
+
import { sectionRowNode, sectionRows, } from '../../../Component/section-list/index.js';
|
|
3
|
+
import { columnNode } from '../../../lib/vnode.js';
|
|
4
|
+
import { AsyncScreen } from '../../../Screen/async-screen.js';
|
|
3
5
|
import { assertActiveMember } from '../Data/member-context.js';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
6
|
+
import { loadUserProfile } from '../Data/users.js';
|
|
7
|
+
const profileLines = (profile) => {
|
|
8
|
+
const [first = 'none', ...rest] = profile.aboutMe
|
|
9
|
+
? profile.aboutMe.replace(/\r\n?/g, '\n').split('\n')
|
|
10
|
+
: [];
|
|
11
|
+
return [
|
|
12
|
+
`Username: ${profile.username || 'none'}`,
|
|
13
|
+
`Position: ${profile.position || 'none'}`,
|
|
14
|
+
`About me: ${first}`,
|
|
15
|
+
...rest.map((line) => ` ${line}`),
|
|
16
|
+
];
|
|
17
|
+
};
|
|
18
|
+
/** The workspace member landing tab: the person's profile, once their active
|
|
19
|
+
* membership in the workspace is confirmed. */
|
|
20
|
+
export class WorkspaceMemberOverviewScreen extends AsyncScreen {
|
|
17
21
|
frameId = 'workspace-member-overview';
|
|
18
22
|
static route = {
|
|
19
23
|
id: 'workspace.member.overview',
|
|
@@ -27,7 +31,10 @@ export class WorkspaceMemberOverviewScreen extends MemberOverviewScreen {
|
|
|
27
31
|
},
|
|
28
32
|
};
|
|
29
33
|
id = WorkspaceMemberOverviewScreen.route.id;
|
|
30
|
-
|
|
34
|
+
reload(context) {
|
|
35
|
+
this.retry(context);
|
|
36
|
+
}
|
|
37
|
+
async load(context) {
|
|
31
38
|
if (!context.services)
|
|
32
39
|
throw new Error('Member Overview requires services');
|
|
33
40
|
const workspaceId = context.params?.workspaceId ?? context.services.workspaceId;
|
|
@@ -35,29 +42,22 @@ export class WorkspaceMemberOverviewScreen extends MemberOverviewScreen {
|
|
|
35
42
|
if (!workspaceId || !userId)
|
|
36
43
|
throw new Error('Workspace member Overview requires workspaceId and userId');
|
|
37
44
|
await assertActiveMember(context.services.client, 'bb_workspace', workspaceId, userId);
|
|
45
|
+
return loadUserProfile(context.services.client, userId);
|
|
38
46
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
async validate(context) {
|
|
55
|
-
if (!context.services)
|
|
56
|
-
throw new Error('Member Overview requires services');
|
|
57
|
-
const teamId = context.params?.teamId;
|
|
58
|
-
const userId = context.user?.id ?? context.params?.userId;
|
|
59
|
-
if (!teamId || !userId)
|
|
60
|
-
throw new Error('Team member Overview requires teamId and userId');
|
|
61
|
-
await assertActiveMember(context.services.client, 'bb_team', teamId, userId);
|
|
47
|
+
renderLoading() {
|
|
48
|
+
return ['Loading member…'];
|
|
49
|
+
}
|
|
50
|
+
renderReady(profile) {
|
|
51
|
+
const rows = sectionRows([
|
|
52
|
+
{ heading: 'Profile', lines: profileLines(profile) },
|
|
53
|
+
]).map((row) => sectionRowNode(this.frameId, row));
|
|
54
|
+
return columnNode(this.frameId, ...rows);
|
|
55
|
+
}
|
|
56
|
+
chrome(context) {
|
|
57
|
+
const name = context.user?.name ?? context.params?.userName ?? 'member';
|
|
58
|
+
return { title: `${name} · overview` };
|
|
59
|
+
}
|
|
60
|
+
actions() {
|
|
61
|
+
return [actionItem(`${this.id}-tab`, 'Tab', 'tabs')];
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// BB-472: the cockpit's workspace switch. A one-column `ListTable`,
|
|
2
|
-
// presented as a popup over whichever screen opened it —
|
|
3
|
-
// pattern `Entity/ticket/Screen/create-ticket-form.ts` uses
|
|
2
|
+
// presented as a popup over whichever screen opened it — a modal
|
|
4
3
|
// (`AsyncModalScreen`), not a full-screen route: switching workspace is a
|
|
5
4
|
// short, dismissable action from wherever the operator already is, not a
|
|
6
5
|
// destination of its own.
|
package/dist/src/Form/field.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// `clearable: false` and "no clearable" are the same thing, so the key stays ABSENT
|
|
2
|
-
// unless asked for —
|
|
2
|
+
// unless asked for — a form that wants none declares nothing.
|
|
3
3
|
const FACTORY = {
|
|
4
4
|
text: (id, label) => ({ id, label, kind: 'text' }),
|
|
5
5
|
select: (id, label, o) => ({
|
|
@@ -44,7 +44,6 @@ import { type KeyEvent } from '@opentui/core';
|
|
|
44
44
|
* kernel already behaved this way whenever the two bytes landed in separate
|
|
45
45
|
* chunks — so this is the older contract restored, not a new one invented.
|
|
46
46
|
*
|
|
47
|
-
*
|
|
48
|
-
* in `tests-bun/key-input.test.ts`.
|
|
47
|
+
* The full table lives in `tests-bun/key-input.test.ts`.
|
|
49
48
|
*/
|
|
50
49
|
export declare function keyEventToKeys(event: KeyEvent): string[];
|
|
@@ -128,8 +128,7 @@ function canonicalKey(key) {
|
|
|
128
128
|
* kernel already behaved this way whenever the two bytes landed in separate
|
|
129
129
|
* chunks — so this is the older contract restored, not a new one invented.
|
|
130
130
|
*
|
|
131
|
-
*
|
|
132
|
-
* in `tests-bun/key-input.test.ts`.
|
|
131
|
+
* The full table lives in `tests-bun/key-input.test.ts`.
|
|
133
132
|
*/
|
|
134
133
|
export function keyEventToKeys(event) {
|
|
135
134
|
const delivered = event.sequence !== '' ? event.sequence : event.raw;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { h, StyledText, TextRenderable, } from '@opentui/core';
|
|
2
|
+
import { BRAND_LINE, BRAND_SLICE, BRAND_TILE } from '../lib/theme.js';
|
|
3
|
+
// The bread-slice mark of docs/public/logo.svg as 14×14 pixels: butter tile (T),
|
|
4
|
+
// dark outline, pupils, mouth and crumb (L), white slice (S); `.` stays unpainted.
|
|
5
|
+
const PIXELS = [
|
|
6
|
+
'.TTTTTTTTTTTT.',
|
|
7
|
+
'TTTTTTTTTTTTLT',
|
|
8
|
+
'TTTTLLLLLLTTLT',
|
|
9
|
+
'TTTLSSSSSSLTTT',
|
|
10
|
+
'TTLSSSSSSSSLTT',
|
|
11
|
+
'TTLSSSSSSSSLTT',
|
|
12
|
+
'TTLSSLSSLSSLTT',
|
|
13
|
+
'TTLSSSSSSSSLTT',
|
|
14
|
+
'TTLSSSLLSSSLTT',
|
|
15
|
+
'TTLSSSSSSSSLTT',
|
|
16
|
+
'TTLSSSSSSSSLTT',
|
|
17
|
+
'TTLLLLLLLLLLTT',
|
|
18
|
+
'TTTTTTTTTTTTTT',
|
|
19
|
+
'.TTTTTTTTTTTT.',
|
|
20
|
+
];
|
|
21
|
+
const COLOUR = {
|
|
22
|
+
T: BRAND_TILE,
|
|
23
|
+
L: BRAND_LINE,
|
|
24
|
+
S: BRAND_SLICE,
|
|
25
|
+
};
|
|
26
|
+
export const LOGO_WIDTH = 14;
|
|
27
|
+
// Two pixel rows per cell: the upper half block takes the top pixel as fg and the bottom as bg.
|
|
28
|
+
const cell = (top, bottom) => {
|
|
29
|
+
if (top === undefined) {
|
|
30
|
+
return bottom === undefined
|
|
31
|
+
? { __isChunk: true, text: ' ' }
|
|
32
|
+
: { __isChunk: true, text: '▄', fg: bottom };
|
|
33
|
+
}
|
|
34
|
+
if (top === bottom)
|
|
35
|
+
return { __isChunk: true, text: '█', fg: top };
|
|
36
|
+
return bottom === undefined
|
|
37
|
+
? { __isChunk: true, text: '▀', fg: top }
|
|
38
|
+
: { __isChunk: true, text: '▀', fg: top, bg: bottom };
|
|
39
|
+
};
|
|
40
|
+
export const logoTree = () => Array.from({ length: PIXELS.length / 2 }, (_, row) => {
|
|
41
|
+
const top = PIXELS[row * 2];
|
|
42
|
+
const bottom = PIXELS[row * 2 + 1];
|
|
43
|
+
return h(TextRenderable, {
|
|
44
|
+
id: `splash-logo-row-${row}`,
|
|
45
|
+
content: new StyledText([...top].map((pixel, x) => cell(COLOUR[pixel], COLOUR[bottom[x]]))),
|
|
46
|
+
selectable: false,
|
|
47
|
+
});
|
|
48
|
+
});
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// (multi-line block letters) so the mark reads large inside a BORDER box.
|
|
7
7
|
import { ASCIIFontRenderable, BoxRenderable, h, measureText, } from '@opentui/core';
|
|
8
8
|
import { BORDER, DEFAULT_BACKGROUND, DEFAULT_FOREGROUND, SPLASH_MS, } from '../lib/theme.js';
|
|
9
|
-
import {
|
|
9
|
+
import { LOGO_WIDTH, logoTree } from './logo.js';
|
|
10
10
|
export { SPLASH_MS };
|
|
11
11
|
/** OpenTUI ASCIIFont name for the splash wordmark. */
|
|
12
12
|
export const SPLASH_FONT = 'block';
|
|
@@ -18,7 +18,7 @@ export const SPLASH_FRAME_PAD_Y = 2;
|
|
|
18
18
|
export const SPLASH_FRAME_PAD_X = 4;
|
|
19
19
|
const splashMarkSize = measureText({ text: SPLASH_TEXT, font: SPLASH_FONT });
|
|
20
20
|
/** Outer frame width: mark + horizontal pad + border columns. */
|
|
21
|
-
export const SPLASH_FRAME_WIDTH = splashMarkSize.width +
|
|
21
|
+
export const SPLASH_FRAME_WIDTH = splashMarkSize.width + LOGO_WIDTH + 3 + SPLASH_FRAME_PAD_X * 2 + 2;
|
|
22
22
|
/**
|
|
23
23
|
* Centered BORDER box with an ASCIIFont bakers mark — modal-like, not a wash.
|
|
24
24
|
* Font is OpenTUI block letters; the terminal typeface is unchanged.
|
|
@@ -58,11 +58,11 @@ export const splashTree = () => h(BoxRenderable, {
|
|
|
58
58
|
justifyContent: 'center',
|
|
59
59
|
alignItems: 'center',
|
|
60
60
|
}, h(BoxRenderable, {
|
|
61
|
-
id: 'splash-
|
|
62
|
-
width:
|
|
61
|
+
id: 'splash-logo',
|
|
62
|
+
width: LOGO_WIDTH,
|
|
63
63
|
flexShrink: 0,
|
|
64
64
|
flexDirection: 'column',
|
|
65
|
-
}, ...
|
|
65
|
+
}, ...logoTree()), h(ASCIIFontRenderable, {
|
|
66
66
|
id: 'splash-bakers',
|
|
67
67
|
text: SPLASH_TEXT,
|
|
68
68
|
font: SPLASH_FONT,
|
|
@@ -36,7 +36,6 @@ export async function runTicketTui(_document, _context, services, options = {})
|
|
|
36
36
|
const environment = {
|
|
37
37
|
services: {
|
|
38
38
|
...services,
|
|
39
|
-
...(options.agents ? { agents: options.agents } : {}),
|
|
40
39
|
...(options.writeClient ? { writeClient: options.writeClient } : {}),
|
|
41
40
|
...(options.conductorProcess
|
|
42
41
|
? { conductorProcess: options.conductorProcess }
|
|
@@ -61,9 +60,6 @@ export async function runTicketTui(_document, _context, services, options = {})
|
|
|
61
60
|
: {}),
|
|
62
61
|
...(options.currentUser ? { currentUser: options.currentUser } : {}),
|
|
63
62
|
isWorkspaceAdmin: options.isWorkspaceAdmin ?? false,
|
|
64
|
-
...(options.ownConductorMachineId
|
|
65
|
-
? { ownConductorMachineId: options.ownConductorMachineId }
|
|
66
|
-
: {}),
|
|
67
63
|
},
|
|
68
64
|
nowSeconds,
|
|
69
65
|
};
|
|
@@ -449,7 +445,7 @@ export async function runTicketTui(_document, _context, services, options = {})
|
|
|
449
445
|
return;
|
|
450
446
|
}
|
|
451
447
|
// `back()` false means there was nowhere to go back TO, and `fallback()`
|
|
452
|
-
// re-enters the current route — which is why Escape on the root
|
|
448
|
+
// re-enters the current route — which is why Escape on the root landing screen
|
|
453
449
|
// correctly does nothing visible. The trace records which of the two ran,
|
|
454
450
|
// because from the operator's chair they are indistinguishable.
|
|
455
451
|
const went = router.back();
|
|
@@ -16,11 +16,6 @@ export interface WorkspaceContextValue {
|
|
|
16
16
|
readonly name: string;
|
|
17
17
|
}
|
|
18
18
|
export declare const workspaceContext: ContextKey<WorkspaceContextValue>;
|
|
19
|
-
export interface TeamContextValue {
|
|
20
|
-
readonly id: string;
|
|
21
|
-
readonly name: string;
|
|
22
|
-
}
|
|
23
|
-
export declare const teamContext: ContextKey<TeamContextValue>;
|
|
24
19
|
export declare const projectContext: ContextKey<ProjectContextValue>;
|
|
25
20
|
export declare const ticketContext: ContextKey<{
|
|
26
21
|
readonly id: string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export const defineContext = (name, role) => ({ name, role });
|
|
2
2
|
export const workspaceContext = defineContext('workspace', 'scope');
|
|
3
|
-
export const teamContext = defineContext('team', 'scope');
|
|
4
3
|
export const projectContext = defineContext('project', 'scope');
|
|
5
4
|
export const ticketContext = defineContext('ticket', 'scope');
|
|
6
5
|
export const runContext = defineContext('run', 'scope');
|
|
@@ -46,11 +45,6 @@ export const contextsForParams = (params) => {
|
|
|
46
45
|
id: params.workspaceId,
|
|
47
46
|
name: params.workspaceName ?? params.workspaceId,
|
|
48
47
|
});
|
|
49
|
-
if (params.teamId)
|
|
50
|
-
contexts = contexts.set(teamContext, {
|
|
51
|
-
id: params.teamId,
|
|
52
|
-
name: params.teamName ?? params.teamId,
|
|
53
|
-
});
|
|
54
48
|
if (params.projectId)
|
|
55
49
|
contexts = contexts.set(projectContext, {
|
|
56
50
|
id: params.projectId,
|
|
@@ -4,8 +4,8 @@ import { orderTabs } from './tabs.js';
|
|
|
4
4
|
* The tab levels whose screens are SCOPED to an entity in the route params.
|
|
5
5
|
*
|
|
6
6
|
* Navigating within such a level, and escaping out of one, must carry those
|
|
7
|
-
* params: a project tab needs `projectId`, a user tab `userId
|
|
8
|
-
*
|
|
7
|
+
* params: a project tab needs `projectId`, a user tab `userId`. Dropping them
|
|
8
|
+
* opens the tab with no scope, which is a
|
|
9
9
|
* screen that cannot load. `root` is deliberately absent — it is the level that
|
|
10
10
|
* carries no entity, and it is the one that must drop stale params.
|
|
11
11
|
*
|
|
@@ -17,9 +17,7 @@ import { orderTabs } from './tabs.js';
|
|
|
17
17
|
*/
|
|
18
18
|
const SCOPED_TAB_LEVELS = [
|
|
19
19
|
'project',
|
|
20
|
-
'team',
|
|
21
20
|
'workspace-member',
|
|
22
|
-
'team-member',
|
|
23
21
|
'user',
|
|
24
22
|
'ticket',
|
|
25
23
|
'conductor',
|
|
@@ -127,8 +125,7 @@ export function defineRoutes(classes, defaultRouteId) {
|
|
|
127
125
|
routeId: destination.metadata.id,
|
|
128
126
|
// BB-377 D1: user-level tabs need userId the way project tabs
|
|
129
127
|
// need projectId — dropping params opens the tab with no scope.
|
|
130
|
-
//
|
|
131
|
-
// reason. Every SCOPED level is listed here; the root level is the
|
|
128
|
+
// Every SCOPED level is listed here; the root level is the
|
|
132
129
|
// one that carries no entity, so it is the one that drops params.
|
|
133
130
|
params: SCOPED_TAB_LEVELS.includes(scope) ? params : {},
|
|
134
131
|
}
|
|
@@ -10,19 +10,13 @@ import { EditRunFormScreen } from '../Entity/run/Screen/edit-run-form.js';
|
|
|
10
10
|
import { RunDetailScreen } from '../Entity/run/Screen/run-detail.js';
|
|
11
11
|
import { RunsScreen } from '../Entity/run/Screen/runs.js';
|
|
12
12
|
import { WorkspaceMemberRunsScreen } from '../Entity/run/Screen/user-runs.js';
|
|
13
|
-
import { TeamMemberRunsScreen, TeamMemberTicketsScreen, } from '../Entity/team/Screen/team-member-work.js';
|
|
14
|
-
import { TeamUsersScreen } from '../Entity/team/Screen/team-users.js';
|
|
15
|
-
import { TeamWorkScreen } from '../Entity/team/Screen/team-work.js';
|
|
16
|
-
import { TeamOverviewScreen, TeamStatsScreen, TeamsScreen, } from '../Entity/team/Screen/teams-screen.js';
|
|
17
13
|
import { ConductorTicketsScreen } from '../Entity/ticket/Screen/conductor-tickets.js';
|
|
18
|
-
import { CreateTicketFormScreen } from '../Entity/ticket/Screen/create-ticket-form.js';
|
|
19
14
|
import { EditAssignmentFormScreen } from '../Entity/ticket/Screen/edit-assignment-form.js';
|
|
20
15
|
import { MyWorkScreen } from '../Entity/ticket/Screen/my-work.js';
|
|
21
16
|
import { MyWorkParentFilterScreen } from '../Entity/ticket/Screen/my-work-parent-filter-form.js';
|
|
22
17
|
import { ParentFilterScreen } from '../Entity/ticket/Screen/parent-filter-form.js';
|
|
23
18
|
import { ProjectFilterScreen } from '../Entity/ticket/Screen/project-filter-form.js';
|
|
24
19
|
import { AddonActionFormScreen, TicketAddonsScreen, } from '../Entity/ticket/Screen/ticket-addons.js';
|
|
25
|
-
import { TicketAgentsScreen } from '../Entity/ticket/Screen/ticket-agents.js';
|
|
26
20
|
import { TicketCommentsScreen } from '../Entity/ticket/Screen/ticket-comments.js';
|
|
27
21
|
import { TicketDetailScreen } from '../Entity/ticket/Screen/ticket-detail.js';
|
|
28
22
|
import { TicketPlanningScreen } from '../Entity/ticket/Screen/ticket-planning.js';
|
|
@@ -30,11 +24,9 @@ import { TicketRunsScreen } from '../Entity/ticket/Screen/ticket-runs.js';
|
|
|
30
24
|
import { TicketsScreen } from '../Entity/ticket/Screen/tickets.js';
|
|
31
25
|
import { WorkspaceMemberTicketsScreen } from '../Entity/ticket/Screen/user-tickets.js';
|
|
32
26
|
import { WhoFilterScreen } from '../Entity/ticket/Screen/who-filter-form.js';
|
|
33
|
-
import {
|
|
27
|
+
import { WorkspaceMemberOverviewScreen } from '../Entity/user/Screen/member-overview.js';
|
|
34
28
|
import { UsersScreen } from '../Entity/user/Screen/users.js';
|
|
35
29
|
import { WorkspacePickerScreen } from '../Entity/workspace/Screen/workspace-picker.js';
|
|
36
|
-
import { MyStatsScreen, ProjectStatsScreen } from '../Statistics/dashboard.js';
|
|
37
|
-
import { TeamMemberStatsScreen, WorkspaceMemberStatsScreen, } from '../Statistics/member-stats.js';
|
|
38
30
|
import { defineRoutes } from './registry.js';
|
|
39
31
|
export const bootLocationFor = (route) => {
|
|
40
32
|
if (!route)
|
|
@@ -68,34 +60,20 @@ export const bootLocationFor = (route) => {
|
|
|
68
60
|
};
|
|
69
61
|
const BUILT_IN = [
|
|
70
62
|
MyWorkScreen,
|
|
71
|
-
MyStatsScreen,
|
|
72
63
|
ConductorsScreen,
|
|
73
64
|
ConductorOverviewScreen,
|
|
74
65
|
ConductorRunsScreen,
|
|
75
66
|
ConductorTicketsScreen,
|
|
76
67
|
ConductorLogScreen,
|
|
77
|
-
CreateTicketFormScreen,
|
|
78
68
|
EditAssignmentFormScreen,
|
|
79
69
|
ParentFilterScreen,
|
|
80
70
|
MyWorkParentFilterScreen,
|
|
81
71
|
ProjectFilterScreen,
|
|
82
72
|
ProjectsScreen,
|
|
83
73
|
ProjectOverviewScreen,
|
|
84
|
-
ProjectStatsScreen,
|
|
85
74
|
ProjectPickerScreen,
|
|
86
75
|
WorkspacePickerScreen,
|
|
87
|
-
// Team routes and their contextual member subtree are always available.
|
|
88
|
-
TeamsScreen,
|
|
89
|
-
TeamWorkScreen,
|
|
90
|
-
TeamOverviewScreen,
|
|
91
|
-
TeamStatsScreen,
|
|
92
|
-
TeamUsersScreen,
|
|
93
|
-
TeamMemberOverviewScreen,
|
|
94
|
-
TeamMemberStatsScreen,
|
|
95
|
-
TeamMemberTicketsScreen,
|
|
96
|
-
TeamMemberRunsScreen,
|
|
97
76
|
TicketsScreen,
|
|
98
|
-
TicketAgentsScreen,
|
|
99
77
|
WhoFilterScreen,
|
|
100
78
|
RunsScreen,
|
|
101
79
|
ProjectConductorsScreen,
|
|
@@ -114,7 +92,6 @@ export function buildRoutes(contributed = [], isWorkspaceAdmin = false) {
|
|
|
114
92
|
...BUILT_IN,
|
|
115
93
|
UsersScreen,
|
|
116
94
|
WorkspaceMemberOverviewScreen,
|
|
117
|
-
WorkspaceMemberStatsScreen,
|
|
118
95
|
WorkspaceMemberTicketsScreen,
|
|
119
96
|
WorkspaceMemberRunsScreen,
|
|
120
97
|
]
|
|
@@ -19,7 +19,7 @@ export declare abstract class AsyncModalScreen<T> extends AsyncScreen<T> {
|
|
|
19
19
|
protected notice(_context: ScreenContext): string | undefined;
|
|
20
20
|
/**
|
|
21
21
|
* Status rows inside the modal box. Default: one ladder from {@link actions},
|
|
22
|
-
* then {@link notice}. Override to split long ladders across rows
|
|
22
|
+
* then {@link notice}. Override to split long ladders across rows.
|
|
23
23
|
*/
|
|
24
24
|
protected modalStatusLines(context: ScreenContext): string[];
|
|
25
25
|
present(context: ScreenContext): ScreenPresentation;
|
|
@@ -24,7 +24,7 @@ export class AsyncModalScreen extends AsyncScreen {
|
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Status rows inside the modal box. Default: one ladder from {@link actions},
|
|
27
|
-
* then {@link notice}. Override to split long ladders across rows
|
|
27
|
+
* then {@link notice}. Override to split long ladders across rows.
|
|
28
28
|
*/
|
|
29
29
|
modalStatusLines(context) {
|
|
30
30
|
const ladder = formatActionLadder(this.actions(context));
|
|
@@ -29,7 +29,7 @@ export declare function padLabel(label: string, columns: number): string;
|
|
|
29
29
|
* The column the inline values of a declaration line up at.
|
|
30
30
|
*
|
|
31
31
|
* Derived from the fields that actually HAVE an inline value, never from all of
|
|
32
|
-
* them: the
|
|
32
|
+
* them: the edit popup declares `Description`, whose label is longer than any
|
|
33
33
|
* of its selects but which renders its value on rows of its own, so counting it
|
|
34
34
|
* would push every ring two columns right for nothing.
|
|
35
35
|
*/
|
|
@@ -45,7 +45,7 @@ export function padLabel(label, columns) {
|
|
|
45
45
|
* The column the inline values of a declaration line up at.
|
|
46
46
|
*
|
|
47
47
|
* Derived from the fields that actually HAVE an inline value, never from all of
|
|
48
|
-
* them: the
|
|
48
|
+
* them: the edit popup declares `Description`, whose label is longer than any
|
|
49
49
|
* of its selects but which renders its value on rows of its own, so counting it
|
|
50
50
|
* would push every ring two columns right for nothing.
|
|
51
51
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
//
|
|
3
3
|
// The review found the Parent field's candidates being fetched in
|
|
4
4
|
// `Entity/ticket/Data/parents.ts`, re-labelled by a second function in
|
|
5
|
-
//
|
|
5
|
+
// the create form's adapter (since removed), and debounced, cancelled, swapped and
|
|
6
6
|
// error-merged a THIRD time in `Kernel/tui-kernel.ts` — with two kernel state
|
|
7
7
|
// variables that existed only because the field could not reload itself. Beside
|
|
8
8
|
// it a shared adapter hand-aggregated four bags eagerly with `Promise.all`,
|
|
@@ -91,8 +91,8 @@ export function createOptionLoader(deps) {
|
|
|
91
91
|
return {
|
|
92
92
|
reload(fieldId, query) {
|
|
93
93
|
const source = deps.sources[fieldId];
|
|
94
|
-
// A field with no source declared is inert, not an error:
|
|
95
|
-
//
|
|
94
|
+
// A field with no source declared is inert, not an error: a field with
|
|
95
|
+
// nothing to search must stay typeable.
|
|
96
96
|
if (source === undefined || source.debounceMs === undefined)
|
|
97
97
|
return;
|
|
98
98
|
pending?.();
|
|
@@ -111,9 +111,8 @@ export interface FieldWidget {
|
|
|
111
111
|
*
|
|
112
112
|
* A kind with a block of its own can put a `⚠` note in it; a one-line
|
|
113
113
|
* `< value >` has nowhere to put one, so its failure is reported by the
|
|
114
|
-
* component as a form-level note instead
|
|
115
|
-
*
|
|
116
|
-
* Conductor and Workflow at the top — expressed as a property of the kind.
|
|
114
|
+
* component as a form-level note instead — Labels and Parent at the field,
|
|
115
|
+
* Assignee and Conductor at the top — expressed as a property of the kind.
|
|
117
116
|
*/
|
|
118
117
|
readonly ownsError: boolean;
|
|
119
118
|
/** Whether this kind renders a value INLINE after its label, and therefore
|
package/dist/src/index.d.ts
CHANGED
|
@@ -3,4 +3,3 @@ export default bakersUiPlugin;
|
|
|
3
3
|
export type { BbUiOptions } from './plugin.js';
|
|
4
4
|
export declare const ticketRendererPlugin: typeof bakersUiPlugin;
|
|
5
5
|
export { type BbUiLauncherOptions, type DropshBuildProgram, type DropshProgram, type HomeConnection, runBbUi, } from './launcher.js';
|
|
6
|
-
export type { HostedAgent, TuiAgentService } from './types.js';
|
package/dist/src/index.js
CHANGED
|
@@ -5,6 +5,5 @@ export default bakersUiPlugin;
|
|
|
5
5
|
// Back-compat alias for the former package's named export.
|
|
6
6
|
export const ticketRendererPlugin = bakersUiPlugin;
|
|
7
7
|
// BB-194 AC-4/AC-5: the home-rooted launcher (dropsh-tui invocation moved out
|
|
8
|
-
// of the conductor `bakers ui` command).
|
|
9
|
-
// dropsh-decoupled (buildProgram injected).
|
|
8
|
+
// of the conductor `bakers ui` command). dropsh-decoupled (buildProgram injected).
|
|
10
9
|
export { runBbUi, } from './launcher.js';
|
package/dist/src/launcher.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type BbUiOptions } from './plugin.js';
|
|
2
|
-
import type { DropshClient,
|
|
2
|
+
import type { DropshClient, UiInitialRoute, UiViewMode } from './types.js';
|
|
3
3
|
/** A dropsh program: only the `parseAsync` we drive is modelled. */
|
|
4
4
|
export interface DropshProgram {
|
|
5
5
|
parseAsync(argv: string[], opts: {
|
|
@@ -40,14 +40,14 @@ export interface HomeConnection {
|
|
|
40
40
|
export interface BbUiLauncherOptions {
|
|
41
41
|
/** Resolved home connection (base_url + auth + dropsh config path). */
|
|
42
42
|
connection: HomeConnection;
|
|
43
|
-
/** Repo/home root
|
|
43
|
+
/** Repo/home root `bakers ui` was started in. */
|
|
44
44
|
cwd: string;
|
|
45
45
|
/** Default project (opaque group) — `bakers ui --project`, when given. */
|
|
46
46
|
project?: string | undefined;
|
|
47
47
|
/**
|
|
48
48
|
* BB-232 (D9): the `.bakers` dir the entry is standing in. The renderer's
|
|
49
|
-
* `run()` resolves it against the control plane into the default `project
|
|
50
|
-
*
|
|
49
|
+
* `run()` resolves it against the control plane into the default `project`;
|
|
50
|
+
* the entry cannot, holding no JSON:API client.
|
|
51
51
|
* An explicit `project` above still wins.
|
|
52
52
|
*/
|
|
53
53
|
bakersDir?: string | undefined;
|
|
@@ -61,14 +61,8 @@ export interface BbUiLauncherOptions {
|
|
|
61
61
|
* new workspace selection. Injected from `ui/src/bun-runtime.ts`. */
|
|
62
62
|
restartProcess?: (() => void) | undefined;
|
|
63
63
|
selectWorkspace?: ((name: string) => Promise<void>) | undefined;
|
|
64
|
-
/**
|
|
65
|
-
agents?: TuiAgentService | undefined;
|
|
66
|
-
/** Preselected new-ticket assignee (this machine's user id). */
|
|
64
|
+
/** The connection's current user (uuid or name) — My work's "me". */
|
|
67
65
|
currentUser?: string | undefined;
|
|
68
|
-
/** This machine's conductor `machine_id` — preselected in the new-ticket form. */
|
|
69
|
-
ownConductorMachineId?: string | undefined;
|
|
70
|
-
/** Config override for the ticket-create agent's base prompt. */
|
|
71
|
-
createPrompt?: string | undefined;
|
|
72
66
|
/** Injected dropsh `buildProgram` (the entry passes dropsh's real one). */
|
|
73
67
|
buildProgram: DropshBuildProgram;
|
|
74
68
|
/** Injected renderer factory; defaults to this package's own plugin. The
|
|
@@ -95,9 +89,8 @@ export interface BbUiLauncherOptions {
|
|
|
95
89
|
}
|
|
96
90
|
export type { UiInitialRoute, UiViewMode };
|
|
97
91
|
/**
|
|
98
|
-
* Build + run the dropsh `--format tui` program with the TUI renderer
|
|
99
|
-
*
|
|
100
|
-
* `run()`; the renderer discards the seed document and boots its own projects
|
|
92
|
+
* Build + run the dropsh `--format tui` program with the TUI renderer. A
|
|
93
|
+
* trivial `search bb_project` seeds the renderer's `run()`; the renderer discards the seed document and boots its own projects
|
|
101
94
|
* screen from the `bb_conductor` records it reads through this connection.
|
|
102
95
|
*/
|
|
103
96
|
export declare function runBbUi(opts: BbUiLauncherOptions): Promise<void>;
|
package/dist/src/launcher.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import bakersUiPlugin from './plugin.js';
|
|
2
2
|
/**
|
|
3
|
-
* Build + run the dropsh `--format tui` program with the TUI renderer
|
|
4
|
-
*
|
|
5
|
-
* `run()`; the renderer discards the seed document and boots its own projects
|
|
3
|
+
* Build + run the dropsh `--format tui` program with the TUI renderer. A
|
|
4
|
+
* trivial `search bb_project` seeds the renderer's `run()`; the renderer discards the seed document and boots its own projects
|
|
6
5
|
* screen from the `bb_conductor` records it reads through this connection.
|
|
7
6
|
*/
|
|
8
7
|
export async function runBbUi(opts) {
|
|
@@ -33,16 +32,9 @@ export async function runBbUi(opts) {
|
|
|
33
32
|
...(opts.selectWorkspace !== undefined
|
|
34
33
|
? { selectWorkspace: opts.selectWorkspace }
|
|
35
34
|
: {}),
|
|
36
|
-
...(opts.agents ? { agents: opts.agents } : {}),
|
|
37
35
|
...(opts.currentUser !== undefined
|
|
38
36
|
? { currentUser: opts.currentUser }
|
|
39
37
|
: {}),
|
|
40
|
-
...(opts.ownConductorMachineId !== undefined
|
|
41
|
-
? { ownConductorMachineId: opts.ownConductorMachineId }
|
|
42
|
-
: {}),
|
|
43
|
-
...(opts.createPrompt !== undefined
|
|
44
|
-
? { createPrompt: opts.createPrompt }
|
|
45
|
-
: {}),
|
|
46
38
|
// Optional at every hop — omitting the key is the My work path.
|
|
47
39
|
...(opts.initialRoute !== undefined
|
|
48
40
|
? { initialRoute: opts.initialRoute }
|
package/dist/src/lib/cursor.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The list selection cursor: an index plus the four move keys (BB-294).
|
|
3
3
|
*
|
|
4
|
-
* Extracted from
|
|
5
|
-
* `run/Screen/runs.ts
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
4
|
+
* Extracted from verbatim copies in `ticket/Screen/tickets.ts`,
|
|
5
|
+
* `run/Screen/runs.ts` and `project/Screen/projects-screen.ts`. It is a plain
|
|
6
|
+
* composed object, not a base class or a mixin, because some of them are
|
|
7
|
+
* `AsyncScreen<Row[]>` and others `AsyncScreen<Page<Row>>`: no single base class
|
|
8
|
+
* spans them, and
|
|
9
9
|
* putting the index on `AsyncScreen` itself would hand a `selectedIndex` to every
|
|
10
10
|
* form, detail and dashboard screen that has no rows.
|
|
11
11
|
*
|
package/dist/src/lib/cursor.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The list selection cursor: an index plus the four move keys (BB-294).
|
|
3
3
|
*
|
|
4
|
-
* Extracted from
|
|
5
|
-
* `run/Screen/runs.ts
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
4
|
+
* Extracted from verbatim copies in `ticket/Screen/tickets.ts`,
|
|
5
|
+
* `run/Screen/runs.ts` and `project/Screen/projects-screen.ts`. It is a plain
|
|
6
|
+
* composed object, not a base class or a mixin, because some of them are
|
|
7
|
+
* `AsyncScreen<Row[]>` and others `AsyncScreen<Page<Row>>`: no single base class
|
|
8
|
+
* spans them, and
|
|
9
9
|
* putting the index on `AsyncScreen` itself would hand a `selectedIndex` to every
|
|
10
10
|
* form, detail and dashboard screen that has no rows.
|
|
11
11
|
*
|
|
@@ -3,7 +3,7 @@ import type { Debounce, WatchDirectory } from '../types.js';
|
|
|
3
3
|
* BB-376 — "the data behind this cockpit may be stale", as a file.
|
|
4
4
|
*
|
|
5
5
|
* The whole writer contract is `touch .bakers/ui-refresh`: one line, identical
|
|
6
|
-
* from a shell, an agent, a git hook, or inside
|
|
6
|
+
* from a shell, an agent, a git hook, or inside a project's web container — which
|
|
7
7
|
* is the reason it is a file and not a signal to a pid. A signal does not cross
|
|
8
8
|
* a container boundary, so a `drush` post-write hook could never reach a cockpit
|
|
9
9
|
* on the host, while a file on the bind mount reaches both. A pid file would
|
|
@@ -21,7 +21,7 @@ export interface RefreshSignal {
|
|
|
21
21
|
/** Stop watching and drop a pending reload. Called from the kernel's `finish()`. */
|
|
22
22
|
close(): void;
|
|
23
23
|
}
|
|
24
|
-
/** The signal file's basename inside the watched `.bakers` dir. */
|
|
24
|
+
/** The signal file's basename inside the watched `.bakers` dir; core owns it so the conductor's writer agrees. */
|
|
25
25
|
export declare const REFRESH_SIGNAL_FILE = "ui-refresh";
|
|
26
26
|
/**
|
|
27
27
|
* The coalescing window. Long enough that the several events one `touch`
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { statSync, watch } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import { UI_REFRESH_FILE } from '@bakers-build/core';
|
|
4
|
+
/** The signal file's basename inside the watched `.bakers` dir; core owns it so the conductor's writer agrees. */
|
|
5
|
+
export const REFRESH_SIGNAL_FILE = UI_REFRESH_FILE;
|
|
5
6
|
/**
|
|
6
7
|
* The coalescing window. Long enough that the several events one `touch`
|
|
7
8
|
* produces are one reload, short enough that an operator reads it as immediate.
|