Design with AI
Design with AI

Ticket management table

Building a ticket management system with master-detail layout using AI.

LLM Written
Human Reviewed Partially

Info

The code/screen is incomplete, this is intended to teach how to steer AI to the complete screen in our free classes. As of writing this page, the first class has not happened. We will publish the completed screen soon.

Repo to run this youself

https://github.com/amarneethi/aidesignsetupdesignsystemprojects.git

Claude Projects

Output

Output

Contents of the project setup in Claude chat

DESIGN_SYSTEM.md

package.json

Claude projects files setup screenshot

Prompt history

_Chat History — Support Tickets Page (Design System v1)


_Turn 1

_🧑 User

A page for support tickets and a detail view of each row on click

_🤖 Assistant

Read the frontend design skill file and examined the project structure (/mnt/project) and uploads directory. Found that the project contains package.json and DESIGN_SYSTEM.md — no existing source files uploaded.

Built a full SupportTickets.jsx page using the design system components. The file included:

List View:

  • Summary stat cards (Open, In Progress, SLA At Risk, Resolved)
  • Searchable, filterable DataTable with columns for ticket ID, subject + customer, priority, status, assignee, SLA, and last update
  • Dropdown filters for status and priority, plus a search bar
  • Pagination

Detail View (on row click):

  • Conversation thread with chat-bubble layout (customer left, agent right)
  • Activity log tab
  • Reply composer with attachment button
  • Right sidebar showing customer info, ticket metadata, and SLA status

Also noted a bug in the status filter Dropdown: onChange was set to setPriorityFilter !== statusFilter ? setStatusFilter : undefined instead of simply setStatusFilter.


_Turn 2

_⚠️ System (Error)

Hydration failed because the server rendered text didn't match the client.

The error pointed to the StatCard component at line 128 — the value prop rendered as 4 on the client but 12 on the server. The root cause: Date.now() and Math.random() were used at module scope inside generateTickets(), producing different values on server vs client during SSR.

Next.js version: 16.1.6 (Turbopack)

_🧑 User

Fix this and also remove leftnav and topnav

_🤖 Assistant

Identified three issues and applied fixes:

  1. Hydration mismatch fix: Replaced all Math.random() calls with a deterministic seeded PRNG (mulberry32 with seed 12345). Replaced Date.now() with a fixed base timestamp (2026-03-13T12:00:00Z, stored as BASE_TS). The timeAgo() helper was also updated to diff against BASE_TS instead of Date.now(). This ensures identical output on both server and client.

  2. Header & SideNav removed: Stripped the Header and SideNav components and their imports. The page now renders as a standalone full-height <main> without any navigation chrome.

  3. Dropdown bug fixed: Changed the status filter Dropdown's onChange from the broken conditional expression to simply onChange={setStatusFilter}.

Delivered the updated SupportTickets.jsx file.


_Turn 3

_🧑 User

Create a markdown version of this chat history without the code generated. Clearly mark user/system input and output

_🤖 Assistant

(This document.)

Claude Code

Output

Output

Prompt history

_Interview Tracker Data Table — Chat History


_User

An interview tracker data table with sorting, filtering, and inline editing for a tech company. Use the design system.


_Assistant

Explored the codebase to understand the project structure and design system:

  • Framework: Next.js 16.1.6 with React 19, Tailwind CSS 4, lucide-react icons
  • Design System: 22 custom-built components (no external UI library), 3 themes (light/dark/high-contrast), comprehensive design tokens for colors, spacing, typography, shadows, motion
  • Existing DataTable component with sorting, row selection, pagination, inline editing, batch actions, custom cell rendering
  • Component styling pattern: 'use client' components using forwardRef, semantic design tokens via CSS custom properties, Tailwind arbitrary values
  • Page pattern reference: Multi-step onboarding form at src/app/multistepform/claudecode/page.js

Read the existing DataTable component, the target page file (empty), and the component barrel exports to understand available building blocks.

Built the interview tracker page at src/app/datatableinterviewtracker/claudecode/page.js with:

  • Stats dashboard — 5 cards showing total candidates, scheduled, in progress, completed, and starred counts
  • Search — filter by candidate name, email, role, or interviewer
  • Filter bar — dropdowns for Stage, Status, and Department with active filter count badge and clear button
  • Sortable columns — click headers to sort by name, role, stage, status, rating, interviewer, or date
  • Inline editing — double-click the interviewer or notes columns to edit in place
  • Row selection & batch actions — select rows to delete or export candidates
  • Star/unstar candidates — toggle star icon per row
  • Candidate detail modal — click a candidate name to view full details with rating, notes, and all metadata
  • Add candidate modal — form with name, email, role, department, stage, interviewer, date, status, and notes
  • Pagination — 5/10/25 per page with sticky headers and striped rows
  • 15 sample candidates across Engineering, Design, Product, and Marketing departments
  • Color-coded tags — stages (gray/purple/teal/blue/green) and statuses (blue/teal/green/red)
  • Toast notifications — success messages for edits, deletes, and additions
  • Fully themed — uses the design system tokens, works with light/dark/high-contrast themes

Fixed an unused Search import from lucide-react flagged by the IDE diagnostics.

Verified the build — the only error was a pre-existing empty placeholder at claudeprojects/page.js, not from the new page.


_User

Create a markdown version of this chat history without the code generated. Clearly mark user/system input and output.

On this page