@deskwork/studio 0.20.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/pages/dashboard/adjacent-section.d.ts +38 -0
  2. package/dist/pages/dashboard/adjacent-section.d.ts.map +1 -0
  3. package/dist/pages/dashboard/adjacent-section.js +61 -0
  4. package/dist/pages/dashboard/adjacent-section.js.map +1 -0
  5. package/dist/pages/dashboard/adjacent-section.ts +71 -0
  6. package/dist/pages/dashboard/data.d.ts +35 -4
  7. package/dist/pages/dashboard/data.d.ts.map +1 -1
  8. package/dist/pages/dashboard/data.js +69 -5
  9. package/dist/pages/dashboard/data.js.map +1 -1
  10. package/dist/pages/dashboard/data.ts +84 -5
  11. package/dist/pages/dashboard/section.d.ts.map +1 -1
  12. package/dist/pages/dashboard/section.js +7 -0
  13. package/dist/pages/dashboard/section.js.map +1 -1
  14. package/dist/pages/dashboard/section.ts +7 -0
  15. package/dist/pages/dashboard/shortform-section.d.ts +86 -0
  16. package/dist/pages/dashboard/shortform-section.d.ts.map +1 -0
  17. package/dist/pages/dashboard/shortform-section.js +189 -0
  18. package/dist/pages/dashboard/shortform-section.js.map +1 -0
  19. package/dist/pages/dashboard/shortform-section.ts +228 -0
  20. package/dist/pages/dashboard.d.ts.map +1 -1
  21. package/dist/pages/dashboard.js +34 -1
  22. package/dist/pages/dashboard.js.map +1 -1
  23. package/dist/pages/dashboard.ts +40 -1
  24. package/dist/pages/entry-review/index.d.ts.map +1 -1
  25. package/dist/pages/entry-review/index.js +24 -2
  26. package/dist/pages/entry-review/index.js.map +1 -1
  27. package/dist/pages/entry-review/mobile-sheet.d.ts +65 -0
  28. package/dist/pages/entry-review/mobile-sheet.d.ts.map +1 -0
  29. package/dist/pages/entry-review/mobile-sheet.js +170 -0
  30. package/dist/pages/entry-review/mobile-sheet.js.map +1 -0
  31. package/dist/pages/masthead-menu.d.ts +38 -0
  32. package/dist/pages/masthead-menu.d.ts.map +1 -0
  33. package/dist/pages/masthead-menu.js +126 -0
  34. package/dist/pages/masthead-menu.js.map +1 -0
  35. package/dist/pages/masthead-menu.ts +128 -0
  36. package/dist/pages/masthead.d.ts +85 -0
  37. package/dist/pages/masthead.d.ts.map +1 -0
  38. package/dist/pages/masthead.js +99 -0
  39. package/dist/pages/masthead.js.map +1 -0
  40. package/dist/pages/masthead.ts +155 -0
  41. package/dist/pages/mobile-bar.d.ts +72 -0
  42. package/dist/pages/mobile-bar.d.ts.map +1 -0
  43. package/dist/pages/mobile-bar.js +88 -0
  44. package/dist/pages/mobile-bar.js.map +1 -0
  45. package/dist/pages/mobile-bar.ts +129 -0
  46. package/dist/pages/shortform-review-mobile-sheet.d.ts +76 -0
  47. package/dist/pages/shortform-review-mobile-sheet.d.ts.map +1 -0
  48. package/dist/pages/shortform-review-mobile-sheet.js +159 -0
  49. package/dist/pages/shortform-review-mobile-sheet.js.map +1 -0
  50. package/dist/pages/shortform-review-mobile-sheet.ts +185 -0
  51. package/dist/pages/shortform-review.d.ts +18 -0
  52. package/dist/pages/shortform-review.d.ts.map +1 -1
  53. package/dist/pages/shortform-review.js +62 -111
  54. package/dist/pages/shortform-review.js.map +1 -1
  55. package/dist/pages/shortform-review.ts +68 -140
  56. package/dist/pages/shortform.d.ts.map +1 -1
  57. package/dist/pages/shortform.js +0 -1
  58. package/dist/pages/shortform.js.map +1 -1
  59. package/dist/pages/shortform.ts +0 -1
  60. package/dist/server.js +41 -1
  61. package/dist/server.js.map +1 -1
  62. package/package.json +2 -2
