Skip to content

Commit 6b99c69

Browse files
feat(catalog): add Gantt recipe with nested phases and dependencies (#163)
* feat(catalog): add Gantt recipe with nested phases and dependencies Add conformance case 198: phase header lanes with indented task lanes on scaleBand and scaleUtc, progress fills, a go-live milestone, a status-date rule, and right-angle finish-to-start arrows routed by a case-local d3 curve on link. Connectors, progress, and the rule are decorative, so keyboard focus stops on every phase, task, and milestone. Observable Plot reference uses the same routing curve. Document the recipe in Intervals and Financial Charts, register the case in the catalog index, previews, navigation, and definition coverage records, and log F-310, F-313, and F-314 in the API friction log. * docs(friction): renumber Gantt recipe findings to F-307 through F-309 * fix(catalog): walk Gantt focus by lane and keep connectors visible Use a focusNearestY-based strategy whose navigation sorts by y then x so arrow keys follow the lane tree, and assert the order in the unit test. Outline phase summaries with a light fill so crossing connectors stay visible in both themes. Note the fixed margin assumption in the gutter estimate and correct F-308. * docs: align Gantt plan friction references --------- Co-authored-by: Tanner Linsley <tannerlinsley@gmail.com>
1 parent d9bf5ef commit 6b99c69

22 files changed

Lines changed: 1088 additions & 21 deletions

‎API-FRICTION.md‎

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,9 @@ Each entry records:
351351
| F-312 | Tick stubs could not be styled independently | API | resolved |
352352
| F-313 | Initial observer precision cancelled entrance motion | Tooling | resolved |
353353
| F-314 | Framework ticks and immediate focus layers were unclear | Documentation | resolved |
354+
| F-315 | Orthogonal dependency connectors need a hand-built curve | API | monitoring |
355+
| F-316 | Keyboard focus cannot follow a dependency | API | monitoring |
356+
| F-317 | Time-ranged bars cannot inset only their lane edges | API | monitoring |
354357

355358
## Findings
356359

@@ -9354,3 +9357,70 @@ Each entry records:
93549357
direction changes. A focus dot appears during entrance while the data path
93559358
and its running animation remain intact. Concurrent inline states remain a
93569359
separate feature; this addresses the documented alternatives requested.
9360+
9361+
### F-315 - Orthogonal dependency connectors need a hand-built curve
9362+
9363+
- Status: monitoring
9364+
- Severity: medium
9365+
- Owner: API
9366+
- Observed in: catalog case 198, a Gantt plan with finish-to-start
9367+
dependencies
9368+
- Friction: `link` draws a straight segment and `arrow` draws a straight
9369+
arrow. A right-angle connector that leaves the predecessor's right edge,
9370+
steps, and enters the successor's left edge, plus its arrowhead, had to be
9371+
written as a d3 `CurveFactory` passed to the link's `curve` through
9372+
`d3Curve`. The curve sees only the two endpoint pixels. It cannot read the
9373+
resolved band step, so the definition estimates the lane gutter for backward
9374+
detours from the outer chart height. It cannot tell a bar from a milestone,
9375+
so dependencies into the milestone need a second link mark with a larger end
9376+
gap.
9377+
- Decision: keep the recipe. The public curve hook is enough and adds no bytes
9378+
to other charts. Consider a connector primitive with resolved band geometry
9379+
and target-aware end gaps only if a second timeline or network case repeats
9380+
this routing.
9381+
- Verification: case 198 passes the standard 320, 640, and 960 px light and
9382+
dark conformance matrix, before and after its revision update, with 13
9383+
right-angle connectors in both renderers. The same curve factory drives the
9384+
Observable Plot reference.
9385+
9386+
### F-316 - Keyboard focus cannot follow a dependency
9387+
9388+
- Status: monitoring
9389+
- Severity: low
9390+
- Owner: API
9391+
- Observed in: catalog case 198, a Gantt plan with finish-to-start
9392+
dependencies
9393+
- Friction: default keyboard navigation steps through focusable points by x
9394+
center, then y, so phase summaries interleave with tasks instead of
9395+
following the lane tree. Changing only the order requires a complete focus
9396+
strategy. Its `resolve` receives points but not the scene, so the default
9397+
geometry-aware pointer hit test (`findNearestPoint` needs the scene) cannot
9398+
be reused; the recipe spreads `focusNearestY` and replaces `navigation` with
9399+
a y-then-x sort. Decorative connectors correctly add no focus stops, but no
9400+
key moves from a task to its predecessor or successor. The recipe names each
9401+
task's predecessors in its tooltip text instead.
9402+
- Decision: accept the lane-order strategy and text description for this
9403+
recipe. Graph navigation would add interaction state to the default host,
9404+
which is outside the current stop boundary. Revisit with a second dependency
9405+
or network case.
9406+
- Verification: the case 198 unit tests confirm one focus stop per phase,
9407+
task, and milestone, none for connectors or progress fills, and a
9408+
navigation order that matches the lane order.
9409+
9410+
### F-317 - Time-ranged bars cannot inset only their lane edges
9411+
9412+
- Status: monitoring
9413+
- Severity: low
9414+
- Owner: API
9415+
- Observed in: catalog case 198, a Gantt plan with phase summary bars
9416+
- Friction: `rect` `inset` removes pixels from all four edges, so a thinner
9417+
phase summary bar inside its band lane would also shorten its time extent.
9418+
`barX` `inset` trims only the categorical edges, but `barX` rejects `Date`
9419+
fields for `x1` and `x2` on a UTC axis (TS2322). The recipe uses
9420+
full-height bars and band padding instead of thinner summary bars.
9421+
- Decision: keep full-height bars for now. Consider either `Date` endpoints
9422+
on `barX` or an axis-specific `rect` inset if another timeline case needs
9423+
bars thinner than their lane.
9424+
- Verification: a strict compile probe of `barX(rows, { x1: 'start', x2:
9425+
'end', y: 'lane' })` with `Date` fields fails with TS2322. Case 198 uses
9426+
`rect` with `inset: 0`.

‎PLAN.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2490,7 +2490,10 @@ The third tranche pressures composition and performance:
24902490

24912491
1. Multi-pane financial chart with synchronized crosshair, viewport, and
24922492
logical-range navigation.
2493-
2. Gantt/resource timeline with nested groups and dependencies.
2493+
2. Gantt/resource timeline with nested groups and dependencies: recipe
2494+
implemented as conformance case 198 over existing marks; a reusable
2495+
connector primitive and dependency keyboard traversal remain pending
2496+
(F-315, F-316).
24942497
3. General 100k/1m-row render, update, streaming, decimation, and lifecycle
24952498
pressure is implemented; pan, zoom, and cursor-specific large-data pressure
24962499
remains pending.

‎benchmarks/conformance/DEFINITION-COVERAGE-AUDIT.md‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Date: 2026-08-10
44

5-
Scope: all 188 catalog directories. The 67 cases previously classified as
5+
Scope: all 189 catalog directories. The 67 cases previously classified as
66
strict custom authoring, preparation review, or shell-only are reviewed beside
77
the former 42-case definition-native control group from
88
[the custom authoring audit](./CUSTOM-AUTHORING-AUDIT.md). That audit remains
@@ -31,12 +31,12 @@ work:
3131

3232
| Disposition | Cases | Meaning |
3333
| --------------------- | ------: | ------------------------------------------------------------------------ |
34-
| Definition now | 135 | Current marks and eager transforms are sufficient |
34+
| Definition now | 136 | Current marks and eager transforms are sufficient |
3535
| First-party primitive | 35 | Add a reusable mark, transform, layout, guide, or controlled signal |
3636
| Optional primitive | 15 | Keep a heavy dependency granular, but hide its layout DTOs and lifecycle |
3737
| Application boundary | 2 | The remaining work is product state, DOM layout, or data arrival |
3838
| Inline custom mark | 1 | The geometry is intentionally case-specific |
39-
| **Total** | **188** | |
39+
| **Total** | **189** | |
4040

4141
A normal definition does not require every implementation algorithm to live
4242
in Charts core. D3 may implement an optional `sankeyDiagram`, `densityContour`,
@@ -322,6 +322,7 @@ ownership boundary.
322322
| [195 — shadcn tooltip-label-custom](./cases/195-shadcn-tooltip-label-custom/example.tsx) | Definition now | The self-contained native TanStack Charts tooltip example reproduces the pinned shadcn variant and card presentation. |
323323
| [196 — shadcn tooltip-label-formatter](./cases/196-shadcn-tooltip-label-formatter/example.tsx) | Definition now | The self-contained native TanStack Charts tooltip example reproduces the pinned shadcn variant and card presentation. |
324324
| [197 — shadcn tooltip-label-none](./cases/197-shadcn-tooltip-label-none/example.tsx) | Definition now | The self-contained native TanStack Charts tooltip example reproduces the pinned shadcn variant and card presentation. |
325+
| [198 — Gantt dependencies](./cases/198-gantt-dependencies/example.tsx) | Definition now | Native rect, dot, rule, and decorative link marks compose phase lanes, progress, a milestone, and the status date; a case-local d3 curve routes each link as a right-angle dependency arrow. |
325326

326327
## Reference evidence
327328

@@ -353,8 +354,8 @@ bundle.
353354

354355
## Delivery result
355356

356-
All 188 catalog directories now have one roadmap record and case-local
357-
evidence. All 185 normal-definition cases are verified against their current
357+
All 189 catalog directories now have one roadmap record and case-local
358+
evidence. All 186 normal-definition cases are verified against their current
358359
boundary; only cases 85, 86, and 116 retain accepted application or bespoke
359360
geometry work. The roadmap validator compares its IDs with the live catalog
360361
directories so a new case cannot silently remain outside this review.

‎benchmarks/conformance/DEFINITION-COVERAGE-OVERVIEW.md‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22

33
Date: 2026-08-10
44

5-
The catalog has 188 case directories. 185 visualizations now use
5+
The catalog has 189 case directories. 186 visualizations now use
66
normal chart definitions. Cases 85 and 86 retain application shells, and Case
77
116 retains one deliberately bespoke inline mark. No other case-owned layout
88
or renderer is an accepted endpoint.
99

1010
| Disposition | Cases | Result |
1111
| --------------------- | ------: | ------------------------------------------------- |
12-
| Definition now | 135 | Normal definition |
12+
| Definition now | 136 | Normal definition |
1313
| First-party primitive | 35 | Normal definition |
1414
| Optional primitive | 15 | Normal definition |
1515
| Application boundary | 2 | Accepted boundary |
1616
| Inline custom mark | 1 | Accepted boundary |
17-
| **Total** | **188** | **185 normal definitions; 3 accepted boundaries** |
17+
| **Total** | **189** | **186 normal definitions; 3 accepted boundaries** |
1818

1919
## Shared decisions
2020

@@ -63,7 +63,7 @@ presentation policy.
6363

6464
## Verification
6565

66-
- The roadmap validator compares all 188 roadmap and audit IDs with the live
66+
- The roadmap validator compares all 189 roadmap and audit IDs with the live
6767
catalog directories, requires unique IDs, validates the capability DAG, and
6868
requires every verified or accepted case to cite evidence under its own
6969
directory.
@@ -260,6 +260,7 @@ presentation policy.
260260
| [195-shadcn-tooltip-label-custom — Tooltip - Custom label](./cases/195-shadcn-tooltip-label-custom/example.tsx) | Definition now | `current-definition-api` | `example.tsx`, `case.json` |
261261
| [196-shadcn-tooltip-label-formatter — Tooltip - Label Formatter](./cases/196-shadcn-tooltip-label-formatter/example.tsx) | Definition now | `current-definition-api` | `example.tsx`, `case.json` |
262262
| [197-shadcn-tooltip-label-none — Tooltip - No Label](./cases/197-shadcn-tooltip-label-none/example.tsx) | Definition now | `current-definition-api` | `example.tsx`, `case.json` |
263+
| [198-gantt-dependencies — Project Gantt with nested phases and dependencies](./cases/198-gantt-dependencies/example.tsx) | Definition now | `current-definition-api` | `example.tsx`, `route.ts`, `tanstack.test.ts` |
263264
| [bar-grouped — Grouped bars](./cases/bar-grouped/example.tsx) | Definition now | `current-definition-api` | `example.tsx` |
264265
| [bar-horizontal-ranking — Horizontal ranking with long labels](./cases/bar-horizontal-ranking/example.tsx) | Definition now | `current-definition-api` | `example.tsx` |
265266
| [bar-stacked — Stacked bars](./cases/bar-stacked/example.tsx) | Definition now | `current-definition-api` | `example.tsx` |
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"schemaVersion": 1,
3+
"height": 520,
4+
"order": 1990,
5+
"id": "198-gantt-dependencies",
6+
"title": "Project Gantt with nested phases and dependencies",
7+
"family": "interval",
8+
"intent": "Show a small project plan as phase header lanes with indented task lanes, progress fills, a milestone, a status-date rule, and right-angle finish-to-start dependency arrows, with every task reachable by keyboard.",
9+
"support": "composed",
10+
"features": [
11+
"gantt chart",
12+
"band lanes over a UTC time scale",
13+
"phase summary lanes with indented child lanes",
14+
"progress fill over each task",
15+
"milestone marker",
16+
"status-date reference rule",
17+
"orthogonal finish-to-start dependency arrows",
18+
"decorative connectors outside keyboard focus",
19+
"keyboard task descriptions"
20+
],
21+
"geometry": [
22+
{
23+
"role": "rect",
24+
"count": 24,
25+
"maxCount": 24,
26+
"rendererRoles": { "observable-plot": "bar" }
27+
},
28+
{ "role": "link", "count": 13, "maxCount": 13 },
29+
{ "role": "dot", "count": 1, "maxCount": 1 },
30+
{ "role": "rule", "count": 1 }
31+
],
32+
"source": {
33+
"title": "Highcharts Gantt dependencies between tasks",
34+
"url": "https://www.highcharts.com/docs/gantt/gantt-task-dependencies"
35+
},
36+
"ai": {
37+
"create": "Create a responsive Gantt chart from typed project tasks with phase, dates, progress, and finish-to-start predecessors: phase header lanes followed by indented task lanes on a band scale, UTC time, progress fills, a milestone, a status-date rule, and right-angle dependency arrows that stay out of keyboard focus.",
38+
"maintain": "Add a task and a predecessor to one phase without changing lane order rules, breaking the phase roll-up, adding focus stops for connectors, or routing any dependency segment diagonally."
39+
}
40+
}
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
export const planGroups = ['Plan', 'Build', 'Launch'] as const
2+
3+
export type PlanGroup = (typeof planGroups)[number]
4+
5+
export interface PlanTask {
6+
id: string
7+
label: string
8+
group: PlanGroup
9+
start: Date
10+
/** Equal to `start` for a milestone. */
11+
end: Date
12+
/** Completed share of the scheduled duration, from 0 to 1. */
13+
progress: number
14+
/** Finish-to-start predecessors by task id. */
15+
after: readonly string[]
16+
}
17+
18+
const day = (value: string) => new Date(`${value}T00:00:00Z`)
19+
20+
const tasks = [
21+
['research', 'User research', 'Plan', '2026-03-02', '2026-03-13', 1, []],
22+
['audit', 'Content audit', 'Plan', '2026-03-04', '2026-03-18', 1, []],
23+
[
24+
'sitemap',
25+
'Site map',
26+
'Plan',
27+
'2026-03-19',
28+
'2026-03-27',
29+
1,
30+
['research', 'audit'],
31+
],
32+
[
33+
'wireframes',
34+
'Wireframes',
35+
'Plan',
36+
'2026-03-30',
37+
'2026-04-10',
38+
0.7,
39+
['sitemap'],
40+
],
41+
[
42+
'visual',
43+
'Visual design',
44+
'Build',
45+
'2026-03-30',
46+
'2026-04-17',
47+
0.4,
48+
['sitemap'],
49+
],
50+
['cms', 'CMS setup', 'Build', '2026-03-23', '2026-04-10', 0.5, ['audit']],
51+
[
52+
'frontend',
53+
'Front end',
54+
'Build',
55+
'2026-04-20',
56+
'2026-05-15',
57+
0.1,
58+
['wireframes', 'visual'],
59+
],
60+
[
61+
'migration',
62+
'Content migration',
63+
'Build',
64+
'2026-04-13',
65+
'2026-05-08',
66+
0.2,
67+
['cms'],
68+
],
69+
[
70+
'qa',
71+
'QA and fixes',
72+
'Launch',
73+
'2026-05-18',
74+
'2026-05-29',
75+
0,
76+
['frontend', 'migration'],
77+
],
78+
[
79+
'accessibility',
80+
'Accessibility review',
81+
'Launch',
82+
'2026-05-18',
83+
'2026-05-26',
84+
0,
85+
['frontend'],
86+
],
87+
[
88+
'launch',
89+
'Go live',
90+
'Launch',
91+
'2026-06-01',
92+
'2026-06-01',
93+
0,
94+
['qa', 'accessibility'],
95+
],
96+
] as const satisfies readonly (readonly [
97+
string,
98+
string,
99+
PlanGroup,
100+
string,
101+
string,
102+
number,
103+
readonly string[],
104+
])[]
105+
106+
/** Status dates for the initial plan and one revised weekly status update. */
107+
export const statusDates = [day('2026-04-15'), day('2026-04-22')] as const
108+
109+
/**
110+
* Returns the project plan as reported on one status date. The revision keeps
111+
* every task identity and dependency, advances progress, and slips one task.
112+
*/
113+
export function planForRevision(revision: number): PlanTask[] {
114+
const revised = revision % 2 === 1
115+
return tasks.map(([id, label, group, start, end, progress, after]) => ({
116+
id,
117+
label,
118+
group,
119+
start: day(start),
120+
end: revised && id === 'migration' ? day('2026-05-13') : day(end),
121+
progress: revised ? revisedProgress(id, progress) : progress,
122+
after,
123+
}))
124+
}
125+
126+
export function statusDateForRevision(revision: number): Date {
127+
return statusDates[revision % 2 === 1 ? 1 : 0]
128+
}
129+
130+
function revisedProgress(id: string, progress: number) {
131+
if (id === 'wireframes') return 1
132+
if (id === 'visual') return 0.75
133+
if (id === 'cms') return 0.9
134+
if (id === 'frontend') return 0.2
135+
if (id === 'migration') return 0.3
136+
return progress
137+
}

0 commit comments

Comments
 (0)