Skip to content

FE-578: UI refinements; design adaptations & alignments#42

Merged
lunelson merged 14 commits into
mainfrom
ln/fe-578-ui-refine-expand
Apr 12, 2026
Merged

FE-578: UI refinements; design adaptations & alignments#42
lunelson merged 14 commits into
mainfrom
ln/fe-578-ui-refine-expand

Conversation

@lunelson
Copy link
Copy Markdown
Contributor

feat: knowledge card components + shadcn primitives for slice 17

Add card-within-card pattern components (KnowledgeGroupCard,
KnowledgeDetailCard, KnowledgeRow) with Figma design tokens,
status badges (KindBadge, ReviewBadge, CountBadge), and
MetadataRow. Add scroll-area, resizable, and skeleton shadcn
primitives. All patterns verified via Ladle stories.

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

feat: integrate card-within-card pattern into KnowledgeWorkspace

Replace basic list view with KnowledgeGroupCard (white header / tinted
edges body), kind badges, review badges, count badges, progress bars,
and empty-state cards for kinds with no items. Edge labels resolve to
content text via content map. ScrollArea wraps the workspace.

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

feat: resizable panels, skeleton loading, and route integration

InterviewWorkspace conversation + entity sidebar now use
ResizablePanelGroup (65/35 default split, adjustable via handle).
Route transitions show skeleton loading for interview and knowledge
workspaces via TanStack Router pendingComponent. KnowledgeWorkspace
edge labels resolve to content text and show only outgoing edges.

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

chore: mark slice 17 done in PLAN.md

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

test: characterize workspace and transport seams

refactor: add explicit shared transport contracts

refactor: parse workspace transport payloads through shared contracts

refactor: make turn-response and review payloads explicit

refactor: add explicit boundary return types

refactor: reset chat state at the project boundary

refactor: make route transitions own entity hydration

refactor: make workspace contracts readonly

feat: remove debug route, decouple shiki from production bundle

Tool JSON now renders via plain

 instead of CodeBlock with shiki
highlighting. The /debug showcase route is replaced by a Ladle story for
AI Elements components. shiki is eliminated from all production build chunks.

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

retire docs from react/ts refactoring

@linear
Copy link
Copy Markdown

linear Bot commented Apr 12, 2026

FE-578 UI refinements; design adaptations & alignments

Port design tokens, layout primitives, card patterns, and component iteration environment from the parallel brunch-ui prototype. Foundation: Inter Variable font (replacing Geist), Figma-precise color ramp (ink/sub/hint/rule/wash/tint), shadow tokens (card/ring/card-ring), fine-grained typography scale (xxs 10px–sm 16px), font weight discipline (regular/medium/semi-bold only). Layout shell: AppHeader, StageSidebar/PhaseSidebar with working collapse/expand toggle, resizable main+right panels via react-resizable-panels, AppFooter spanning full width. Components: card-within-card pattern (white header / tinted body) for knowledge group cards and question cards; collapsible question card (V2 with inline why grounding, answered cards collapse to read-only summary, re-answering routes through revisit model not casual toggle); empty-state vocabulary (6 patterns: text-only, with icon, with CTA, centered hero, inline within list, attention/warning); metadata rows (label-over-value flex columns); badge refinement (mono font, no black-on-color, no all-caps); mandatory skeleton loading for all pending states. Infrastructure: Ladle story environment (.ladle/ config with theme provider, @source directives, stories as living component reference), shadcn CLI + components.json. Dependencies: @fontsource-variable/inter, react-resizable-panels, @ladle/react, shadcn.

Copy link
Copy Markdown
Contributor Author

lunelson commented Apr 12, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented Apr 12, 2026

🤖 Augment PR Summary

Summary: Implements slice-17 UI refinements and transport hardening across the knowledge/interview workspaces.

Changes:

  • Added knowledge card-within-card pattern components (with Ladle stories) and integrated them into KnowledgeWorkspace with empty states and a ScrollArea container.
  • Added shadcn-style primitives (scroll-area, resizable, skeleton) and wired route-level pendingComponent skeletons for workspace transitions.
  • Removed the /debug route and decoupled shiki from production by rendering tool JSON via plain <pre><code>; updated build/capability boundary tests accordingly.
  • Introduced shared Zod transport schemas in src/shared/api-types.ts and updated loaders/mutations to parse server responses and model turn-response requests explicitly.
  • Refactored chat hydration to use project-scoped useChat ids and adjusted workspace entity refresh behavior on observer results; expanded characterization tests.
  • Updated PLAN/SPEC slice status/invariants and removed prior React/TypeScript review docs.

