@quolu/lattice 0.20.1 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/bounded-seam.mjs +86 -0
- package/src/cli-help.mjs +2 -0
- package/src/isolation-runner.mjs +45 -12
- package/src/seam-apply.mjs +0 -0
- package/src/seam-derivation.mjs +188 -0
- package/src/seam-rewrite.mjs +182 -0
- package/src/seam-verification.mjs +201 -0
- package/src/todo-cli.mjs +99 -1
- package/src/todo-gantt-html-independence.mjs +157 -0
- package/src/todo-gantt-html-shared.mjs +196 -0
- package/src/todo-gantt-html-style.mjs +107 -0
- package/src/todo-gantt-html.mjs +3 -459
package/src/todo-gantt-html.mjs
CHANGED
|
@@ -2,18 +2,14 @@ import { createHash } from 'node:crypto';
|
|
|
2
2
|
|
|
3
3
|
import { serializeJsonForScript } from './todo-markdown-renderer.mjs';
|
|
4
4
|
import { renderTodoGanttSvg, TODO_GANTT_STATUS_PRESENTATION } from './todo-gantt-svg.mjs';
|
|
5
|
+
import { renderDiagramLegend, renderRightPane } from './todo-gantt-html-independence.mjs';
|
|
6
|
+
import { escapeHtmlAttribute, escapeHtmlText, refKey } from './todo-gantt-html-shared.mjs';
|
|
7
|
+
import { CSS } from './todo-gantt-html-style.mjs';
|
|
5
8
|
|
|
6
9
|
export const TODO_GANTT_RENDERER_VERSION = 'lattice.todo_gantt_renderer.v17';
|
|
7
10
|
export const TODO_GANTT_PROSE_MAX_BYTES = 8 * 1024 * 1024;
|
|
8
11
|
export const TODO_GANTT_HTML_MAX_BYTES = 24 * 1024 * 1024;
|
|
9
12
|
|
|
10
|
-
const DOCUMENT_STATUS = TODO_GANTT_STATUS_PRESENTATION;
|
|
11
|
-
|
|
12
|
-
function statusMarkup(status, suffix = '') {
|
|
13
|
-
const value = DOCUMENT_STATUS[status] ?? { mark: '?', label: '状態不明' };
|
|
14
|
-
return `<span class="status-symbol status-${escapeHtmlAttribute(status)}" role="img" aria-label="${escapeHtmlAttribute(value.label)}">${escapeHtmlText(value.mark)}</span>${suffix}`;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
13
|
function projectDisplayName(readModel, metadata) {
|
|
18
14
|
for (const candidate of [metadata?.project_display_name, metadata?.project_name]) {
|
|
19
15
|
if (typeof candidate === 'string' && candidate.trim() !== '') return candidate.trim();
|
|
@@ -30,23 +26,6 @@ export class TodoGanttRenderError extends Error {
|
|
|
30
26
|
}
|
|
31
27
|
}
|
|
32
28
|
|
|
33
|
-
function escapeHtmlAttribute(value) {
|
|
34
|
-
return String(value).replaceAll('&', '&').replaceAll('<', '<').replaceAll('>', '>')
|
|
35
|
-
.replaceAll('"', '"').replaceAll("'", ''').replace(/[\u0000-\u001f\u007f]/gu, '');
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function escapeHtmlText(value) {
|
|
39
|
-
return String(value).replaceAll('&', '&').replaceAll('<', '<').replaceAll('>', '>');
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function refKey(ref) {
|
|
43
|
-
return JSON.stringify([ref.project_id, ref.plan_key, ref.task_id]);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function compareText(left, right) {
|
|
47
|
-
return left < right ? -1 : left > right ? 1 : 0;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
29
|
function digest(value) {
|
|
51
30
|
return createHash('sha256').update(value, 'utf8').digest('hex');
|
|
52
31
|
}
|
|
@@ -96,441 +75,6 @@ function normalizeSections(readModel, narratives, anchorOutcomes) {
|
|
|
96
75
|
return { sections: result, proseBytes };
|
|
97
76
|
}
|
|
98
77
|
|
|
99
|
-
/** Keys of the ToDos the diagram does not draw, empty when nothing was folded. */
|
|
100
|
-
function foldIndex(layout) {
|
|
101
|
-
return new Set((layout?.folded ?? []).map((ref) => refKey(ref)));
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function renderTaskIndexEntry(section, lookup) {
|
|
105
|
-
const key = refKey(section.ref);
|
|
106
|
-
const status = DOCUMENT_STATUS[section.state.status] ?? { mark: '?', label: '状態不明' };
|
|
107
|
-
const blockedReason = section.state.status === 'blocked'
|
|
108
|
-
? `<span class="task-index-blocked-reason">— ${escapeHtmlText(section.state.blocked_reason ?? '理由未記録')}</span>` : '';
|
|
109
|
-
// A ToDo the diagram does not draw keeps its row here — the index is the
|
|
110
|
-
// complete list — and it selects its own detail, which exists either way.
|
|
111
|
-
const selectKey = key;
|
|
112
|
-
return `<li><button type="button" data-select-node-key="${escapeHtmlAttribute(selectKey)}"><span class="task-index-status status-${escapeHtmlAttribute(section.state.status)}" role="img" aria-label="${escapeHtmlAttribute(status.label)}">${escapeHtmlText(status.mark)}</span><span class="task-index-reference">${escapeHtmlText(taskReference(section, lookup))}</span><strong>${escapeHtmlText(section.task.title)}</strong>${blockedReason}</button></li>`;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/** plan_key -> 最終活動時刻。journalの末尾eventが、そのplanが最後に動いた時点。 */
|
|
116
|
-
function planActivity(readModel) {
|
|
117
|
-
return new Map((readModel?.members ?? []).map((member) => {
|
|
118
|
-
const events = member.journal?.events ?? [];
|
|
119
|
-
const last = events.at(-1)?.recorded_at ?? events[0]?.recorded_at ?? '';
|
|
120
|
-
return [member.plan.plan_key, last];
|
|
121
|
-
}));
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
function renderTaskIndex(sections, lookup, folds = new Set(), activity = new Map()) {
|
|
125
|
-
const byPlan = new Map();
|
|
126
|
-
for (const section of sections) {
|
|
127
|
-
if (!byPlan.has(section.ref.plan_key)) byPlan.set(section.ref.plan_key, []);
|
|
128
|
-
byPlan.get(section.ref.plan_key).push(section);
|
|
129
|
-
}
|
|
130
|
-
// 全ToDoが図から外れたplanは終わった仕事。読む側が先に見たいのは動いているplanなので、
|
|
131
|
-
// 動いているものを最終活動の新しい順で上へ、終わったものを古い順で下へまとめる。
|
|
132
|
-
// plan内のToDo順は登録順のまま触らない。
|
|
133
|
-
const plans = [...byPlan.entries()].map(([planKey, tasks]) => ({
|
|
134
|
-
planKey,
|
|
135
|
-
tasks,
|
|
136
|
-
settled: tasks.every((section) => folds.has(refKey(section.ref))),
|
|
137
|
-
lastActivity: activity.get(planKey) ?? '',
|
|
138
|
-
}));
|
|
139
|
-
plans.sort((left, right) => {
|
|
140
|
-
if (left.settled !== right.settled) return left.settled ? 1 : -1;
|
|
141
|
-
const order = left.settled
|
|
142
|
-
? compareText(left.lastActivity, right.lastActivity)
|
|
143
|
-
: compareText(right.lastActivity, left.lastActivity);
|
|
144
|
-
return order !== 0 ? order : compareText(left.planKey, right.planKey);
|
|
145
|
-
});
|
|
146
|
-
return plans.map((plan) => {
|
|
147
|
-
const drawn = plan.tasks.filter((section) => !folds.has(refKey(section.ref)));
|
|
148
|
-
const folded = plan.tasks.filter((section) => folds.has(refKey(section.ref)));
|
|
149
|
-
const drawnList = drawn.length === 0 ? ''
|
|
150
|
-
: `<ol class="task-index-list">${drawn.map((section) => renderTaskIndexEntry(section, lookup)).join('')}</ol>`;
|
|
151
|
-
const foldedList = folded.length === 0 ? ''
|
|
152
|
-
: `<details class="task-index-folded"><summary>完走済みとして畳んだ工程 ${folded.length}件</summary><ol class="task-index-list">${folded.map((section) => renderTaskIndexEntry(section, lookup)).join('')}</ol></details>`;
|
|
153
|
-
return `<section class="task-index-plan"><h2><code>${escapeHtmlText(plan.planKey)}</code></h2>${drawnList}${foldedList}</section>`;
|
|
154
|
-
}).join('');
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
function presentationLookup(presentation) {
|
|
158
|
-
return {
|
|
159
|
-
lanes: new Map((presentation?.lanes ?? []).map((lane) => [JSON.stringify([lane.plan_key, lane.lane]), lane])),
|
|
160
|
-
taskNumbers: new Map((presentation?.task_numbers ?? []).map((entry) => [refKey(entry), entry])),
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
function taskReference(section, lookup) {
|
|
165
|
-
const number = lookup.taskNumbers.get(refKey(section.ref));
|
|
166
|
-
return number === undefined ? `ID ${section.task.task_id}` : `工程 ${number.display_number}`;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
function renderRelationList(relations, sectionByKey, lookup, emptyText, folds = new Set()) {
|
|
170
|
-
if (relations.length === 0) return `<p class="relation-empty">${escapeHtmlText(emptyText)}</p>`;
|
|
171
|
-
return `<ul class="relation-list">${relations.map((relation) => {
|
|
172
|
-
const targetKey = refKey(relation.ref);
|
|
173
|
-
const target = sectionByKey.get(targetKey);
|
|
174
|
-
if (target === undefined) return '';
|
|
175
|
-
const join = relation.joinIds.length === 0 ? ''
|
|
176
|
-
: `<span class="relation-kind">合流条件: ${escapeHtmlText(relation.joinIds.join(', '))}</span>`;
|
|
177
|
-
// Say which ones the diagram does not draw, so the reader stops looking.
|
|
178
|
-
const reference = folds.has(targetKey)
|
|
179
|
-
? `${taskReference(target, lookup)}(図では非表示)` : taskReference(target, lookup);
|
|
180
|
-
return `<li><button type="button" data-select-node-key="${escapeHtmlAttribute(targetKey)}"><strong>${escapeHtmlText(reference)}</strong><span>${escapeHtmlText(target.task.title)}</span></button>${join}</li>`;
|
|
181
|
-
}).join('')}</ul>`;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/** Phase states that are over: nothing is dispatched or judged under them again. */
|
|
185
|
-
const SETTLED_PHASE_STATUS = Object.freeze(['accepted', 'rejected']);
|
|
186
|
-
|
|
187
|
-
function renderPhaseProgress(readModel) {
|
|
188
|
-
const rows = [];
|
|
189
|
-
const settledRows = [];
|
|
190
|
-
for (const member of readModel.members) {
|
|
191
|
-
if (!['lattice.todo_plan.v4', 'lattice.todo_plan.v5'].includes(member.plan.schema)) continue;
|
|
192
|
-
const phases = new Map(member.snapshot.phases.map((phase) => [phase.phase_id, phase]));
|
|
193
|
-
for (const phase of member.plan.phases) {
|
|
194
|
-
const tasks = member.plan.tasks.filter((task) => task.phase_id === phase.phase_id);
|
|
195
|
-
const states = new Map(member.tasks.map((task) => [task.task_id, task.status]));
|
|
196
|
-
const done = tasks.filter((task) => states.get(task.task_id) === 'done').length;
|
|
197
|
-
const state = phases.get(phase.phase_id);
|
|
198
|
-
const row = `<li class="phase-progress status-${escapeHtmlAttribute(state.status)}"><header><strong>${escapeHtmlText(phase.title ?? phase.phase_id)}</strong><span>${escapeHtmlText(state.status)}</span></header><p><code>${escapeHtmlText(`${member.plan.plan_key}/${phase.phase_id}`)}</code> — policy <code>${escapeHtmlText(phase.gate_policy)}</code> — ToDo ${done}/${tasks.length}</p><progress max="${tasks.length}" value="${done}">${done}/${tasks.length}</progress></li>`;
|
|
199
|
-
// A settled Phase is history. It stays reachable, but it does not push the
|
|
200
|
-
// live ones off the first screen.
|
|
201
|
-
(SETTLED_PHASE_STATUS.includes(state.status) ? settledRows : rows).push(row);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
const decoupled = readModel.members.some(({ plan }) => plan.schema === 'lattice.todo_plan.v5');
|
|
205
|
-
const guidance = decoupled
|
|
206
|
-
? 'ToDo完了とPhase受理は別です。Phaseは重監査の順序を表し、通常ToDoの開始順はToDo依存だけで決まります。'
|
|
207
|
-
: 'ToDo完了とPhase受理は別です。<code>gate_ready</code>では後続Phaseはまだ解放されません。';
|
|
208
|
-
if (rows.length === 0 && settledRows.length === 0) return '';
|
|
209
|
-
const liveList = rows.length === 0
|
|
210
|
-
? '<p class="readiness-note">進行中のPhaseはありません。</p>'
|
|
211
|
-
: `<ol>${rows.join('')}</ol>`;
|
|
212
|
-
const settledList = settledRows.length === 0 ? ''
|
|
213
|
-
: `<details class="phase-settled"><summary>決着済みPhase ${settledRows.length}件</summary><ol>${settledRows.join('')}</ol></details>`;
|
|
214
|
-
return `<section class="phase-overview"><h2>Phase進捗</h2><p>${guidance}</p>${liveList}${settledList}</section>`;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* 図の外が語るための独立性要約を、plan単位の投影から引ける形へ畳む(ADR 0129 Decision 3)。
|
|
219
|
-
*/
|
|
220
|
-
function summarizeIndependence(layout) {
|
|
221
|
-
if (layout.independence === null) return null;
|
|
222
|
-
const byPlan = new Map(layout.independence.plans.map((plan) => [plan.plan_key, plan]));
|
|
223
|
-
return {
|
|
224
|
-
plans: layout.independence.plans,
|
|
225
|
-
byPlan,
|
|
226
|
-
verifiedTaskCount: layout.independence.plans
|
|
227
|
-
.reduce((total, plan) => total + plan.verified_task_count, 0),
|
|
228
|
-
unknownTaskCount: layout.independence.plans
|
|
229
|
-
.reduce((total, plan) => total + plan.unknown_task_ids.length, 0),
|
|
230
|
-
serializePairCount: layout.independence.plans
|
|
231
|
-
.reduce((total, plan) => total + plan.serialize_pairs.length, 0),
|
|
232
|
-
};
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
/** 記録が無いときだけADR 0063の既定をそのまま述べる。 */
|
|
236
|
-
function dispatchBasis(summary) {
|
|
237
|
-
if (summary === null) {
|
|
238
|
-
return 'ready frontier全件が既定です。一部だけを直列着手する場合は理由が必要です。';
|
|
239
|
-
}
|
|
240
|
-
const parts = [`検証済み並列 ${summary.verifiedTaskCount}工程`];
|
|
241
|
-
if (summary.serializePairCount > 0) parts.push(`要直列 ${summary.serializePairCount}組`);
|
|
242
|
-
if (summary.unknownTaskCount > 0) parts.push(`未検査 ${summary.unknownTaskCount}工程`);
|
|
243
|
-
return `${parts.join('、')}。未検査は依存線が無くても並列可の根拠になりません。`;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
const SEVERABILITY_LABEL = Object.freeze({
|
|
247
|
-
code_seam: 'コードの分割で並列化しうる',
|
|
248
|
-
serial: '共有状態のため直列必須',
|
|
249
|
-
});
|
|
250
|
-
|
|
251
|
-
/** 個別ToDoについて、競合相手と切断可能性を言葉で示す。 */
|
|
252
|
-
function renderIndependenceNote(ref, node, summary) {
|
|
253
|
-
if (summary === null || node === undefined) return '';
|
|
254
|
-
const plan = summary.byPlan.get(ref.plan_key);
|
|
255
|
-
if (plan === undefined) return '';
|
|
256
|
-
const taskId = ref.task_id;
|
|
257
|
-
const state = node.visibility.independence;
|
|
258
|
-
if (state === null) return '';
|
|
259
|
-
if (state === 'verified') {
|
|
260
|
-
return '<p class="readiness-note"><strong>並列可否:</strong> 独立検証済です。記録時点の宣言境界では他のready工程と干渉しません。</p>';
|
|
261
|
-
}
|
|
262
|
-
if (state === 'unknown') {
|
|
263
|
-
return '<p class="readiness-note"><strong>並列可否:</strong> 未検査です。競合が無いのではなく、まだ判定していません。</p>';
|
|
264
|
-
}
|
|
265
|
-
const pairs = [
|
|
266
|
-
...plan.serialize_pairs
|
|
267
|
-
.filter((pair) => pair.task_ids.includes(taskId))
|
|
268
|
-
.map((pair) => ({
|
|
269
|
-
other: pair.task_ids.find((id) => id !== taskId),
|
|
270
|
-
severability: pair.severability,
|
|
271
|
-
detail: pair.detail,
|
|
272
|
-
})),
|
|
273
|
-
...plan.conflicts_with_active
|
|
274
|
-
.filter((entry) => entry.ready_task_id === taskId)
|
|
275
|
-
.map((entry) => ({
|
|
276
|
-
other: `${entry.active_task_id}(作業中)`,
|
|
277
|
-
severability: entry.severability,
|
|
278
|
-
detail: entry.detail,
|
|
279
|
-
})),
|
|
280
|
-
];
|
|
281
|
-
const items = pairs.map((pair) => `<li>${escapeHtmlText(pair.other)} — ${escapeHtmlText(SEVERABILITY_LABEL[pair.severability] ?? pair.severability)}(資源 ${escapeHtmlText(pair.detail)})</li>`).join('');
|
|
282
|
-
return `<p class="readiness-note"><strong>並列可否:</strong> 要直列です。</p><ul class="independence-conflicts">${items}</ul>`;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
function renderSeamComponent(component) {
|
|
286
|
-
const conflicts = component.conflicts.map((conflict) => {
|
|
287
|
-
const pairs = conflict.task_pairs
|
|
288
|
-
.map(([left, right]) => `<span class="seam-task-pair"><code>${escapeHtmlText(left)}</code><span aria-hidden="true"> ↔ </span><code>${escapeHtmlText(right)}</code></span>`)
|
|
289
|
-
.join('');
|
|
290
|
-
return `<li class="seam-conflict"><strong class="seam-target">${escapeHtmlText(conflict.target)}</strong><span class="seam-conflict-kind"><code>${escapeHtmlText(conflict.kind)}</code></span><span class="seam-pairs">${pairs}</span></li>`;
|
|
291
|
-
}).join('');
|
|
292
|
-
const unknowns = component.unknowns.length === 0 ? '' : `<section class="seam-evidence-needed"><h4>次に必要な証拠</h4><ul>${component.unknowns.map((unknown) => {
|
|
293
|
-
const reference = component.task_ids.includes(unknown.ref)
|
|
294
|
-
? `ToDo <code>${escapeHtmlText(unknown.ref)}</code>`
|
|
295
|
-
: `ref <code>${escapeHtmlText(unknown.ref)}</code>`;
|
|
296
|
-
return `<li><code>${escapeHtmlText(unknown.kind)}</code><span>${reference}</span></li>`;
|
|
297
|
-
}).join('')}</ul></section>`;
|
|
298
|
-
const reasons = component.reasons.length === 0 ? '' : `<section class="seam-reasons"><h4>判定理由</h4><ul>${component.reasons.map((reason) => `<li><code>${escapeHtmlText(reason.code)}</code><span>${escapeHtmlText(reason.detail)}</span></li>`).join('')}</ul></section>`;
|
|
299
|
-
const proposed = component.proposed_surfaces.length === 0 ? '' : `<section class="seam-surfaces"><h4>提案する所有境界</h4><ul>${component.proposed_surfaces.map((surface) => `<li><strong>${escapeHtmlText(surface.target)}</strong><span><code>${escapeHtmlText(surface.kind)}</code> / <code>${escapeHtmlText(surface.role)}</code> / owner ${surface.owner_task_ids.map((taskId) => `<code>${escapeHtmlText(taskId)}</code>`).join(', ') || '—'}</span></li>`).join('')}</ul></section>`;
|
|
300
|
-
const affectedTests = component.affected_tests.length === 0 ? ''
|
|
301
|
-
: `<p class="seam-tests"><strong>影響test:</strong> ${component.affected_tests.map((testRef) => `<code>${escapeHtmlText(testRef)}</code>`).join(', ')}</p>`;
|
|
302
|
-
return `<article class="seam-component verdict-${escapeHtmlAttribute(component.verdict)}"><header><span>Seam判定</span><code>${escapeHtmlText(component.verdict)}</code></header><ul class="seam-conflicts">${conflicts}</ul>${unknowns}${reasons}${proposed}${affectedTests}</article>`;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
function renderSeamPlan(plan, { compact = false } = {}) {
|
|
306
|
-
const components = plan.components.map(renderSeamComponent).join('');
|
|
307
|
-
const count = plan.component_count === null ? '—' : String(plan.component_count);
|
|
308
|
-
const nextAction = plan.guidance.next_action === 'none' ? ''
|
|
309
|
-
: `<p class="seam-next-action"><strong>次の一歩:</strong> <code>${escapeHtmlText(plan.guidance.next_action)}</code></p>`;
|
|
310
|
-
return `<section class="seam-plan${compact ? ' seam-plan-compact' : ''}" data-seam-plan="${escapeHtmlAttribute(plan.plan_key)}"><header><code>${escapeHtmlText(plan.plan_key)}</code><span class="seam-coverage coverage-${escapeHtmlAttribute(plan.coverage)}">${escapeHtmlText(plan.guidance.code)}</span><span class="seam-component-count">component ${escapeHtmlText(count)}件</span></header><p class="seam-guidance">${escapeHtmlText(plan.guidance.message)}</p>${nextAction}${components}</section>`;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
/**
|
|
314
|
-
* componentがあるplanを先に展開し、0件planはcoverageごとに畳む。
|
|
315
|
-
* 実データのunknownと係争資源を、未生成planの列より先に視認できるようにする。
|
|
316
|
-
*/
|
|
317
|
-
function renderSeamProposalOverview(layout) {
|
|
318
|
-
const plans = layout.seam_proposals?.plans;
|
|
319
|
-
if (!Array.isArray(plans)) return '';
|
|
320
|
-
const withComponents = plans.filter((plan) => plan.components.length > 0);
|
|
321
|
-
const emptyByGuidance = new Map();
|
|
322
|
-
for (const plan of plans.filter((entry) => entry.components.length === 0)) {
|
|
323
|
-
if (!emptyByGuidance.has(plan.guidance.code)) emptyByGuidance.set(plan.guidance.code, []);
|
|
324
|
-
emptyByGuidance.get(plan.guidance.code).push(plan);
|
|
325
|
-
}
|
|
326
|
-
const decisions = withComponents.map((plan) => renderSeamPlan(plan)).join('');
|
|
327
|
-
const emptyGroups = [...emptyByGuidance.entries()].sort(([left], [right]) => compareText(left, right))
|
|
328
|
-
.map(([code, grouped]) => `<details class="seam-empty-group"><summary><code>${escapeHtmlText(code)}</code><span>${grouped.length} plan</span></summary>${grouped.map((plan) => renderSeamPlan(plan, { compact: true })).join('')}</details>`)
|
|
329
|
-
.join('');
|
|
330
|
-
return `<section class="seam-overview"><h2>Seam提案</h2>${decisions}${emptyGroups}</section>`;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
function renderRightPane(sections, layout, presentation, readModel) {
|
|
334
|
-
const lookup = presentationLookup(presentation);
|
|
335
|
-
const sectionByKey = new Map(sections.map((section) => [refKey(section.ref), section]));
|
|
336
|
-
const nodeByKey = new Map(layout.nodes.map((node) => [refKey(node.ref), node]));
|
|
337
|
-
const folds = foldIndex(layout);
|
|
338
|
-
const incoming = new Map(sections.map((section) => [refKey(section.ref), []]));
|
|
339
|
-
const outgoing = new Map(sections.map((section) => [refKey(section.ref), []]));
|
|
340
|
-
const addRelation = (relations, ownerKey, ref, joinIds) => {
|
|
341
|
-
const entries = relations.get(ownerKey);
|
|
342
|
-
if (entries === undefined) return;
|
|
343
|
-
let entry = entries.find((candidate) => refKey(candidate.ref) === refKey(ref));
|
|
344
|
-
if (entry === undefined) {
|
|
345
|
-
entry = { ref, joinIds: [] };
|
|
346
|
-
entries.push(entry);
|
|
347
|
-
}
|
|
348
|
-
entry.joinIds = [...new Set([...entry.joinIds, ...joinIds])].sort();
|
|
349
|
-
};
|
|
350
|
-
// Premises and successors come from the FULL graph. `layout.edges` is the
|
|
351
|
-
// drawn graph, where a fold unit's interior dependencies have been contracted
|
|
352
|
-
// away — reading those here would tell a folded ToDo it has no premises.
|
|
353
|
-
for (const edge of layout.full_edges ?? layout.edges) {
|
|
354
|
-
addRelation(incoming, refKey(edge.to), edge.from, edge.join_ids);
|
|
355
|
-
addRelation(outgoing, refKey(edge.from), edge.to, edge.join_ids);
|
|
356
|
-
}
|
|
357
|
-
const counts = { pending: 0, 'in-progress': 0, blocked: 0, done: 0 };
|
|
358
|
-
for (const section of sections) counts[section.state.status] += 1;
|
|
359
|
-
const active = sections.filter((section) => section.state.status === 'in-progress');
|
|
360
|
-
const ready = layout.nodes.filter((node) => node.visibility.next_ready);
|
|
361
|
-
const independenceSummary = summarizeIndependence(layout);
|
|
362
|
-
const readyHeadline = ready.length > 1
|
|
363
|
-
? `<p class="readiness-note"><strong>同時dispatch推奨:</strong> ${ready.length}工程。${escapeHtmlText(dispatchBasis(independenceSummary))}</p>`
|
|
364
|
-
: ready.length === 1
|
|
365
|
-
? '<p class="readiness-note"><strong>着手候補:</strong> 1工程です。</p>'
|
|
366
|
-
: '<p class="readiness-note">現在のready frontierは空です。</p>';
|
|
367
|
-
// ready件数によらず、記録があるなら内訳を述べる。1件の時だけ黙ると、
|
|
368
|
-
// その1件が未検査でも「候補が1つある」としか伝わらない。
|
|
369
|
-
const independenceNote = independenceSummary === null || ready.length > 1 ? ''
|
|
370
|
-
: `<p class="readiness-note"><strong>並列可否:</strong> ${escapeHtmlText(dispatchBasis(independenceSummary))}</p>`;
|
|
371
|
-
const dispatchSummary = `${readyHeadline}${independenceNote}`;
|
|
372
|
-
const activeLinks = active.length === 0 ? '<p>作業中の工程はありません。</p>'
|
|
373
|
-
: `<ul class="active-list">${active.map((section) => `<li><button type="button" data-select-node-key="${escapeHtmlAttribute(refKey(section.ref))}">${escapeHtmlText(taskReference(section, lookup))} — ${escapeHtmlText(section.task.title)}</button></li>`).join('')}</ul>`;
|
|
374
|
-
const overview = `<section class="right-overview" data-right-panel="overview"><h1>工程を選択してください</h1><p>左の依存工程図から工程を選ぶと、題名・状態・前提・後続を表示します。</p><div class="status-summary"><span>☐ 未着手 ${counts.pending}</span><span>▶ 作業中 ${counts['in-progress']}</span><span>✅ 完了 ${counts.done}</span><span>⛔ ブロック中 ${counts.blocked}</span></div>${dispatchSummary}${renderSeamProposalOverview(layout)}${renderPhaseProgress(readModel)}<h2>作業中</h2>${activeLinks}</section>`;
|
|
375
|
-
const details = sections.map((section) => {
|
|
376
|
-
const key = refKey(section.ref);
|
|
377
|
-
const node = nodeByKey.get(key);
|
|
378
|
-
const status = DOCUMENT_STATUS[section.state.status] ?? { mark: '?', label: '状態不明' };
|
|
379
|
-
const lane = lookup.lanes.get(JSON.stringify([section.ref.plan_key, section.task.lane]));
|
|
380
|
-
const category = lane === undefined ? section.task.lane : `${section.task.lane} — ${lane.name}`;
|
|
381
|
-
const categoryDescription = lane === undefined ? '' : `<p class="category-description">${escapeHtmlText(lane.description)}</p>`;
|
|
382
|
-
const blockedReason = section.state.status === 'blocked'
|
|
383
|
-
? `<p><strong>ブロック理由:</strong> ${escapeHtmlText(section.state.blocked_reason ?? '理由未記録')}</p>` : '';
|
|
384
|
-
const sourceLine = section.anchorOutcome.origin_line === null ? '' : `:${section.anchorOutcome.origin_line}`;
|
|
385
|
-
const sourceRef = section.narrativeRef ?? '参照なし';
|
|
386
|
-
const anchorText = section.anchorOutcome.anchored
|
|
387
|
-
? `元plan: ${sourceRef}${sourceLine} — 行対応を確認済み`
|
|
388
|
-
: `元plan: ${sourceRef}${sourceLine} — 行対応を確認できないため、本文位置との対応は表示していません`;
|
|
389
|
-
const readiness = node?.visibility.next_ready
|
|
390
|
-
? `<p class="readiness-note">ready frontierの一員です。${ready.length > 1 ? '他のready工程と同時着手できるかは下の並列可否で判断してください。' : '現在の唯一の着手候補です。'}</p>`
|
|
391
|
-
: incoming.get(key).length === 0 ? '<p class="readiness-note">登録済みの前提工程はありません。図だけではdispatch可否を判定しません。</p>' : '';
|
|
392
|
-
const independenceNote = renderIndependenceNote(section.ref, node, independenceSummary);
|
|
393
|
-
// Say it plainly when the reader will not find this ToDo on the diagram.
|
|
394
|
-
const foldedNote = !folds.has(key) ? ''
|
|
395
|
-
: '<p class="fold-note">完走済みのため図には描いていません。図に出すには <code>lattice todo gantt --scope all</code> を実行してください。</p>';
|
|
396
|
-
return `<article class="task-detail" data-detail-key="${escapeHtmlAttribute(key)}" hidden><header><span class="detail-status status-${escapeHtmlAttribute(section.state.status)}">${escapeHtmlText(status.mark)} ${escapeHtmlText(status.label)}</span><span class="detail-reference">${escapeHtmlText(taskReference(section, lookup))}</span></header><h1>${escapeHtmlText(section.task.title)}</h1><p class="detail-category"><strong>カテゴリ:</strong> ${escapeHtmlText(category)}</p>${categoryDescription}<p><strong>正規ID:</strong> <code>${escapeHtmlText(`${section.ref.plan_key}/${section.task.task_id}`)}</code></p>${blockedReason}${readiness}${independenceNote}${foldedNote}<section><h2>前提工程</h2>${renderRelationList(incoming.get(key), sectionByKey, lookup, '登録済みの前提工程はありません。', folds)}</section><section><h2>後続工程</h2>${renderRelationList(outgoing.get(key), sectionByKey, lookup, '登録済みの後続工程はありません。', folds)}</section><p class="anchor-status">${escapeHtmlText(anchorText)}</p><details class="task-diagnostics"><summary>開発者向け診断</summary><dl><dt>canonical ref</dt><dd><code>${escapeHtmlText(`${section.ref.project_id}/${section.ref.plan_key}/${section.task.task_id}`)}</code></dd><dt>anchor</dt><dd>${escapeHtmlText(section.anchorOutcome.anchored ? 'verified' : section.anchorOutcome.reason)}</dd></dl></details></article>`;
|
|
397
|
-
}).join('');
|
|
398
|
-
const taskIndex = renderTaskIndex(sections, lookup, folds, planActivity(readModel));
|
|
399
|
-
return `<div class="right-toolbar"><button type="button" data-show-overview>概要</button><button type="button" data-show-selected hidden>選択工程へ戻る</button><button type="button" data-show-task-index>全工程一覧</button></div><div class="right-content">${overview}<div data-right-panel="details" hidden>${details}</div><section class="task-index" data-right-panel="task-index" hidden><h1>全工程</h1><p>Latticeに登録された全工程を現在の状態とともに表示しています。planは動いているものを最終活動の新しい順で上に、完走したものを古い順で下にまとめ、plan内は登録順です。</p>${taskIndex}</section></div>`;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
function renderDiagramLegend(presentation, layout = null, expandable = false) {
|
|
403
|
-
const categories = (presentation?.lanes ?? []).map((lane) => `<div class="category-entry"><dt><code>${escapeHtmlText(lane.lane)}</code> — ${escapeHtmlText(lane.name)}</dt><dd>${escapeHtmlText(lane.description)}</dd></div>`).join('');
|
|
404
|
-
const categoryDetails = categories === '' ? '' : `<details class="category-legend"><summary>カテゴリ説明</summary><dl>${categories}</dl></details>`;
|
|
405
|
-
const foldedCount = layout?.scope?.folded_task_count ?? 0;
|
|
406
|
-
// The badge says what is missing from the diagram, so it is also the control
|
|
407
|
-
// that brings it back — a reader who notices the count is exactly the reader
|
|
408
|
-
// who wants to see it.
|
|
409
|
-
const foldChip = foldedCount === 0 ? ''
|
|
410
|
-
: expandable
|
|
411
|
-
? `<button type="button" class="fold-chip" data-toggle-expanded aria-expanded="false"><span data-toggle-label data-collapsed-label="完走済み ${foldedCount}件を非表示(押すと表示)" data-expanded-label="完走済み ${foldedCount}件を表示中(押すと非表示)">完走済み ${foldedCount}件を非表示(押すと表示)</span></button>`
|
|
412
|
-
: `<span class="fold-chip">完走済み ${foldedCount}件を非表示</span>`;
|
|
413
|
-
const foldNote = foldedCount === 0 ? ''
|
|
414
|
-
: expandable
|
|
415
|
-
? '<p class="fold-note">後続に作業中・未着手が残っていない完了工程は図から外しています。生きた工程とその直接の前提工程は必ず描きます。上のバッジを押すと外した工程も含めて描きます。総数・進捗・最長依存鎖は外す前の全工程で数えています。</p>'
|
|
416
|
-
: '<p class="fold-note">後続に作業中・未着手が残っていない完了工程は図から外しています。生きた工程とその直接の前提工程は必ず描きます。外した工程は右の「全工程」から辿れ、図に出すには <code>lattice todo gantt --scope all</code> を実行してください。総数・進捗・最長依存鎖は外す前の全工程で数えています。</p>';
|
|
417
|
-
const independenceLegend = layout.independence === null ? ''
|
|
418
|
-
: '<span>∥ 独立検証済</span><span>⛓ 要直列</span><span>? 未検査</span>';
|
|
419
|
-
// 独立性の記録がある間は「全件同時dispatchが既定」と無条件に述べない(ADR 0129 Decision 3)。
|
|
420
|
-
const dispatchSentence = layout.independence === null
|
|
421
|
-
? 'ready frontierは全件同時dispatchが既定です。未登録の資源・host制約によりsubsetだけを選ぶ場合は理由を記録します。'
|
|
422
|
-
: '同時着手できるかはカードの並列可否で判断してください。未検査の工程は依存線が無くても並列可の根拠になりません。';
|
|
423
|
-
return `<div class="diagram-legend" aria-label="工程図の凡例"><span>${statusMarkup('pending', ' 未着手')}</span><span>${statusMarkup('in-progress', ' 作業中')}</span><span>${statusMarkup('done', ' 完了')}</span><span>${statusMarkup('blocked', ' ブロック中')}</span><span>破線枠: ready frontier</span>${independenceLegend}<span>太線: 構造上の最長依存鎖</span><span>半円: 非接触の線交差</span><span>黒丸: 論理上の合流</span>${foldChip}${categoryDetails}${foldNote}<p>縦方向は時間ではなく、登録済み依存関係による工程段階です。${dispatchSentence}構造上の最長依存鎖は各工程を同じ重みとして数え、実時間・工数・納期を表しません。</p></div>`;
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
const CSS = `
|
|
427
|
-
:root{
|
|
428
|
-
color-scheme:light;
|
|
429
|
-
--surface-1:#fcfcfb;
|
|
430
|
-
--surface-2:#f4f4f2;
|
|
431
|
-
--text-primary:#0b0b0b;
|
|
432
|
-
--text-secondary:#52514e;
|
|
433
|
-
--border:#d9d8d4;
|
|
434
|
-
--accent:#2a78d6;
|
|
435
|
-
--good:#0ca30c;
|
|
436
|
-
--critical:#d03b3b;
|
|
437
|
-
font-family:system-ui,-apple-system,"Hiragino Sans","Yu Gothic UI",sans-serif;
|
|
438
|
-
font-size:13.5px;
|
|
439
|
-
font-weight:400;
|
|
440
|
-
line-height:1.6;
|
|
441
|
-
}
|
|
442
|
-
*{box-sizing:border-box}
|
|
443
|
-
body{display:grid;grid-template-rows:minmax(0,1fr);height:100vh;margin:0;background:var(--surface-1);color:var(--text-primary)}
|
|
444
|
-
.shell{display:grid;grid-template-columns:minmax(0,var(--split,58%)) auto minmax(24rem,1fr);min-width:0;min-height:0}
|
|
445
|
-
.gantt-pane{display:grid;grid-template-rows:auto auto minmax(0,1fr);min-width:0;min-height:0;overflow:hidden;background:var(--surface-1)}
|
|
446
|
-
.pane-divider{width:8px;cursor:col-resize;background:rgba(217,216,212,.5);touch-action:none}
|
|
447
|
-
.diagram-toolbar{z-index:3;display:flex;align-items:center;gap:8px;padding:8px 16px;border-bottom:1px solid var(--border);background:var(--surface-2);color:var(--text-secondary)}
|
|
448
|
-
.diagram-toolbar button{min-height:32px;padding:0 8px;border:1px solid var(--border);border-radius:4px;background:var(--surface-2);color:var(--text-primary);font:500 12px/1.6 system-ui,-apple-system,"Hiragino Sans","Yu Gothic UI",sans-serif}
|
|
449
|
-
.diagram-toolbar button:focus-visible{outline:2px solid var(--text-primary);outline-offset:2px}
|
|
450
|
-
.zoom-readout{min-width:48px;text-align:center;font-size:12px;font-weight:500;font-variant-numeric:tabular-nums}
|
|
451
|
-
.diagram-note{margin-left:auto;color:var(--text-secondary);font-size:12px;font-weight:500}
|
|
452
|
-
.project-heading{margin-right:8px;color:var(--text-primary);font-size:13px;font-weight:650;white-space:nowrap}.status-symbol.status-in-progress{color:var(--accent)}.status-symbol.status-done{color:var(--good)}.status-symbol.status-blocked{color:var(--critical)}
|
|
453
|
-
.diagram-legend{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;padding:8px 16px;border-bottom:1px solid var(--border);background:var(--surface-1);color:var(--text-secondary);font-size:12px;font-weight:500}
|
|
454
|
-
.diagram-legend>span{white-space:nowrap}.diagram-legend>p{flex:1 0 100%;margin:0;font-weight:400}
|
|
455
|
-
.category-legend{margin-left:auto}.category-legend summary{cursor:pointer;color:var(--text-primary)}
|
|
456
|
-
.category-legend dl{position:absolute;z-index:4;right:16px;max-width:38rem;margin:8px 0 0;padding:12px 16px;border:1px solid var(--border);background:var(--surface-1);box-shadow:0 4px 16px rgba(11,11,11,.12)}
|
|
457
|
-
.category-entry+ .category-entry{margin-top:8px}.category-entry dt{color:var(--text-primary)}.category-entry dd{margin:0;color:var(--text-secondary);font-weight:400}
|
|
458
|
-
.diagram-scroll{min-width:0;min-height:0;max-width:calc(100% - 16px);margin:8px;overflow:auto;overscroll-behavior:contain;border:1px solid rgba(217,216,212,.5)}
|
|
459
|
-
.todo-gantt{display:block;max-width:none}
|
|
460
|
-
.narrative-pane{min-width:0;overflow:auto;background:var(--surface-1)}
|
|
461
|
-
[hidden]{display:none!important}
|
|
462
|
-
.right-toolbar{position:sticky;z-index:3;top:0;display:flex;gap:8px;padding:8px 16px;border-bottom:1px solid var(--border);background:var(--surface-1)}
|
|
463
|
-
.right-toolbar button,.relation-list button,.active-list button,.task-index-list button{padding:6px 8px;border:1px solid var(--border);border-radius:4px;background:var(--surface-2);color:var(--text-primary);font:500 12px/1.6 system-ui,-apple-system,"Hiragino Sans","Yu Gothic UI",sans-serif;text-align:left;cursor:pointer}
|
|
464
|
-
.right-toolbar button:focus-visible,.relation-list button:focus-visible,.active-list button:focus-visible,.task-index-list button:focus-visible{outline:2px solid var(--text-primary);outline-offset:2px}
|
|
465
|
-
.right-content{max-width:72ch;margin:0 auto;padding:16px 24px 48px}
|
|
466
|
-
.right-overview h1,.task-detail h1{margin:0 0 16px;font-size:19px;font-weight:650;line-height:1.45}
|
|
467
|
-
.right-overview h2,.task-detail h2{margin:24px 0 8px;font-size:16px;font-weight:600}
|
|
468
|
-
.status-summary{display:flex;flex-wrap:wrap;gap:8px 16px;margin:16px 0;padding:12px;background:var(--surface-2)}
|
|
469
|
-
.seam-overview{margin:24px 0}.seam-overview>h2{margin-bottom:8px}
|
|
470
|
-
.seam-plan{margin:8px 0;padding:12px;border:1px solid var(--border);border-left:4px solid var(--accent);background:var(--surface-2)}
|
|
471
|
-
.seam-plan>header{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px}.seam-plan>header>code{font-weight:650}.seam-component-count{margin-left:auto;color:var(--text-secondary);font-size:12px}
|
|
472
|
-
.seam-coverage{padding:1px 7px;border:1px solid var(--border);border-radius:9999px;background:var(--surface-1);font-size:11px;font-weight:650}.seam-coverage.coverage-missing,.seam-coverage.coverage-stale,.seam-coverage.coverage-superseded{border-color:var(--critical);color:var(--critical)}
|
|
473
|
-
.seam-guidance,.seam-next-action{margin:6px 0 0;color:var(--text-secondary);font-size:12px}.seam-next-action code{color:var(--text-primary);font-weight:650}
|
|
474
|
-
.seam-component{margin-top:10px;padding:10px;border:1px solid var(--border);border-left:4px solid var(--text-secondary);background:var(--surface-1)}.seam-component.verdict-seam_candidate{border-left-color:var(--good)}.seam-component.verdict-intentional_serial{border-left-color:var(--critical)}.seam-component.verdict-unknown_requires_evidence{border-left-color:var(--accent)}
|
|
475
|
-
.seam-component>header{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;font-weight:650}.seam-component>header code{overflow-wrap:anywhere}
|
|
476
|
-
.seam-conflicts,.seam-evidence-needed ul,.seam-reasons ul,.seam-surfaces ul{margin:8px 0 0;padding:0;list-style:none}.seam-conflict{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 10px;padding:8px;border:1px solid var(--border)}.seam-conflict+.seam-conflict{margin-top:6px}
|
|
477
|
-
.seam-target{font-size:13.5px;overflow-wrap:anywhere}.seam-conflict-kind{color:var(--text-secondary);font-size:11px}.seam-pairs{grid-column:1 / -1;display:flex;flex-wrap:wrap;gap:4px 10px}.seam-task-pair{font-weight:650}
|
|
478
|
-
.seam-evidence-needed,.seam-reasons,.seam-surfaces{margin-top:10px}.seam-evidence-needed h4,.seam-reasons h4,.seam-surfaces h4{margin:0;font-size:12px}.seam-evidence-needed li,.seam-reasons li,.seam-surfaces li{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 12px;padding:5px 8px;background:var(--surface-2)}.seam-evidence-needed li+li,.seam-reasons li+li,.seam-surfaces li+li{margin-top:4px}.seam-evidence-needed li>code{font-weight:650}.seam-evidence-needed li>span,.seam-reasons li>span,.seam-surfaces li>span{color:var(--text-secondary)}
|
|
479
|
-
.seam-tests{margin:8px 0 0;color:var(--text-secondary);font-size:12px}.seam-empty-group{margin-top:8px;border-top:1px solid var(--border)}.seam-empty-group>summary{display:flex;gap:10px;padding:8px 0;cursor:pointer;color:var(--text-secondary)}.seam-empty-group>summary span{margin-left:auto}.seam-plan-compact{border-left-width:1px}
|
|
480
|
-
.phase-overview>p{color:var(--text-secondary)}.phase-overview>ol{display:grid;gap:8px;margin:0;padding:0;list-style:none}.phase-progress{padding:10px 12px;border:1px solid var(--border);border-left-width:4px;background:var(--surface-2)}.phase-progress>header{display:flex;justify-content:space-between;gap:12px}.phase-progress>p{margin:4px 0;color:var(--text-secondary);font-size:12px}.phase-progress progress{display:block;width:100%}.phase-progress.status-accepted{border-left-color:var(--good)}.phase-progress.status-reviewing,.phase-progress.status-gate_ready{border-left-color:var(--accent)}.phase-progress.status-rejected{border-left-color:var(--critical)}
|
|
481
|
-
.active-list,.relation-list{margin:0;padding:0;list-style:none}.active-list li+li,.relation-list li+li{margin-top:8px}
|
|
482
|
-
.active-list button{width:100%}.anchor-status,.readiness-note,.category-description,.relation-empty{color:var(--text-secondary)}
|
|
483
|
-
.task-detail>header{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:8px}.detail-status,.detail-reference{font-size:12px;font-weight:600}.detail-reference{color:var(--text-secondary)}
|
|
484
|
-
.relation-list button{display:flex;width:100%;flex-direction:column}.relation-list button span{font-weight:400}.relation-kind{display:block;margin-top:4px;color:var(--text-secondary);font-size:12px}
|
|
485
|
-
.task-diagnostics{margin:16px 0;color:var(--text-secondary);font-size:12px}.task-diagnostics summary{cursor:pointer;color:var(--text-primary);font-weight:600}.task-diagnostics dl{display:grid;grid-template-columns:auto 1fr;gap:4px 12px}.task-diagnostics dd{margin:0;overflow-wrap:anywhere}
|
|
486
|
-
.task-index>h1{margin:0 0 8px;font-size:19px;font-weight:650;line-height:1.45}.task-index>p{margin:0 0 24px;color:var(--text-secondary)}
|
|
487
|
-
.task-index-plan+.task-index-plan{margin-top:32px}.task-index-plan h2{margin:0 0 12px;font-size:16px;font-weight:600}.task-index-plan h2 code{font-size:inherit}
|
|
488
|
-
.task-index-list{margin:0;padding:0;list-style:none}.task-index-list li+li{margin-top:8px}.task-index-list button{display:grid;width:100%;grid-template-columns:1.5rem auto minmax(0,1fr);gap:4px 8px;align-items:baseline}
|
|
489
|
-
.task-index-status{grid-row:1 / span 2;color:var(--text-secondary);font-size:13.5px;text-align:center}.task-index-status.status-in-progress{color:var(--accent)}.task-index-status.status-done{color:var(--good)}.task-index-status.status-blocked{color:var(--critical)}
|
|
490
|
-
.task-index-reference{color:var(--text-secondary);font-size:12px;white-space:nowrap}.task-index-list strong{font-size:13.5px;font-weight:600;overflow-wrap:anywhere}.task-index-blocked-reason{grid-column:2 / -1;color:var(--text-secondary);font-size:12px;overflow-wrap:anywhere}
|
|
491
|
-
.todo-gantt text{font-family:system-ui,-apple-system,"Hiragino Sans","Yu Gothic UI",sans-serif;pointer-events:none}
|
|
492
|
-
.todo-node .node-surface{fill:var(--surface-2);stroke:var(--border);stroke-width:1}
|
|
493
|
-
.todo-node .node-meta{fill:var(--text-secondary);font-size:12px;font-weight:500}
|
|
494
|
-
.todo-node .node-title{fill:var(--text-primary);font-size:13.5px;font-weight:400}
|
|
495
|
-
.todo-node .node-title-line{font-size:13.5px;font-weight:400}
|
|
496
|
-
.todo-node .status-mark{fill:var(--text-secondary);font-size:13.5px;font-weight:400}
|
|
497
|
-
.fold-chip{padding:2px 8px;border:1px solid var(--border);border-radius:9999px;background:var(--surface-2);color:var(--text-primary);font:650 13.5px/1.6 system-ui,-apple-system,"Hiragino Sans","Yu Gothic UI",sans-serif}
|
|
498
|
-
button.fold-chip{cursor:pointer}button.fold-chip:focus-visible{outline:2px solid var(--text-primary);outline-offset:2px}
|
|
499
|
-
button.fold-chip[aria-expanded="true"]{border-color:var(--text-primary)}
|
|
500
|
-
[data-diagram][hidden]{display:none}
|
|
501
|
-
.fold-note{flex:1 0 100%;margin:4px 0 0;color:var(--text-secondary);font-weight:400}
|
|
502
|
-
.task-index-folded{margin-top:8px}
|
|
503
|
-
.task-index-folded>summary,.phase-settled>summary{cursor:pointer;padding:6px 0;color:var(--text-secondary);font-weight:600}
|
|
504
|
-
.phase-settled>summary:focus-visible{outline:2px solid var(--text-primary);outline-offset:2px}
|
|
505
|
-
.status-in-progress .node-surface{fill:var(--surface-1);stroke:var(--accent);stroke-width:2}
|
|
506
|
-
.status-in-progress .status-mark{fill:var(--accent)}
|
|
507
|
-
.status-in-progress .status-bar{stroke:var(--accent);stroke-width:2;stroke-linecap:round}
|
|
508
|
-
.status-done .node-surface{fill:var(--surface-2);stroke:var(--border);stroke-width:1}
|
|
509
|
-
.status-done .status-mark{fill:var(--good)}
|
|
510
|
-
.status-blocked .node-surface{fill:var(--surface-1);stroke:var(--critical);stroke-width:2}
|
|
511
|
-
.status-blocked .status-mark{fill:var(--critical)}
|
|
512
|
-
.next-ready-node .node-surface{stroke:var(--accent);stroke-width:2;stroke-dasharray:4 3}
|
|
513
|
-
/* 独立性は記号と色で示す。枠線はstatusとready frontierが使い切っている(ADR 0129)。 */
|
|
514
|
-
.independence-badge{font-size:10px;font-weight:600;letter-spacing:0.02em}
|
|
515
|
-
.independence-verified .independence-badge{fill:var(--good)}
|
|
516
|
-
.independence-conflict .independence-badge{fill:var(--critical)}
|
|
517
|
-
.independence-unknown .independence-badge{fill:var(--text-secondary)}
|
|
518
|
-
.todo-node:focus .node-surface,.selected-node .node-surface{stroke:var(--text-primary);stroke-width:2.5}
|
|
519
|
-
.dependency-edge .edge-route{fill:none;stroke:var(--text-secondary);stroke-width:1.5;stroke-linejoin:round;opacity:.4}
|
|
520
|
-
.dependency-edge .edge-arrow{fill:var(--text-secondary);opacity:.7}
|
|
521
|
-
.longest-chain-edge .edge-route,.selected-incident-edge .edge-route{stroke:var(--text-primary);stroke-width:2.5;opacity:1}
|
|
522
|
-
.longest-chain-edge .edge-arrow,.selected-incident-edge .edge-arrow{fill:var(--text-primary);opacity:1}
|
|
523
|
-
.join-marker circle{fill:var(--text-primary);stroke:none}
|
|
524
|
-
.join-contact-marker{fill:var(--text-primary);stroke:none}.join-connector .edge-route{fill:none;stroke:var(--text-secondary);stroke-width:1.5;opacity:.7}
|
|
525
|
-
.summary-container{fill:var(--surface-1);stroke:var(--border);stroke-width:1;stroke-opacity:.5}
|
|
526
|
-
.summary-chip{fill:var(--surface-2);stroke:none}
|
|
527
|
-
.summary-plan text{fill:var(--text-primary);font-size:12px;font-weight:500}
|
|
528
|
-
.summary-lane text{fill:var(--text-secondary);font-size:12px;font-weight:500}
|
|
529
|
-
.summary-lane{cursor:pointer}
|
|
530
|
-
.lane-dimmed{opacity:.35}
|
|
531
|
-
@media(max-width:900px){body{display:block;height:auto}.shell{display:block}.pane-divider{display:none}.gantt-pane,.narrative-pane{height:70vh}.gantt-pane{border-bottom:1px solid var(--border)}}
|
|
532
|
-
`;
|
|
533
|
-
|
|
534
78
|
const CONTROLLER = `
|
|
535
79
|
(()=>{
|
|
536
80
|
const root=document.querySelector('[data-gantt-root]');if(!root)return;
|