@@ -0,0 +1,189 @@
1
+ /**
2
+ * Shortform-by-platform section renderer (Step 2.2.9 — studio-mobile-first).
3
+ *
4
+ * Per DESIGN-STANDARDS.md § Desk information architecture, the Desk's
5
+ * second section absorbs the legacy `/dev/editorial-review-shortform`
6
+ * page as four platform tiles (LinkedIn / Reddit / YouTube / Instagram),
7
+ * each collapsible to reveal that platform's open workflows. Tiles share
8
+ * the longform-pipeline tile shape (data-stage-tile + aria-expanded +
9
+ * data-stage-section attrs) so the existing `dashboard/stage-tiles.ts`
10
+ * client controller can drive both. `data-stage-section-group="shortform"`
11
+ * partitions single-expand state so longform and shortform open
12
+ * independently.
13
+ *
14
+ * Per DESKWORK-STATE-MACHINE.md Commandment III, rows do NOT render
15
+ * `.er-stamp` / `er-stamp-<state>` chrome. The pre-v7 shortform page
16
+ * rendered review-state stamps inline; this section does not.
17
+ *
18
+ * Per THESIS Consequence 2, rows are navigation-only. The trailing `⋮`
19
+ * placeholder anchor links to `/dev/editorial-review/<workflow.id>`;
20
+ * Step 2.2.10 lands the v0.20-style row popover with stage-aware verbs
21
+ * once the shortform verb-routing pieces (issues G.1-G.6) land. This
22
+ * commit does NOT smuggle verb-routing in early. Tracked in
23
+ * https://github.com/audiocontrol-org/deskwork/issues/263.
24
+ *
25
+ * TRANSITIONAL SHAPE: this row's `er-row-shell` markup is a strict
26
+ * subset of the longform row shell defined in
27
+ * `dashboard/section.ts:renderRow`. Longform shells carry three
28
+ * children (`er-row-drawer`, `er-row-fg`, `er-row-menu`); this shell
29
+ * carries only the `er-row-fg`. Step 2.2.10's popover wire-up is
30
+ * purely additive on the existing shape — it inserts the missing
31
+ * `er-row-menu` (and possibly `er-row-drawer` if a swipe gesture is
32
+ * scoped in). Keep the two row paths' attribute conventions aligned
33
+ * (data-row-shell, data-platform, data-site, data-slug already match)
34
+ * so the unification stays straightforward.
35
+ */
36
+ import { html, unsafe } from "../html.js";
37
+ import { DASHBOARD_PLATFORM_ORDER } from "./data.js";
38
+ const PLATFORM_CHROME = {
39
+ linkedin: { badge: 'in', name: 'LinkedIn', variant: 'linkedin' },
40
+ reddit: { badge: 'r/', name: 'Reddit', variant: 'reddit' },
41
+ youtube: { badge: '@', name: 'YouTube', variant: 'youtube' },
42
+ instagram: { badge: 'IG', name: 'Instagram', variant: 'instagram' },
43
+ };
44
+ /**
45
+ * Render the shortform section head — `<div class="er-desk-section-head
46
+ * er-desk-section-head--shortform">` matching the mockup's
47
+ * `.desk-section-head.shortform` shape. Glyph + label + caption count.
48
+ */
49
+ export function renderShortformSectionHead(totalCount) {
50
+ return unsafe(html `
51
+ <div class="er-desk-section-head er-desk-section-head--shortform">
52
+ <span class="er-desk-section-head-glyph" aria-hidden="true">⊟</span>
53
+ <span class="er-desk-section-head-label">Shortform · by platform</span>
54
+ <span class="er-desk-section-head-count">· ${totalCount} ${totalCount === 1 ? 'workflow' : 'workflows'}</span>
55
+ </div>`);
56
+ }
57
+ /**
58
+ * Render one platform tile. Shares its tile shape + a11y attrs with the
59
+ * longform stage tile so the stage-tiles.ts client controller drives
60
+ * both. Empty platforms get `disabled` + `.is-empty` so the operator
61
+ * sees the platform exists but cannot drill into nothing.
62
+ */
63
+ export function renderShortformPlatformTile(platform, count) {
64
+ const chrome = PLATFORM_CHROME[platform];
65
+ const isEmpty = count === 0;
66
+ const classes = isEmpty
67
+ ? 'er-stage-tile er-stage-tile--shortform is-empty'
68
+ : 'er-stage-tile er-stage-tile--shortform';
69
+ const disabledAttr = isEmpty ? ' disabled' : '';
70
+ const sectionId = `shortform-${platform}`;
71
+ return unsafe(html `
72
+ <button class="${classes}" type="button"
73
+ data-stage-tile="${sectionId}"
74
+ data-stage-section-group="shortform"
75
+ aria-expanded="false"
76
+ aria-controls="${sectionId}"${unsafe(disabledAttr)}>
77
+ <span class="er-platform-badge er-platform-badge--${chrome.variant}" aria-hidden="true">${chrome.badge}</span>
78
+ <span class="er-stage-tile-name">${chrome.name}</span>
79
+ <span class="er-stage-tile-count"><span class="num">${count}</span></span>
80
+ <span class="er-stage-tile-chev" aria-hidden="true">›</span>
81
+ </button>`);
82
+ }
83
+ function fmtRelTime(iso, now) {
84
+ const t = new Date(iso).getTime();
85
+ const s = Math.max(0, Math.floor((now.getTime() - t) / 1000));
86
+ if (s < 60)
87
+ return `${s}s ago`;
88
+ const m = Math.floor(s / 60);
89
+ if (m < 60)
90
+ return `${m}m ago`;
91
+ const h = Math.floor(m / 60);
92
+ if (h < 48)
93
+ return `${h}h ago`;
94
+ return `${Math.floor(h / 24)}d ago`;
95
+ }
96
+ /**
97
+ * Render a single shortform workflow row. Mirrors the v0.20 row-affordance
98
+ * shape: shell + foreground (slug + title + channel) + meta column (ts +
99
+ * version) + trailing `⋮`. The `⋮` is a navigation placeholder anchor —
100
+ * Step 2.2.10 wires the stage-aware row popover.
101
+ */
102
+ export function renderShortformRow(workflow, now) {
103
+ // workflow.id is typed as `string` on DraftWorkflowItem; UUIDs are the
104
+ // current shape but the type system doesn't enforce that. Encode the
105
+ // path segment so a future non-UUID id (e.g. one containing `?`, `#`,
106
+ // space) doesn't silently produce a broken link.
107
+ const reviewLink = `/dev/editorial-review/${encodeURIComponent(workflow.id)}`;
108
+ const search = [workflow.slug, workflow.channel ?? '', workflow.platform ?? '']
109
+ .join(' ')
110
+ .toLowerCase();
111
+ const channelMarkup = workflow.channel
112
+ ? unsafe(html `<span class="er-row-shell-channel">${workflow.channel}</span>`)
113
+ : unsafe('');
114
+ // The workflow `slug` is the post slug; we surface it as the row's
115
+ // primary handle (consistent with longform rows). The workflow `id` is
116
+ // the navigation key (uuid in the review-pipeline store).
117
+ return unsafe(html `
118
+ <div class="er-row-shell er-row-shell--shortform"
119
+ data-row-shell data-search="${search}"
120
+ data-workflow-id="${workflow.id}"
121
+ data-platform="${workflow.platform ?? ''}"
122
+ data-site="${workflow.site}"
123
+ data-slug="${workflow.slug}">
124
+ <div class="er-row-fg er-shortform-row-fg">
125
+ <div class="er-shortform-row-body">
126
+ <span class="er-row-shell-slug"><a href="${reviewLink}"
127
+ title="open the review surface">${workflow.slug}</a></span>
128
+ ${channelMarkup}
129
+ </div>
130
+ <div class="er-shortform-row-meta">
131
+ <span class="er-shortform-row-ts">${fmtRelTime(workflow.updatedAt, now)}</span>
132
+ <span class="er-shortform-row-version">v${workflow.currentVersion}</span>
133
+ </div>
134
+ <a class="er-row-shell-link" href="${reviewLink}"
135
+ aria-label="Open shortform review for ${workflow.slug}"
136
+ title="open the review surface">⋮</a>
137
+ </div>
138
+ </div>`);
139
+ }
140
+ /**
141
+ * Render the platform's row group — the `<div class="er-row-group">`
142
+ * container holding all rows for that platform. The container carries
143
+ * the `data-stage-section` attr the stage-tiles.ts controller targets
144
+ * to apply `data-collapsed`.
145
+ */
146
+ function renderPlatformRowGroup(platform, workflows, now) {
147
+ const sectionId = `shortform-${platform}`;
148
+ if (workflows.length === 0) {
149
+ // Empty platform — still emit the row-group container so the
150
+ // controller's `[data-stage-section="<id>"]` selector resolves. The
151
+ // tile is `disabled` so it cannot expand anyway; the empty container
152
+ // is structurally inert.
153
+ return unsafe(html `
154
+ <div class="er-row-group" id="${sectionId}" data-stage-section="${sectionId}"></div>`);
155
+ }
156
+ const rows = workflows.map((w) => renderShortformRow(w, now).__raw).join('');
157
+ return unsafe(html `
158
+ <div class="er-row-group" id="${sectionId}" data-stage-section="${sectionId}">
159
+ ${unsafe(rows)}
160
+ </div>`);
161
+ }
162
+ /**
163
+ * Compose the full shortform section: head + 4 platform tiles + per-
164
+ * platform row groups, in `DASHBOARD_PLATFORM_ORDER` order. All 4
165
+ * platforms render even when zero — empty tiles communicate platform
166
+ * existence (per § Empty-state rendering, "the absence of items is
167
+ * information about the pipeline shape").
168
+ *
169
+ * API shape note: this helper iterates platforms internally (single
170
+ * call → whole section), whereas the longform `renderStageSection` is
171
+ * called per-stage by `dashboard.ts` (caller iterates). The asymmetry
172
+ * is intentional: longform stages share a uniform shape across all
173
+ * eight stages, so the caller-iterates pattern keeps the loop visible
174
+ * in `dashboard.ts`. Shortform's four platforms share a section head
175
+ * and ordered iteration constraint that lives more cleanly inside the
176
+ * composer. If a future surface needs both shapes via a common
177
+ * abstraction, the unification belongs there, not here.
178
+ */
179
+ export function renderShortformSection(data, now) {
180
+ const sectionHead = renderShortformSectionHead(data.totalCount);
181
+ const tilesAndGroups = DASHBOARD_PLATFORM_ORDER.map((platform) => {
182
+ const workflows = data.shortformByPlatform.get(platform) ?? [];
183
+ const tile = renderShortformPlatformTile(platform, workflows.length);
184
+ const group = renderPlatformRowGroup(platform, workflows, now);
185
+ return `${tile.__raw}${group.__raw}`;
186
+ }).join('');
187
+ return unsafe(html `${sectionHead}${unsafe(tilesAndGroups)}`);
188
+ }
189
+ //# sourceMappingURL=shortform-section.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shortform-section.js","sourceRoot":"","sources":["../../../src/pages/dashboard/shortform-section.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,EAAgB,MAAM,YAAY,CAAC;AAGxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAYrD,MAAM,eAAe,GAAqC;IACxD,QAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE;IAChE,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE;IAC1D,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE;IAC5D,SAAS,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE;CACpE,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CAAC,UAAkB;IAC3D,OAAO,MAAM,CAAC,IAAI,CAAA;;;;mDAI+B,UAAU,IAAI,UAAU,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW;WACjG,CAAC,CAAC;AACb,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,2BAA2B,CACzC,QAAkB,EAClB,KAAa;IAEb,MAAM,MAAM,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;IACzC,MAAM,OAAO,GAAG,KAAK,KAAK,C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AI,CAAA;sCACgB,SAAS,yBAAyB,SAAS,UAAU,CAAC,CAAC;IAC3F,CAAC;IACD,MAAM,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC7E,OAAO,MAAM,CAAC,IAAI,CAAA;oCACgB,SAAS,yBAAyB,SAAS;QACvE,MAAM,CAAC,IAAI,CAAC;WACT,CAAC,CAAC;AACb,CAAC;AAYD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,sBAAsB,CACpC,IAA0B,EAC1B,GAAS;IAET,MAAM,WAAW,GAAG,0BAA0B,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAChE,MAAM,cAAc,GAAG,wBAAwB,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE;QAC/D,MAAM,SAAS,GAAG,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QAC/D,MAAM,IAAI,GAAG,2BAA2B,CAAC,QAAQ,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;QACrE,MAAM,KAAK,GAAG,sBAAsB,CAAC,QAAQ,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;QAC/D,OAAO,GAAG,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC;IACvC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACZ,OAAO,MAAM,CAAC,IAAI,CAAA,GAAG,WAAW,GAAG,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;AAC/D,CAAC"}
@@ -0,0 +1,228 @@
1
+ /**
2
+ * Shortform-by-platform section renderer (Step 2.2.9 — studio-mobile-first).
3
+ *
4
+ * Per DESIGN-STANDARDS.md § Desk information architecture, the Desk's
5
+ * second section absorbs the legacy `/dev/editorial-review-shortform`
6
+ * page as four platform tiles (LinkedIn / Reddit / YouTube / Instagram),
7
+ * each collapsible to reveal that platform's open workflows. Tiles share
8
+ * the longform-pipeline tile shape (data-stage-tile + aria-expanded +
9
+ * data-stage-section attrs) so the existing `dashboard/stage-tiles.ts`
10
+ * client controller can drive both. `data-stage-section-group="shortform"`
11
+ * partitions single-expand state so longform and shortform open
12
+ * independently.
13
+ *
14
+ * Per DESKWORK-STATE-MACHINE.md Commandment III, rows do NOT render
15
+ * `.er-stamp` / `er-stamp-<state>` chrome. The pre-v7 shortform page
16
+ * rendered review-state stamps inline; this section does not.
17
+ *
18
+ * Per THESIS Consequence 2, rows are navigation-only. The trailing `⋮`
19
+ * placeholder anchor links to `/dev/editorial-review/<workflow.id>`;
20
+ * Step 2.2.10 lands the v0.20-style row popover with stage-aware verbs
21
+ * once the shortform verb-routing pieces (issues G.1-G.6) land. This
22
+ * commit does NOT smuggle verb-routing in early. Tracked in
23
+ * https://github.com/audiocontrol-org/deskwork/issues/263.
24
+ *
25
+ * TRANSITIONAL SHAPE: this row's `er-row-shell` markup is a strict
26
+ * subset of the longform row shell defined in
27
+ * `dashboard/section.ts:renderRow`. Longform shells carry three
28
+ * children (`er-row-drawer`, `er-row-fg`, `er-row-menu`); this shell
29
+ * carries only the `er-row-fg`. Step 2.2.10's popover wire-up is
30
+ * purely additive on the existing shape — it inserts the missing
31
+ * `er-row-menu` (and possibly `er-row-drawer` if a swipe gesture is
32
+ * scoped in). Keep the two row paths' attribute conventions aligned
33
+ * (data-row-shell, data-platform, data-site, data-slug already match)
34
+ * so the unification stays straightforward.
35
+ */
36
+
37
+ import { html, unsafe, type RawHtml } from '../html.ts';
38
+ import type { DraftWorkflowItem } from '@deskwork/core/review/types';
39
+ import type { Platform } from '@deskwork/core/types';
40
+ import { DASHBOARD_PLATFORM_ORDER } from './data.ts';
41
+
42
+ /** Per-platform display metadata. Mirrors desk-states-v7.html:632-655. */
43
+ interface PlatformChrome {
44
+ /** Two-character badge inside the tile (replaces the longform stage glyph). */
45
+ readonly badge: string;
46
+ /** Display name on the tile. */
47
+ readonly name: string;
48
+ /** CSS variant suffix for `.er-platform-badge--<variant>`. */
49
+ readonly variant: string;
50
+ }
51
+
52
+ const PLATFORM_CHROME: Record<Platform, PlatformChrome> = {
53
+ linkedin: { badge: 'in', name: 'LinkedIn', variant: 'linkedin' },
54
+ reddit: { badge: 'r/', name: 'Reddit', variant: 'reddit' },
55
+ youtube: { badge: '@', name: 'YouTube', variant: 'youtube' },
56
+ instagram: { badge: 'IG', name: 'Instagram', variant: 'instagram' },
57
+ };
58
+
59
+ /**
60
+ * Render the shortform section head — `<div class="er-desk-section-head
61
+ * er-desk-section-head--shortform">` matching the mockup's
62
+ * `.desk-section-head.shortform` shape. Glyph + label + caption count.
63
+ */
64
+ export function renderShortformSectionHead(totalCount: number): RawHtml {
65
+ return unsafe(html`
66
+ <div class="er-desk-section-head er-desk-section-head--shortform">
67
+ <span class="er-desk-section-head-glyph" aria-hidden="true">⊟</span>
68
+ <span class="er-desk-section-head-label">Shortform · by platform</span>
69
+ <span class="er-desk-section-head-count">· ${totalCount} ${totalCount === 1 ? 'workflow' : 'workflows'}</span>
70
+ </div>`);
71
+ }
72
+
73
+ /**
74
+ * Render one platform tile. Shares its tile shape + a11y attrs with the
75
+ * longform stage tile so the stage-tiles.ts client controller drives
76
+ * both. Empty platforms get `disabled` + `.is-empty` so the operator
77
+ * sees the platform exists but cannot drill into nothing.
78
+ */
79
+ export function renderShortformPlatformTile(
80
+ platform: Platform,
81
+ count: number,
82
+ ): RawHtml {
83
+ const chrome = PLATFORM_CHROME[platform];
84
+ const isEmpty = count === 0;
85
+ const classes = isEmpty
86
+ ? 'er-stage-tile er-stage-tile--shortform is-empty'
87
+ : 'er-stage-tile er-stage-tile--shortform';
88
+ const disabledAttr = isEmpty ? ' disabled' : '';
89
+ const sectionId = `shortform-${platform}`;
90
+ return unsafe(html`
91
+ <button class="${classes}" type="button"
92
+ data-stage-tile="${sectionId}"
93
+ data-stage-section-group="shortform"
94
+ aria-expanded="false"
95
+ aria-controls="${sectionId}"${unsafe(disabledAttr)}>
96
+ <span class="er-platform-badge er-platform-badge--${chrome.variant}" aria-hidden="true">${chrome.badge}</span>
97
+ <span class="er-stage-tile-name">${chrome.name}</span>
98
+ <span class="er-stage-tile-count"><span class="num">${count}</span></span>
99
+ <span class="er-stage-tile-chev" aria-hidden="true">›</span>
100
+ </button>`);
101
+ }
102
+
103
+ function fmtRelTime(iso: string, now: Date): string {
104
+ const t = new Date(iso).getTime();
105
+ const s = Math.max(0, Math.floor((now.getTime() - t) / 1000));
106
+ if (s < 60) return `${s}s ago`;
107
+ const m = Math.floor(s / 60);
108
+ if (m < 60) return `${m}m ago`;
109
+ const h = Math.floor(m / 60);
110
+ if (h < 48) return `${h}h ago`;
111
+ return `${Math.floor(h / 24)}d ago`;
112
+ }
113
+
114
+ /**
115
+ * Render a single shortform workflow row. Mirrors the v0.20 row-affordance
116
+ * shape: shell + foreground (slug + title + channel) + meta column (ts +
117
+ * version) + trailing `⋮`. The `⋮` is a navigation placeholder anchor —
118
+ * Step 2.2.10 wires the stage-aware row popover.
119
+ */
120
+ export function renderShortformRow(
121
+ workflow: DraftWorkflowItem,
122
+ now: Date,
123
+ ): RawHtml {
124
+ // workflow.id is typed as `string` on DraftWorkflowItem; UUIDs are the
125
+ // current shape but the type system doesn't enforce that. Encode the
126
+ // path segment so a future non-UUID id (e.g. one containing `?`, `#`,
127
+ // space) doesn't silently produce a broken link.
128
+ const reviewLink = `/dev/editorial-review/${encodeURIComponent(workflow.id)}`;
129
+ const search = [workflow.slug, workflow.channel ?? '', workflow.platform ?? '']
130
+ .join(' ')
131
+ .toLowerCase();
132
+ const channelMarkup: RawHtml = workflow.channel
133
+ ? unsafe(html`<span class="er-row-shell-channel">${workflow.channel}</span>`)
134
+ : unsafe('');
135
+ // The workflow `slug` is the post slug; we surface it as the row's
136
+ // primary handle (consistent with longform rows). The workflow `id` is
137
+ // the navigation key (uuid in the review-pipeline store).
138
+ return unsafe(html`
139
+ <div class="er-row-shell er-row-shell--shortform"
140
+ data-row-shell data-search="${search}"
141
+ data-workflow-id="${workflow.id}"
142
+ data-platform="${workflow.platform ?? ''}"
143
+ data-site="${workflow.site}"
144
+ data-slug="${workflow.slug}">
145
+ <div class="er-row-fg er-shortform-row-fg">
146
+ <div class="er-shortform-row-body">
147
+ <span class="er-row-shell-slug"><a href="${reviewLink}"
148
+ title="open the review surface">${workflow.slug}</a></span>
149
+ ${channelMarkup}
150
+ </div>
151
+ <div class="er-shortform-row-meta">
152
+ <span class="er-shortform-row-ts">${fmtRelTime(workflow.updatedAt, now)}</span>
153
+ <span class="er-shortform-row-version">v${workflow.currentVersion}</span>
154
+ </div>
155
+ <a class="er-row-shell-link" href="${reviewLink}"
156
+ aria-label="Open shortform review for ${workflow.slug}"
157
+ title="open the review surface">⋮</a>
158
+ </div>
159
+ </div>`);
160
+ }
161
+
162
+ /**
163
+ * Render the platform's row group — the `<div class="er-row-group">`
164
+ * container holding all rows for that platform. The container carries
165
+ * the `data-stage-section` attr the stage-tiles.ts controller targets
166
+ * to apply `data-collapsed`.
167
+ */
168
+ function renderPlatformRowGroup(
169
+ platform: Platform,
170
+ workflows: readonly DraftWorkflowItem[],
171
+ now: Date,
172
+ ): RawHtml {
173
+ const sectionId = `shortform-${platform}`;
174
+ if (workflows.length === 0) {
175
+ // Empty platform — still emit the row-group container so the
176
+ // controller's `[data-stage-section="<id>"]` selector resolves. The
177
+ // tile is `disabled` so it cannot expand anyway; the empty container
178
+ // is structurally inert.
179
+ return unsafe(html`
180
+ <div class="er-row-group" id="${sectionId}" data-stage-section="${sectionId}"></div>`);
181
+ }
182
+ const rows = workflows.map((w) => renderShortformRow(w, now).__raw).join('');
183
+ return unsafe(html`
184
+ <div class="er-row-group" id="${sectionId}" data-stage-section="${sectionId}">
185
+ ${unsafe(rows)}
186
+ </div>`);
187
+ }
188
+
189
+ /**
190
+ * Section data shape — the renderer reads counts + workflows per platform
191
+ * from the dashboard's loadDashboardData() output. Caller passes the
192
+ * ordered Map directly (insertion order = display order).
193
+ */
194
+ export interface ShortformSectionData {
195
+ readonly shortformByPlatform: ReadonlyMap<Platform, readonly DraftWorkflowItem[]>;
196
+ readonly totalCount: number;
197
+ }
198
+
199
+ /**
200
+ * Compose the full shortform section: head + 4 platform tiles + per-
201
+ * platform row groups, in `DASHBOARD_PLATFORM_ORDER` order. All 4
202
+ * platforms render even when zero — empty tiles communicate platform
203
+ * existence (per § Empty-state rendering, "the absence of items is
204
+ * information about the pipeline shape").
205
+ *
206
+ * API shape note: this helper iterates platforms internally (single
207
+ * call → whole section), whereas the longform `renderStageSection` is
208
+ * called per-stage by `dashboard.ts` (caller iterates). The asymmetry
209
+ * is intentional: longform stages share a uniform shape across all
210
+ * eight stages, so the caller-iterates pattern keeps the loop visible
211
+ * in `dashboard.ts`. Shortform's four platforms share a section head
212
+ * and ordered iteration constraint that lives more cleanly inside the
213
+ * composer. If a future surface needs both shapes via a common
214
+ * abstraction, the unification belongs there, not here.
215
+ */
216
+ export function renderShortformSection(
217
+ data: ShortformSectionData,
218
+ now: Date,
219
+ ): RawHtml {
220
+ const sectionHead = renderShortformSectionHead(data.totalCount);
221
+ const tilesAndGroups = DASHBOARD_PLATFORM_ORDER.map((platform) => {
222
+ const workflows = data.shortformByPlatform.get(platform) ?? [];
223
+ const tile = renderShortformPlatformTile(platform, workflows.length);
224
+ const group = renderPlatformRowGroup(platform, workflows, now);
225
+ return `${tile.__raw}${group.__raw}`;
226
+ }).join('');
227
+ return unsafe(html`${sectionHead}${unsafe(tilesAndGroups)}`);
228
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../src/pages/dashboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAUtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEjE;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,YAAY,CAAC;AAElE;;;GAGG;AACH,wBAAsB,eAAe,CACnC,GAAG,EAAE,aAAa,EAClB,QAAQ,CAAC,EAAE,oBAAoB,GAC9B,OAAO,CAAC,MAAM,CAAC,CA2CjB"}
1
+ {"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../src/pages/dashboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AActD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEjE;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,YAAY,CAAC;AAElE;;;GAGG;AACH,wBAAsB,eAAe,CACnC,GAAG,EAAE,aAAa,EAClB,QAAQ,CAAC,EAAE,oBAAoB,GAC9B,OAAO,CAAC,MAAM,CAAC,CA8EjB"}
@@ -33,9 +33,13 @@
33
33
  import { html, unsafe } from "./html.js";
34
34
  import { layout } from "./layout.js";
35
35
  import { renderEditorialFolio } from "./chrome.js";
36
+ import { renderMasthead } from "./masthead.js";
37
+ import { renderMastheadMenu } from "./masthead-menu.js";
36
38
  import { loadDashboardData, DASHBOARD_STAGE_ORDER } from "./dashboard/data.js";
37
39
  import { renderStageSection, renderDistributionPlaceholder, } from "./dashboard/section.js";
38
40
  import { renderHeader, renderFilterStrip } from "./dashboard/header.js";
41
+ import { renderShortformSection } from "./dashboard/shortform-section.js";
42
+ import { renderAdjacentSection } from "./dashboard/adjacent-section.js";
39
43
  /**
40
44
  * Render the studio dashboard. Async because sidecar reads hit disk;
41
45
  * the route handler in server.ts awaits the result before sending it.
@@ -43,25 +47,52 @@ import { renderHeader, renderFilterStrip } from "./dashboard/header.js";
43
47
  export async function renderDashboard(ctx, getIndex) {
44
48
  // Touch the parameter so the unused-param check stays satisfied.
45
49
  void getIndex;
46
- const data = await loadDashboardData(ctx.projectRoot);
50
+ const data = await loadDashboardData(ctx.projectRoot, ctx.config);
47
51
  const now = ctx.now ? ctx.now() : new Date();
48
52
  const defaultSite = ctx.config.defaultSite;
49
53
  const stageSections = DASHBOARD_STAGE_ORDER.map((stage) => {
50
54
  const bucket = data.byStage.get(stage) ?? [];
51
55
  return renderStageSection(stage, bucket, defaultSite).__raw;
52
56
  }).join('\n');
57
+ // v7 architecture (Step 2.2.9 — studio-mobile-first): the Desk absorbs
58
+ // the Shortform-by-platform view as its second section, plus reserved
59
+ // Adjacent-tools placeholders for Phase 3+ Folio + Files surfaces. Per
60
+ // the v7 mockup at desk-states-v7.html:563, the masthead meta reads
61
+ // "${longformCount} longform · ${shortformCount} shortform" when any
62
+ // shortform workflows exist; otherwise it falls back to longform-only
63
+ // to avoid a misleading "0 shortform" claim.
64
+ const longformCount = data.entries.length;
65
+ const shortformCount = data.shortformWorkflows.length;
66
+ const mastheadMeta = shortformCount > 0
67
+ ? `${longformCount} longform · ${shortformCount} shortform`
68
+ : `${longformCount} longform`;
69
+ const masthead = renderMasthead({
70
+ kicker: "The compositor's desk",
71
+ title: 'Pipeline + Press.',
72
+ metaInline: mastheadMeta,
73
+ isHub: true,
74
+ });
53
75
  // The press queue (right-rail on desktop) was removed in v0.19
54
76
  // per DESKWORK-STATE-MACHINE.md Commandment III — its primary
55
77
  // purpose was surfacing review-state, which is RETIRED. The
56
78
  // archive entry at docs/studio-design/ACCEPTED/2026-05-09-press-queue-removed/
57
79
  // captures the rationale.
80
+ const shortformSection = renderShortformSection({
81
+ shortformByPlatform: data.shortformByPlatform,
82
+ totalCount: shortformCount,
83
+ }, now);
84
+ const adjacentSection = renderAdjacentSection();
58
85
  const body = html `
86
+ ${masthead}
87
+ ${renderMastheadMenu()}
59
88
  ${renderEditorialFolio('dashboard', 'press-check')}
60
89
  ${renderHeader(data, ctx.projectRoot, now)}
61
90
  <main class="er-container">
62
91
  ${renderFilterStrip()}
63
92
  ${unsafe(stageSections)}
64
93
  ${renderDistributionPlaceholder()}
94
+ ${shortformSection}
95
+ ${adjacentSection}
65
96
  </main>
66
97
  ${renderComposeChrome()}
67
98
  <div class="er-toast" data-toast hidden></div>
@@ -73,7 +104,9 @@ export async function renderDashboard(ctx, getIndex) {
73
104
  '/static/css/editorial-nav.css',
74
105
  '/static/css/editorial-studio.css',
75
106
  '/static/css/dashboard-mobile.css',
107
+ '/static/css/dashboard-desk-sections.css',
76
108
  '/static/css/dashboard-row-affordances.css',
109
+ '/static/css/mobile-shell.css',
77
110
  ],
78
111
  bodyAttrs: 'data-review-ui="studio"',
79
112
  bodyHtml: body,
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../src/pages/dashboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,OAAO,EAAE,IAAI,EAAE,MAAM,EAAgB,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EACL,kBAAkB,EAClB,6BAA6B,GAC9B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAWxE;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,GAAkB,EAClB,QAA+B;IAE/B,iEAAiE;IACjE,KAAK,QAAQ,CAAC;IAEd,MAAM,IAAI,GAAG,MAAM,iBAAiB,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IACtD,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,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mBAAmB,EAAE;;oEAE2C,CAAC;IAEnE,OAAO,MAAM,CAAC;QACZ,KAAK,EAAE,mBAAmB;QAC1B,QAAQ,EAAE;YACR,kCAAkC;YAClC,+BAA+B;YAC/B,kCAAkC;YAClC,kCAAkC;YAClC,yCAAyC;YACzC,2CAA2C;YAC3C,8BAA8B;SAC/B;QACD,SAAS,EAAE,yBAAyB;QACpC,QAAQ,EAAE,IAAI;QACd,aAAa,EAAE,CAAC,yBAAyB,CAAC;KAC3C,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,SAAS,mBAAmB;IAC1B,OAAO,MAAM,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAsDP,CAAC,CAAC;AACf,CAAC"}
@@ -35,12 +35,16 @@ import type { StudioContext } from '../routes/api.ts';
35
35
  import { html, unsafe, type RawHtml } from './html.ts';
36
36
  import { layout } from './layout.ts';
37
37
  import { renderEditorialFolio } from './chrome.ts';
38
+ import { renderMasthead } from './masthead.ts';
39
+ import { renderMastheadMenu } from './masthead-menu.ts';
38
40
  import { loadDashboardData, DASHBOARD_STAGE_ORDER } from './dashboard/data.ts';
39
41
  import {
40
42
  renderStageSection,
41
43
  renderDistributionPlaceholder,
42
44
  } from './dashboard/section.ts';
43
45
  import { renderHeader, renderFilterStrip } from './dashboard/header.ts';
46
+ import { renderShortformSection } from './dashboard/shortform-section.ts';
47
+ import { renderAdjacentSection } from './dashboard/adjacent-section.ts';
44
48
  import type { ContentIndex } from '@deskwork/core/content-index';
45
49
 
46
50
  /**
@@ -62,7 +66,7 @@ export async function renderDashboard(
62
66
  // Touch the parameter so the unused-param check stays satisfied.
63
67
  void getIndex;
64
68
 
65
- const data = await loadDashboardData(ctx.projectRoot);
69
+ const data = await loadDashboardData(ctx.projectRoot, ctx.config);
66
70
  const now = ctx.now ? ctx.now() : new Date();
67
71
 
68
72
  const defaultSite = ctx.config.defaultSite;
@@ -71,18 +75,51 @@ export async function renderDashboard(
71
75
  return renderStageSection(stage, bucket, defaultSite).__raw;
72
76
  }).join('\n');
73
77
 
78
+ // v7 architecture (Step 2.2.9 — studio-mobile-first): the Desk absorbs
79
+ // the Shortform-by-platform view as its second section, plus reserved
80
+ // Adjacent-tools placeholders for Phase 3+ Folio + Files surfaces. Per
81
+ // the v7 mockup at desk-states-v7.html:563, the masthead meta reads
82
+ // "${longformCount} longform · ${shortformCount} shortform" when any
83
+ // shortform workflows exist; otherwise it falls back to longform-only
84
+ // to avoid a misleading "0 shortform" claim.
85
+ const longformCount = data.entries.length;
86
+ const shortformCount = data.shortformWorkflows.length;
87
+ const mastheadMeta =
88
+ shortformCount > 0
89
+ ? `${longformCount} longform · ${shortformCount} shortform`
90
+ : `${longformCount} longform`;
91
+ const masthead = renderMasthead({
92
+ kicker: "The compositor's desk",
93
+ title: 'Pipeline + Press.',
94
+ metaInline: mastheadMeta,
95
+ isHub: true,
96
+ });
97
+
74
98
  // The press queue (right-rail on desktop) was removed in v0.19
75
99
  // per DESKWORK-STATE-MACHINE.md Commandment III — its primary
76
100
  // purpose was surfacing review-state, which is RETIRED. The
77
101
  // archive entry at docs/studio-design/ACCEPTED/2026-05-09-press-queue-removed/
78
102
  // captures the rationale.
103
+ const shortformSection = renderShortformSection(
104
+ {
105
+ shortformByPlatform: data.shortformByPlatform,
106
+ totalCount: shortformCount,
107
+ },
108
+ now,
109
+ );
110
+ const adjacentSection = renderAdjacentSection();
111
+
79
112
  const body = html`
113
+ ${masthead}
114
+ ${renderMastheadMenu()}
80
115
  ${renderEditorialFolio('dashboard', 'press-check')}
81
116
  ${renderHeader(data, ctx.projectRoot, now)}
82
117
  <main class="er-container">
83
118
  ${renderFilterStrip()}
84
119
  ${unsafe(stageSections)}
85
120
  ${renderDistributionPlaceholder()}
121
+ ${shortformSection}
122
+ ${adjacentSection}
86
123
  </main>
87
124
  ${renderComposeChrome()}
88
125
  <div class="er-toast" data-toast hidden></div>
@@ -95,7 +132,9 @@ export async function renderDashboard(
95
132
  '/static/css/editorial-nav.css',
96
133
  '/static/css/editorial-studio.css',
97
134
  '/static/css/dashboard-mobile.css',
135
+ '/static/css/dashboard-desk-sections.css',
98
136
  '/static/css/dashboard-row-affordances.css',
137
+ '/static/css/mobile-shell.css',
99
138
  ],
100
139
  bodyAttrs: 'data-review-ui="studio"',
101
140
  bodyHtml: body,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pages/entry-review/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AASH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAMjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAgBzD,MAAM,MAAM,sBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,YAAY,CAAC;AAEpE,MAAM,WAAW,gBAAgB;IAC/B;oDACgD;IAChD,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC;;;mDAG+C;IAC/C,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,GAAG,GAAG,GAAG,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd;AA2GD;;;;GAIG;AACH,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,aAAa,EAClB,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,gBAAqB,EAC5B,QAAQ,CAAC,EAAE,sBAAsB,GAChC,OAAO,CAAC,iBAAiB,CAAC,CA8H5B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pages/entry-review/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AASH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;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