Technical Notes: Most client/server JSON boundaries are now validated via shared Zod schemas; observer-driven entity refresh is now handled via an explicit fetch + local state instead of React Query invalidation.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 5 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@@ -28,47 +35,90 @@ async function fetchWorkspaceEntities(projectId: number): Promise<EntitiesData>
return response.json();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/client/workspace/workspace-data.ts:35 — fetchWorkspaceEntities() returns response.json() without validating against entitiesDataSchema, so a malformed entities payload could slip past the new transport contracts and break downstream assumptions. Consider parsing this refresh response the same way the route loader does so observer-triggered refreshes get the same safety guarantees.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Comment thread src/shared/api-types.ts
export const requirementEntitySchema = z.object({
id: z.number().int().positive(),
project_id: z.number().int().positive(),
kind: knowledgeItemKindSchema,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/shared/api-types.ts:108 — requirementEntitySchema.kind currently accepts any KnowledgeKind, which means a server regression could return the wrong kind and still pass validation. Other locations where this applies: src/shared/api-types.ts:118.

Severity: low

Other Locations
  • src/shared/api-types.ts:118

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Comment thread src/shared/api-types.ts
relationships: z.array(entityRelationshipSchema),
});

export const exportLoaderDataSchema = z.object({
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/shared/api-types.ts:171 — exportLoaderDataSchema allows { ready: true } with no markdown, which can let an inconsistent export payload through validation and force every consumer to defensively check both fields. Consider modeling this as a discriminated union so validation fails fast if ready: true ever arrives without markdown.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

const displayLabel = edgeLabel.charAt(0).toUpperCase() + edgeLabel.slice(1);
const targetText = edge.targetLabel ?? `item #${edge.targetId}`;
return (
<div key={i} className="rounded-lg bg-white p-3 text-sm shadow-[var(--shadow-card-ring)]">
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/client/components/knowledge-card.tsx:182 — Using the array index (key={i}) for edges can lead to React reconciliation bugs if the edges list ever reorders or inserts, causing connection rows to display stale data. Other locations where this applies: src/client/components/knowledge-card.tsx:249.

Severity: low

Other Locations
  • src/client/components/knowledge-card.tsx:249

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Comment thread memory/PLAN.md
- Invariants to respect: → SPEC.md §Invariants I24, I44, I48
- Acceptance: Inter font renders across all routes; color ramp matches Figma reference values; StageSidebar collapses to PhaseSidebar and back; resizable panels work in interview and knowledge workspaces; at least one Ladle story renders with shared design tokens; question card shows inline `why` with collapsible answered state; empty states appear for all unpopulated sections; skeleton loading renders during route transitions
- **Verification approach**: inner — Ladle stories as visual regression surface; existing workspace seam tests pass after layout migration. Outer — manual walkthrough comparing rendered UI against Figma reference screens.
17. **UI refinement + design-system alignment** `done`
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR metadata: the PR title doesn’t match the repo naming convention for stacked slice branches (it should be {ISSUE-ID}: {Linear title} per (Rule: AGENTS.md)). Consider renaming the PR title to the expected FE-* format so it stays traceable to Linear.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@lunelson lunelson changed the title feat: knowledge card components + shadcn primitives for slice 17 FE-578: UI refinements; design adaptations & alignments Apr 12, 2026
Copy link
Copy Markdown
Contributor Author

lunelson commented Apr 12, 2026

Merge activity

  • Apr 12, 5:03 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 12, 5:05 PM UTC: Graphite rebased this pull request as part of a merge.
  • Apr 12, 5:05 PM UTC: @lunelson merged this pull request with Graphite.

@lunelson lunelson changed the base branch from ln/fe-543-scenarios-reviews-replannings to graphite-base/42 April 12, 2026 17:03
@lunelson lunelson changed the base branch from graphite-base/42 to main April 12, 2026 17:04
lunelson and others added 14 commits April 12, 2026 17:04
Add card-within-card pattern components (KnowledgeGroupCard,
KnowledgeDetailCard, KnowledgeRow) with Figma design tokens,
status badges (KindBadge, ReviewBadge, CountBadge), and
MetadataRow. Add scroll-area, resizable, and skeleton shadcn
primitives. All patterns verified via Ladle stories.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace basic list view with KnowledgeGroupCard (white header / tinted
edges body), kind badges, review badges, count badges, progress bars,
and empty-state cards for kinds with no items. Edge labels resolve to
content text via content map. ScrollArea wraps the workspace.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
InterviewWorkspace conversation + entity sidebar now use
ResizablePanelGroup (65/35 default split, adjustable via handle).
Route transitions show skeleton loading for interview and knowledge
workspaces via TanStack Router pendingComponent. KnowledgeWorkspace
edge labels resolve to content text and show only outgoing edges.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tool JSON now renders via plain <pre><code> instead of CodeBlock with shiki
highlighting. The /debug showcase route is replaced by a Ladle story for
AI Elements components. shiki is eliminated from all production build chunks.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@lunelson lunelson force-pushed the ln/fe-578-ui-refine-expand branch from 415deb1 to 09d47d7 Compare April 12, 2026 17:04
@lunelson lunelson merged commit 6970383 into main Apr 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant