16 lines
37 KiB
JSON
16 lines
37 KiB
JSON
{"ts":"2026-02-16T10:34:30.465886881Z","type":{"kind":"loop_started","prompt":"Ralph/PROMPT.md"}}
|
||
{"ts":"2026-02-16T10:36:47.670503849Z","type":{"kind":"loop_completed","reason":"completion_promise"}}
|
||
{"ts":"2026-02-16T10:42:01.215892851Z","type":{"kind":"loop_started","prompt":"Ralph/PROMPT.md"}}
|
||
{"ts":"2026-02-16T10:43:44.925586089Z","type":{"kind":"loop_completed","reason":"completion_promise"}}
|
||
{"ts":"2026-02-16T10:56:26.267912429Z","type":{"kind":"loop_started","prompt":"Ralph/PROMPT.md"}}
|
||
{"ts":"2026-02-16T11:04:21.788867135Z","type":{"kind":"loop_completed","reason":"completion_promise"}}
|
||
{"ts":"2026-02-16T11:45:43.872265133Z","type":{"kind":"loop_started","prompt":"# Task: Sidebar-First Navigation Refactor (Remove Top Navbar/Subnav)\n\nRefactor the dashboard so navigation is fully sidebar-driven, with clear recruiter-facing labels and robust responsive behavior. The current layout is still tied to an older navbar/subnav model and shows incorrect scroll behavior in the sidebar area.\n\n## Context\n\nCurrent implementation has separate top navigation (`TopBar`, `SubNav`) and a desktop-only sidebar. On upward scrolling in the sidebar, hidden space becomes visible in a way that implies layered layout offsets from the old top navbar/subnav structure.\n\n## Requirements\n\n- Remove top navbar/subnav from the rendered dashboard flow and migrate section navigation into the sidebar.\n- Replace section labels with recruiter-facing content labels (no GP/internal metaphors as labels):\n - Overview\n - Projects\n - Experience\n - Education\n - Skills\n- Keep iconography that can still evoke the GP-system metaphor, but labels must match actual portfolio content.\n- Add a `Navigation` subheader area in the sidebar for section links.\n- Keep a separate `My Data` area above `Navigation` in expanded sidebar mode.\n- Ensure the sidebar no longer reveals hidden spacing/artifacts when scrolling upward.\n- Implement mobile sidebar behavior (currently missing):\n - Sidebar is collapsed by default.\n - A hamburger control appears at the top and toggles expanded/collapsed state.\n - In collapsed mode, render a compact vertical rail with:\n - hamburger control at the top\n - the five section icons directly beneath for one-tap section jumping\n - In expanded mode, reveal full sidebar content:\n - `My Data` block\n - `Navigation` links with icon + text labels\n - tags, alerts, and highlights sections\n- Preserve or improve accessibility:\n - Keyboard operable controls\n - Correct `aria-*` labels for menu toggle and navigation regions\n - Visible focus states\n- Preserve smooth section scrolling/anchor behavior from navigation actions.\n\n## Suggested GP-Metaphor Icon Mapping (labels remain recruiter-facing)\n\nUse these concrete icon targets (or closest equivalents from existing icon library):\n\n- Overview: `UserRound` (profile summary)\n- Projects: `Pill` (interventions/medications metaphor)\n- Experience: `Workflow` (pathway/Sankey metaphor)\n- Education: `GraduationCap` (training/education)\n- Skills: `Wrench` (capabilities/tools)\n\nLabel text must stay recruiter-facing:\n- `Overview`, `Projects`, `Experience`, `Education`, `Skills`\n\n## Likely Files In Scope\n\n- `src/components/DashboardLayout.tsx`\n- `src/components/Sidebar.tsx`\n- `src/components/SubNav.tsx`\n- `src/components/TopBar.tsx`\n- `src/index.css`\n- Any related hooks/types/styles needed for section activity and responsive state\n\n## Success Criteria\n\nAll of the following must be true:\n\n- [ ] No top navbar/subnav is rendered in the final dashboard layout.\n- [ ] Sidebar contains the five required recruiter-facing nav labels under a `Navigation` subheader.\n- [ ] Expanded sidebar includes a distinct `My Data` area above `Navigation`.\n- [ ] Sidebar scrolling no longer exposes hidden top spacing/artifacts when scrolling upward.\n- [ ] Desktop navigation from sidebar correctly jumps/scrolls to each section.\n- [ ] On mobile, sidebar is collapsed by default with hamburger at top and five icon shortcuts visible.\n- [ ] On mobile expand, sidebar shows `My Data`, full navigation links (icon + text), and tags/alerts/highlights.\n- [ ] Navigation controls are keyboard accessible with appropriate ARIA semantics.\n- [ ] `npm run lint` passes.\n- [ ] `npm run typecheck` passes.\n- [ ] `npm run build` passes.\n\n## Constraints\n\n- Use the existing project stack and conventions (TypeScript + React + current design language).\n- Do not reintroduce GP-style labels like \"Significant Interventions\" or \"Patient Summary\" for the sidebar nav text.\n- Keep changes focused on layout/navigation behavior; avoid unrelated refactors.\n\n## Status\n\nTrack implementation progress in this file or `.ralph/plan.md`.\nWhen all success criteria are met, print LOOP_COMPLETE.\n"}}
|
||
{"ts":"2026-02-16T12:25:22.487713369Z","type":{"kind":"loop_started","prompt":"# Task: Patient Pathway Graph Stability + Unified Experience/Education Data Model\n\nRefactor the patient-pathway style timeline/graph and related experience UI so interaction feels stable, data is consistent across all sections, and education is merged into the same primary timeline flow.\n\n## Context\n\nCurrent behavior has two major quality issues:\n- Hovering graph-related content appears to trigger graph-wide motion/jiggle, implying unnecessary re-rendering or unstable layout state.\n- Timeline dates shown in the graph do not match the dates shown in work-experience content.\n\nThe layout/content model is also split in ways that make consistency harder:\n- Work and education data appear to be rendered through different pathways.\n- Education is duplicated via a separate section beneath work experience.\n\n## Requirements\n\n- Fix interaction stability:\n - Hovering either a graph element OR its corresponding experience/education card must apply the same highlight behavior.\n - Hover should not cause global graph jiggle/repositioning.\n- Diagnose and resolve date mismatch root cause:\n - Determine whether mismatch is from render logic, duplicated data sources, or both.\n - Deliver a fix so graph timeline dates match displayed card dates.\n- Create one source of truth for timeline entities (career + education):\n - Include fields for full title, shortened graph label, date range, description/details, and skills list.\n - Use this canonical dataset to drive graph nodes/edges and card rendering.\n- Skills integration:\n - Aggregate skills from canonical entities.\n - Feed the highest-frequency skills into sidebar tags.\n- Experience/Education presentation update:\n - Remove the standalone work-experience subheader and existing role pill treatment.\n - In the unified timeline list, career entries show a `Career Intervention` pill.\n - Education entries remain in the same overall list/component flow but are visually right-aligned.\n - Education entries include an `Education Intervention` pill inside each card.\n - Remove the separate education section that currently sits below work experience.\n\n## Likely Files In Scope\n\n- `src/data/*` (or equivalent canonical data files)\n- `src/types/*` (shared timeline entity typing)\n- `src/components/*` for graph, timeline cards, sidebar tags, and experience/education sections\n- Any related hooks/utilities managing hover state, mapping, and aggregation\n\n## Success Criteria\n\nAll of the following must be true:\n\n- [ ] Hovering on graph items and corresponding cards produces the same highlight outcome.\n- [ ] Hover interactions do not cause full-graph jitter/repositioning artifacts.\n- [ ] Graph dates and card dates are consistent for every timeline entry.\n- [ ] A single canonical dataset powers both graph rendering and experience/education card content.\n- [ ] Each timeline entry supports title + short graph label + skills + date fields needed by all consumers.\n- [ ] Sidebar tags are sourced from aggregated canonical skills (most frequent first).\n- [ ] Career entries show `Career Intervention` pill treatment.\n- [ ] Education entries are visually right-aligned and show `Education Intervention` pill treatment.\n- [ ] Separate standalone education section below work experience is removed.\n- [ ] `npm run lint` passes.\n- [ ] `npm run typecheck` passes.\n- [ ] `npm run build` passes.\n\n## Constraints\n\n- Use existing stack/patterns (TypeScript + React + current project conventions).\n- Keep changes focused on graph/timeline/data consistency and the requested UI restructuring.\n- Do not introduce unrelated visual/system-wide refactors.\n\n## Status\n\nTrack implementation progress in this file or `.ralph/plan.md`.\nWhen all success criteria are met, print LOOP_COMPLETE.\n"}}
|
||
{"ts":"2026-02-16T12:44:34.362708559Z","type":{"kind":"loop_completed","reason":"completion_promise"}}
|
||
{"ts":"2026-02-16T12:53:32.069086745Z","type":{"kind":"loop_started","prompt":"# Task: D3 Career Constellation Remediation (Hover, Timeline Parity, Visual Alignment)\n\nImplement a full remediation of the career constellation chart and its linked timeline UI so interactions are reliable, timeline semantics are correct, and styling aligns with the rest of the site typography/tokens.\n\n## Context\n\nRecent chart refresh work did not fully resolve key issues:\n- Hover highlighting is still not consistently activating on chart nodes.\n- Timeline behavior in the chart is now more broken versus the work-experience timeline.\n- Styling in the chart layer is not fully aligned with the main design system (including font token consistency).\n\nThe implementation should be grounded in the current codebase and preserve existing UX intent where possible.\n\n## Requirements\n\n- Fix hover interaction reliability in the D3 chart:\n - Ensure node hover consistently triggers graph highlighting on desktop.\n - Preserve touch behavior (tap-to-pin and clear interactions).\n - Preserve keyboard accessibility interactions.\n- Remove interaction-layer conflicts:\n - Resolve any pointer interception between invisible accessibility overlays and SVG node hit targets.\n - Ensure focus-only controls do not break pointer hover behavior.\n- Correct timeline data/semantic parity:\n - Ensure constellation role nodes map to the intended work-experience scope.\n - Prevent unintended education entries from being treated as role nodes unless explicitly intended.\n - Align ordering semantics between the chart timeline and work-experience timeline.\n- Stabilize highlight state behavior:\n - Ensure graph highlight state and linked timeline card highlighting remain coherent when hovering roles vs skills.\n - Avoid reset/flicker edge cases on mouseleave/blur transitions.\n- Align chart styling with site design system:\n - Use canonical font tokens consistently (UI vs mono usage should match the broader app).\n - Remove or replace invalid/undefined font token usage impacting timeline/chart-adjacent components.\n - Keep visual treatment consistent with existing dashboard cards/tokens (no unrelated redesign).\n- Keep architecture maintainable:\n - Clarify data exports for timeline consumers (career-only, education-only, combined) where needed.\n - Avoid duplicate or dead timeline component paths if they create inconsistency.\n\n## Validation Requirements\n\nRun and pass:\n- `npm run lint`\n- `npm run typecheck`\n- `npm run build`\n\nAlso perform manual behavioral checks and record concise notes in `.ralph/review.md`:\n- Desktop hover on role nodes and skill nodes.\n- Cross-highlight behavior between chart and timeline cards.\n- Touch/coarse-pointer behavior (tap-to-pin and clear).\n- Keyboard focus navigation and activation behavior.\n- Timeline order parity sanity-check against work-experience content.\n\n## Likely Files In Scope\n\n- `src/components/CareerConstellation.tsx`\n- `src/components/DashboardLayout.tsx`\n- `src/components/TimelineInterventionsSubsection.tsx`\n- `src/components/WorkExperienceSubsection.tsx` (if retained, removed, or reintegrated)\n- `src/data/timeline.ts`\n- `src/data/constellation.ts`\n- `src/index.css`\n- Related types in `src/types/pmr.ts` if needed\n\n## Success Criteria\n\nAll of the following must be true:\n- [ ] Constellation hover highlighting works reliably with pointer input.\n- [ ] Accessibility/focus affordances remain functional without breaking pointer interactions.\n- [ ] Timeline/role mapping in the chart is semantically correct and aligned with work-experience content.\n- [ ] Highlight synchronization between chart and timeline cards behaves predictably.\n- [ ] Font/token usage in chart and timeline-adjacent components is consistent with the app's design tokens.\n- [ ] Any legacy/duplicate timeline path that causes divergence is resolved or clearly justified.\n- [ ] `npm run lint` passes.\n- [ ] `npm run typecheck` passes.\n- [ ] `npm run build` passes.\n- [ ] Reviewer records manual verification outcomes in `.ralph/review.md`.\n\n## Constraints\n\n- Use the existing TypeScript + React + Vite stack and project conventions.\n- Keep changes scoped to constellation/timeline correctness and visual consistency.\n- Do not introduce broad unrelated refactors.\n- Prioritize correctness and maintainability over cosmetic novelty.\n\n## Status\n\nTrack progress in `.ralph/plan.md` and keep it updated.\nWhen all success criteria are met, print `LOOP_COMPLETE`.\n"}}
|
||
{"ts":"2026-02-16T13:57:03.169967492Z","type":{"kind":"loop_started","prompt":"# Task: CareerConstellation Overhaul\n\nRefactor, visually improve, and add chronological animation to the CareerConstellation D3 force chart — the centrepiece of the portfolio's Patient Pathway section.\n\n## Requirements\n\n### Phase 1 — Refactor the Monolith\n\nDecompose `src/components/CareerConstellation.tsx` (1102 lines) into focused modules:\n\n```\nsrc/components/constellation/\n CareerConstellation.tsx -- Orchestrator (< 300 lines)\n MobileAccordion.tsx -- Mobile tap-to-expand accordion\n ConstellationLegend.tsx -- Domain legend with node counts\n AccessibleNodeOverlay.tsx -- Keyboard navigation button overlay\n constants.ts -- All magic numbers as named exports\n types.ts -- SimNode, SimLink, LayoutParams, local interfaces\n\nsrc/hooks/\n useForceSimulation.ts -- D3 simulation lifecycle (setup, forces, tick, cleanup)\n useConstellationHighlight.ts -- applyGraphHighlight + connectedMap + highlight refs\n useConstellationInteraction.ts -- Mouse/touch/pin handlers, callback refs\n```\n\n- [ ] Constants extracted (forces, sizes, opacities, durations)\n- [ ] Types extracted (SimNode, SimLink, LayoutParams)\n- [ ] MobileAccordion extracted as standalone component\n- [ ] ConstellationLegend extracted\n- [ ] AccessibleNodeOverlay extracted\n- [ ] useForceSimulation hook created\n- [ ] useConstellationHighlight hook created\n- [ ] useConstellationInteraction hook created\n- [ ] Orchestrator composed from hooks + sub-components (< 300 lines)\n- [ ] All existing behaviour preserved (hover, click, tap, keyboard, mobile, detail panel)\n- [ ] `npm run lint && npm run typecheck && npm run build` passes\n\n### Phase 2 — Visual Improvements\n\nEnhance the chart aesthetics while maintaining the PMR design language:\n\n**Links:**\n- [ ] Strength-weighted stroke width at rest: `0.5 + strength * 1.5` (range 0.5–2px)\n- [ ] Domain-colored at rest (very low opacity: `0.08 + strength * 0.12`)\n- [ ] Improved bezier curves: offset control point by vertical distance (`cx = (sx+tx)/2 + (ty-sy)*0.15`)\n- [ ] On highlight: width `1 + strength * 2`, domain color at higher opacity\n\n**Skill nodes:**\n- [ ] Thin domain-colored stroke at rest (`stroke-width: 1, stroke-opacity: 0.4`)\n- [ ] Size encoding by connected role count: `baseRadius + roleCount * 0.8`\n- [ ] On highlight: subtle glow filter (feGaussianBlur, 2–3px stdDeviation, domain color)\n\n**Role nodes:**\n- [ ] Fill gradient: left-to-right from orgColor@0.08 to orgColor@0.18\n- [ ] On highlight: fill-opacity 0.25, stroke-width 2, shadow-md filter\n\n**Entry animation (mount, replaced by over-time animation in Phase 3):**\n- [ ] Timeline guides fade in (200ms)\n- [ ] Role nodes slide in from left along connectors (staggered 80ms, 300ms each)\n- [ ] Skill nodes scale up from 0 (staggered 30ms, 250ms each)\n- [ ] Links draw on via stroke-dashoffset (after source+target visible)\n- [ ] Skipped entirely when `prefers-reduced-motion`\n\n**Legend:**\n- [ ] Domain node counts displayed: \"Technical (8) · Clinical (6) · Leadership (7)\"\n\n### Phase 3 — Over-Time Animation\n\nBuild the constellation chronologically from 2009 to present:\n\n**Data changes:**\n- [ ] Modify `buildConstellationData()` in `src/data/timeline.ts` to include education entities\n- [ ] Education entities appear as nodes on the timeline (use `type: 'role'` with education styling, or add `type: 'education'`)\n- [ ] Update `src/types/pmr.ts` if new node types are needed\n- [ ] Timeline order (oldest first): A-Levels (2009) → MPharm (2011) → Pre-Reg (2015) → Duty Manager (2016) → Pharmacy Manager (2017) → High Cost Drugs (2022) → Deputy Head (2024) → Interim Head (2025)\n\n**Animation architecture:**\n- [ ] Create `useTimelineAnimation` hook in `src/hooks/`\n- [ ] All nodes present in simulation from start but hidden (opacity: 0) — stable positions, no layout jitter\n- [ ] Reveal chronologically: each role/education entity appears, then its skills animate in\n- [ ] Skills already visible from earlier roles just get new links (reinforcement pulse: scale 1.3x → 1.0x over 350ms)\n- [ ] Uses requestAnimationFrame + timestamp scheduler (not setTimeout chains)\n- [ ] Animation state machine in refs: IDLE → PLAYING → PAUSED → HOLDING → RESETTING → loop back to PLAYING\n- [ ] Auto-plays on load (after force simulation settles)\n- [ ] Loops continuously: hold 3s at end → fade all 400ms → pause 200ms → restart\n\n**Visual effects during reveal:**\n- [ ] Role/education nodes scale from 0 with ease-out-back\n- [ ] New skill nodes scale from 0 with ease-out\n- [ ] Links draw on via stroke-dashoffset animation\n- [ ] Year indicator overlay (top-left of SVG, monospace font, var(--text-tertiary))\n\n**Accessibility:**\n- [ ] `prefers-reduced-motion`: skip animation entirely, show final state immediately\n- [ ] Play/pause button with appropriate aria-label\n\n### Phase 4 — Animation + Interaction Integration\n\nWire the animation to the existing highlight system:\n\n- [ ] Hover/tap pauses animation, applies highlight normally (on visible nodes only)\n- [ ] Highlight only operates on revealed nodes — unrevealed nodes stay at opacity 0\n- [ ] Multiplicative opacity: animation visibility (0 or target) × highlight emphasis (1.0 or 0.15)\n- [ ] Resume animation 800ms after last interaction ends (mouseout / background tap)\n- [ ] Explicit pause via button stays paused until user clicks play again\n- [ ] Play/pause toggle button (bottom-right of SVG area, subtle styling, larger touch target on mobile)\n- [ ] Mobile accordion works during paused state\n- [ ] Keyboard navigation works during paused state\n- [ ] Click → detail panel works during paused state\n\n## Success Criteria\n\nAll of the following must be true for LOOP_COMPLETE:\n\n- [ ] `npm run lint && npm run typecheck && npm run build` passes with zero errors\n- [ ] CareerConstellation orchestrator is < 300 lines\n- [ ] Education entities (A-Levels, MPharm) appear in the constellation\n- [ ] Animation auto-plays on load and loops continuously\n- [ ] Network builds chronologically from 2009 through to present\n- [ ] Skills accumulate visually — existing skills get new links, not duplicated\n- [ ] Hover/tap pauses animation and shows highlight on visible nodes\n- [ ] Animation resumes after 800ms of no interaction\n- [ ] Play/pause button visible and functional\n- [ ] Existing interactions preserved: click → detail panel, keyboard nav, mobile accordion\n- [ ] `prefers-reduced-motion` shows final state immediately with no animation\n- [ ] Links show domain colors and strength-weighted width at rest\n- [ ] No TypeScript `any` types introduced\n- [ ] No dead code or commented-out blocks\n\n## Constraints\n\n- TypeScript strict mode (`noUnusedLocals`, `noUnusedParameters`)\n- Path alias: `@/*` → `src/*`\n- Styling: Tailwind utilities + CSS custom properties for design tokens\n- D3 v6 (already installed)\n- Framer Motion for non-D3 animations; respect `prefers-reduced-motion`\n- Design tokens: Primary teal #00897B, Accent coral #FF6B6B, PMR greens/teals/greys\n- Font tokens: `--font-ui` (Elvaro), `--font-geist-mono` (monospace), `--font-primary` / `--font-secondary`\n- No automated tests — quality gates are lint + typecheck + build\n- D3 patterns: reference `.claude/skills/d3-visualization/` for force layout examples\n\n## Key Architecture Decisions\n\n1. **\"All nodes hidden\" for animation** — every node participates in the force simulation from the start (positions are stable). Reveal via opacity transitions only. Do NOT dynamically add/remove nodes from the simulation.\n\n2. **Ref-based animation state** — the animation state machine lives in refs (not React state) to avoid re-renders in the rAF loop. Only sync to React state for UI controls (play/pause button).\n\n3. **Multiplicative opacity model** — animation controls visibility (0 or target), highlight controls emphasis (1.0 or 0.15). Final opacity = animation × highlight. This prevents the two systems from conflicting.\n\n4. **Imperative D3 + React hybrid** — D3 manages SVG rendering and force simulation imperatively via refs. React manages keyboard overlay buttons and UI controls. Follow the existing pattern in the codebase.\n\n## Status\n\nTrack progress here. Mark items complete as you go.\nWhen ALL success criteria are met, print LOOP_COMPLETE.\n"}}
|
||
{"ts":"2026-02-16T13:57:22.944444127Z","type":{"kind":"loop_started","prompt":"# Task: CareerConstellation Overhaul\n\nRefactor, visually improve, and add chronological animation to the CareerConstellation D3 force chart — the centrepiece of the portfolio's Patient Pathway section.\n\n## Requirements\n\n### Phase 1 — Refactor the Monolith\n\nDecompose `src/components/CareerConstellation.tsx` (1102 lines) into focused modules:\n\n```\nsrc/components/constellation/\n CareerConstellation.tsx -- Orchestrator (< 300 lines)\n MobileAccordion.tsx -- Mobile tap-to-expand accordion\n ConstellationLegend.tsx -- Domain legend with node counts\n AccessibleNodeOverlay.tsx -- Keyboard navigation button overlay\n constants.ts -- All magic numbers as named exports\n types.ts -- SimNode, SimLink, LayoutParams, local interfaces\n\nsrc/hooks/\n useForceSimulation.ts -- D3 simulation lifecycle (setup, forces, tick, cleanup)\n useConstellationHighlight.ts -- applyGraphHighlight + connectedMap + highlight refs\n useConstellationInteraction.ts -- Mouse/touch/pin handlers, callback refs\n```\n\n- [ ] Constants extracted (forces, sizes, opacities, durations)\n- [ ] Types extracted (SimNode, SimLink, LayoutParams)\n- [ ] MobileAccordion extracted as standalone component\n- [ ] ConstellationLegend extracted\n- [ ] AccessibleNodeOverlay extracted\n- [ ] useForceSimulation hook created\n- [ ] useConstellationHighlight hook created\n- [ ] useConstellationInteraction hook created\n- [ ] Orchestrator composed from hooks + sub-components (< 300 lines)\n- [ ] All existing behaviour preserved (hover, click, tap, keyboard, mobile, detail panel)\n- [ ] `npm run lint && npm run typecheck && npm run build` passes\n\n### Phase 2 — Visual Improvements\n\nEnhance the chart aesthetics while maintaining the PMR design language:\n\n**Links:**\n- [ ] Strength-weighted stroke width at rest: `0.5 + strength * 1.5` (range 0.5–2px)\n- [ ] Domain-colored at rest (very low opacity: `0.08 + strength * 0.12`)\n- [ ] Improved bezier curves: offset control point by vertical distance (`cx = (sx+tx)/2 + (ty-sy)*0.15`)\n- [ ] On highlight: width `1 + strength * 2`, domain color at higher opacity\n\n**Skill nodes:**\n- [ ] Thin domain-colored stroke at rest (`stroke-width: 1, stroke-opacity: 0.4`)\n- [ ] Size encoding by connected role count: `baseRadius + roleCount * 0.8`\n- [ ] On highlight: subtle glow filter (feGaussianBlur, 2–3px stdDeviation, domain color)\n\n**Role nodes:**\n- [ ] Fill gradient: left-to-right from orgColor@0.08 to orgColor@0.18\n- [ ] On highlight: fill-opacity 0.25, stroke-width 2, shadow-md filter\n\n**Entry animation (mount, replaced by over-time animation in Phase 3):**\n- [ ] Timeline guides fade in (200ms)\n- [ ] Role nodes slide in from left along connectors (staggered 80ms, 300ms each)\n- [ ] Skill nodes scale up from 0 (staggered 30ms, 250ms each)\n- [ ] Links draw on via stroke-dashoffset (after source+target visible)\n- [ ] Skipped entirely when `prefers-reduced-motion`\n\n**Legend:**\n- [ ] Domain node counts displayed: \"Technical (8) · Clinical (6) · Leadership (7)\"\n\n### Phase 3 — Over-Time Animation\n\nBuild the constellation chronologically from 2009 to present:\n\n**Data changes:**\n- [ ] Modify `buildConstellationData()` in `src/data/timeline.ts` to include education entities\n- [ ] Education entities appear as nodes on the timeline (use `type: 'role'` with education styling, or add `type: 'education'`)\n- [ ] Update `src/types/pmr.ts` if new node types are needed\n- [ ] Timeline order (oldest first): A-Levels (2009) → MPharm (2011) → Pre-Reg (2015) → Duty Manager (2016) → Pharmacy Manager (2017) → High Cost Drugs (2022) → Deputy Head (2024) → Interim Head (2025)\n\n**Animation architecture:**\n- [ ] Create `useTimelineAnimation` hook in `src/hooks/`\n- [ ] All nodes present in simulation from start but hidden (opacity: 0) — stable positions, no layout jitter\n- [ ] Reveal chronologically: each role/education entity appears, then its skills animate in\n- [ ] Skills already visible from earlier roles just get new links (reinforcement pulse: scale 1.3x → 1.0x over 350ms)\n- [ ] Uses requestAnimationFrame + timestamp scheduler (not setTimeout chains)\n- [ ] Animation state machine in refs: IDLE → PLAYING → PAUSED → HOLDING → RESETTING → loop back to PLAYING\n- [ ] Auto-plays on load (after force simulation settles)\n- [ ] Loops continuously: hold 3s at end → fade all 400ms → pause 200ms → restart\n\n**Visual effects during reveal:**\n- [ ] Role/education nodes scale from 0 with ease-out-back\n- [ ] New skill nodes scale from 0 with ease-out\n- [ ] Links draw on via stroke-dashoffset animation\n- [ ] Year indicator overlay (top-left of SVG, monospace font, var(--text-tertiary))\n\n**Accessibility:**\n- [ ] `prefers-reduced-motion`: skip animation entirely, show final state immediately\n- [ ] Play/pause button with appropriate aria-label\n\n### Phase 4 — Animation + Interaction Integration\n\nWire the animation to the existing highlight system:\n\n- [ ] Hover/tap pauses animation, applies highlight normally (on visible nodes only)\n- [ ] Highlight only operates on revealed nodes — unrevealed nodes stay at opacity 0\n- [ ] Multiplicative opacity: animation visibility (0 or target) × highlight emphasis (1.0 or 0.15)\n- [ ] Resume animation 800ms after last interaction ends (mouseout / background tap)\n- [ ] Explicit pause via button stays paused until user clicks play again\n- [ ] Play/pause toggle button (bottom-right of SVG area, subtle styling, larger touch target on mobile)\n- [ ] Mobile accordion works during paused state\n- [ ] Keyboard navigation works during paused state\n- [ ] Click → detail panel works during paused state\n\n## Success Criteria\n\nAll of the following must be true for LOOP_COMPLETE:\n\n- [ ] `npm run lint && npm run typecheck && npm run build` passes with zero errors\n- [ ] CareerConstellation orchestrator is < 300 lines\n- [ ] Education entities (A-Levels, MPharm) appear in the constellation\n- [ ] Animation auto-plays on load and loops continuously\n- [ ] Network builds chronologically from 2009 through to present\n- [ ] Skills accumulate visually — existing skills get new links, not duplicated\n- [ ] Hover/tap pauses animation and shows highlight on visible nodes\n- [ ] Animation resumes after 800ms of no interaction\n- [ ] Play/pause button visible and functional\n- [ ] Existing interactions preserved: click → detail panel, keyboard nav, mobile accordion\n- [ ] `prefers-reduced-motion` shows final state immediately with no animation\n- [ ] Links show domain colors and strength-weighted width at rest\n- [ ] No TypeScript `any` types introduced\n- [ ] No dead code or commented-out blocks\n\n## Constraints\n\n- TypeScript strict mode (`noUnusedLocals`, `noUnusedParameters`)\n- Path alias: `@/*` → `src/*`\n- Styling: Tailwind utilities + CSS custom properties for design tokens\n- D3 v6 (already installed)\n- Framer Motion for non-D3 animations; respect `prefers-reduced-motion`\n- Design tokens: Primary teal #00897B, Accent coral #FF6B6B, PMR greens/teals/greys\n- Font tokens: `--font-ui` (Elvaro), `--font-geist-mono` (monospace), `--font-primary` / `--font-secondary`\n- No automated tests — quality gates are lint + typecheck + build\n- D3 patterns: reference `.claude/skills/d3-visualization/` for force layout examples\n\n## Key Architecture Decisions\n\n1. **\"All nodes hidden\" for animation** — every node participates in the force simulation from the start (positions are stable). Reveal via opacity transitions only. Do NOT dynamically add/remove nodes from the simulation.\n\n2. **Ref-based animation state** — the animation state machine lives in refs (not React state) to avoid re-renders in the rAF loop. Only sync to React state for UI controls (play/pause button).\n\n3. **Multiplicative opacity model** — animation controls visibility (0 or target), highlight controls emphasis (1.0 or 0.15). Final opacity = animation × highlight. This prevents the two systems from conflicting.\n\n4. **Imperative D3 + React hybrid** — D3 manages SVG rendering and force simulation imperatively via refs. React manages keyboard overlay buttons and UI controls. Follow the existing pattern in the codebase.\n\n## Status\n\nTrack progress here. Mark items complete as you go.\nWhen ALL success criteria are met, print LOOP_COMPLETE.\n"}}
|
||
{"ts":"2026-02-16T14:36:25.803536916Z","type":{"kind":"loop_completed","reason":"completion_promise"}}
|
||
{"ts":"2026-02-16T14:59:40.840605871Z","type":{"kind":"loop_started","prompt":"# Task: Career Constellation Chart & Layout Polish\n\nVisual polish and layout adjustments to the career constellation chart, sidebar, and repeat medications section. 12 discrete changes across 10 files.\n\n## Requirements\n\n### 1. Reduce link opacity (`src/components/constellation/constants.ts`)\n- Lower `LINK_BASE_OPACITY` from `0.08` → `0.04`\n- Lower `LINK_STRENGTH_OPACITY_FACTOR` from `0.12` → `0.06`\n- Makes skill connection lines subtler so job pills are visually clearer\n\n### 2. White background on hovered job pill (`src/hooks/useConstellationHighlight.ts`)\n- When a role/education node is the `activeNodeId`, override its `.node-circle` fill to `#FFFFFF` with `fill-opacity: 1`\n- Currently uses a gradient fill with `fill-opacity: 0.25` — make it solid white, fully opaque\n\n### 3. Move legend to top of chart + increase font size (`src/components/constellation/ConstellationLegend.tsx`)\n- Position legend as absolutely-positioned overlay at the **top** of the chart container (not below the SVG)\n- Increase font size from `10px` to `12px` to match work node label text size\n- Separate the \"Hover to explore connections\" text from the legend — see item 12\n\n### 4. Move year labels to right side of chart (`src/hooks/useForceSimulation.ts`)\n- Keep the current node layout unchanged (roles, skills, timeline line stay where they are)\n- Move year label text elements to the right edge of the chart: position at `width - sidePadding`, `text-anchor: 'end'`\n\n### 5. Change chart fonts to dashboard style (`src/hooks/useForceSimulation.ts`)\n- Year labels: change `font-family` from `var(--font-geist-mono)` to `var(--font-ui)`\n- Year indicator (animation): same font change\n\n### 6. Reverse pathway column split to 40/60 (`src/index.css`)\n- Change `.pathway-columns` grid from `minmax(0, 1.3fr) minmax(0, 1fr)` to `minmax(0, 2fr) minmax(0, 3fr)`\n- This gives 40% to work experience text and 60% to the graph\n\n### 7. Sidebar: collapses to icon rail when patient summary scrolls out of view (`src/components/Sidebar.tsx` + `src/components/DashboardLayout.tsx`)\n- Sidebar already starts expanded on desktop — no change needed there\n- Add IntersectionObserver on the PatientSummaryTile element in DashboardLayout\n- When PatientSummaryTile scrolls out of view, pass a `forceCollapsed` prop to Sidebar\n- Sidebar collapses to icon rail (same as current mobile rail behaviour with nav buttons + hamburger menu)\n- When PatientSummaryTile scrolls back into view, re-expand the sidebar\n- Only applies on desktop (≥1024px) — mobile behaviour unchanged\n\n### 8. Change pathway stacking breakpoint from 1024px to 768px (`src/index.css`)\n- The `.pathway-columns` two-column layout currently triggers at `min-width: 1024px`\n- Change this to `min-width: 768px` so the graph sits beside text on tablets too\n- Sidebar breakpoint remains at 1024px (this only affects pathway columns)\n- Also update `.pathway-graph-sticky` responsive rule to match the `768px` breakpoint\n\n### 9. Repeat medications: 3-column layout (`src/components/RepeatMedicationsSubsection.tsx`)\n- Render all 3 category sections (Technical, Healthcare Domain, Strategic & Leadership) side-by-side\n- Use CSS grid: `grid-template-columns: repeat(3, 1fr)` on `md` (768px+) screens\n- Stack vertically on mobile (<768px)\n- Remove the `marginTop` between categories when in grid mode (they'll be in columns)\n\n### 10. Skills hover → chart highlight (verify only)\n- `RepeatMedicationsSubsection` already calls `onNodeHighlight` on hover\n- This flows through `DashboardLayout` → `highlightedNodeId` → `CareerConstellation` → `useConstellationHighlight`\n- Verify this interaction works end-to-end. If it does, no code change needed.\n\n### 11. Play/pause button: left edge of chart, visible only when chart is in view (`src/components/constellation/PlayPauseButton.tsx` + `src/components/constellation/CareerConstellation.tsx`)\n- Move button to the far-left edge of the chart container (not bottom-right)\n- Use IntersectionObserver on the chart container to track if chart is visible\n- When chart is in viewport: show button at left edge, vertically centered\n- When chart scrolls out of view: hide the button\n- Increase base opacity from 0.6 to 0.85\n- Add slightly stronger border and subtle box-shadow for visibility\n\n### 12. \"Hover to explore connections\" text — more visible, top-left above year indicator (`src/components/constellation/ConstellationLegend.tsx` or `src/components/constellation/CareerConstellation.tsx`)\n- Separate this text from the legend dot items\n- Position at the top-left of the chart, above the year indicator text\n- Increase opacity from 0.7 to 1\n- Increase font size (match or approach the legend font size)\n- On touch devices, show \"Tap to explore connections\" instead\n\n## Success Criteria\n\nAll of the following must be true:\n- [ ] `npm run lint` passes with zero errors\n- [ ] `npm run typecheck` passes with zero errors\n- [ ] `npm run build` completes successfully\n- [ ] Link opacity constants lowered (LINK_BASE_OPACITY=0.04, LINK_STRENGTH_OPACITY_FACTOR=0.06)\n- [ ] Hovered role/education node gets white fill (#FFFFFF, fill-opacity 1)\n- [ ] Legend positioned at top of chart with 12px font size\n- [ ] Year labels positioned at right edge of chart with `var(--font-ui)` font\n- [ ] Pathway columns use 40/60 split (2fr/3fr)\n- [ ] Sidebar collapses to icon rail when patient summary scrolls out of view (desktop only)\n- [ ] Pathway columns go side-by-side at 768px (not 1024px)\n- [ ] Repeat medications renders 3 categories in grid columns on md+ screens\n- [ ] Play/pause button on left edge of chart, hidden when chart not in view\n- [ ] \"Hover to explore\" text at top-left of chart, full opacity, larger font\n\n## Constraints\n\n- TypeScript strict mode — `noUnusedLocals`, `noUnusedParameters` enforced\n- Path alias: `@/*` → `src/*`\n- Styling: Tailwind utility classes + inline `CSSProperties` for dynamic/theme values\n- Animations: Framer Motion; respects `prefers-reduced-motion`\n- Design tokens: Primary teal `#00897B`, Accent coral `#FF6B6B`\n- Font tokens: `--font-ui` (Elvaro Grotesque), `--font-geist-mono` (Geist Mono)\n- Do not break existing hover/click/keyboard interactions on the constellation\n- Do not alter the D3 force simulation physics or node positioning logic (except year labels)\n- Preserve existing mobile behaviour unless explicitly changed (items 8, 9)\n\n## Files to Modify\n\n1. `src/components/constellation/constants.ts`\n2. `src/hooks/useConstellationHighlight.ts`\n3. `src/components/constellation/ConstellationLegend.tsx`\n4. `src/hooks/useForceSimulation.ts`\n5. `src/index.css`\n6. `src/components/Sidebar.tsx`\n7. `src/components/DashboardLayout.tsx`\n8. `src/components/RepeatMedicationsSubsection.tsx`\n9. `src/components/constellation/PlayPauseButton.tsx`\n10. `src/components/constellation/CareerConstellation.tsx`\n\n## Status\n\nTrack progress here. Mark items complete as you go.\nWhen all success criteria are met, print LOOP_COMPLETE.\n\n- [ ] Item 1: Link opacity\n- [ ] Item 2: White hover pill\n- [ ] Item 3: Legend top position\n- [ ] Item 4: Year labels right\n- [ ] Item 5: Font change\n- [ ] Item 6: Column split 40/60\n- [ ] Item 7: Sidebar scroll collapse\n- [ ] Item 8: Stacking breakpoint 768px\n- [ ] Item 9: Medications 3-column\n- [ ] Item 10: Skills hover verify\n- [ ] Item 11: Play/pause button\n- [ ] Item 12: Hover text visibility\n"}}
|
||
{"ts":"2026-02-16T15:06:20.510517743Z","type":{"kind":"loop_completed","reason":"completion_promise"}}
|