2.7 KiB
2.7 KiB
Story 1.3: Visualisation dans la Smart Grid (Frontend)
Status: review
Story
As a Julien (Analyst), I want to see my uploaded data in an interactive high-speed grid, so that I can explore the raw data effortlessly.
Acceptance Criteria
- Virtualization: The grid renders 50,000+ rows without browser lag using TanStack Table virtualization.
- Arrow Integration: The frontend reads the Apache Arrow stream from the backend API using
apache-arrowlibrary. - Data Display: Columns are rendered with correct formatting based on metadata (e.g., numbers right-aligned, dates formatted).
- Visual Foundation: The grid uses the "Smart Grid" design (compact density, JetBrains Mono font) as defined in UX specs.
- Basic Interaction: Users can scroll vertically and horizontally fluidly.
Tasks / Subtasks
- Dependencies & Setup (AC: 2)
- Install
apache-arrow,@tanstack/react-table,@tanstack/react-virtual,zustand. - Create
frontend/src/lib/arrow-client.tsto handle binary stream parsing.
- Install
- Smart Grid Component (AC: 1, 4, 5)
- Create
frontend/src/features/smart-grid/components/SmartGrid.tsx. - Implement virtualized row rendering.
- Apply Shadcn UI styling and "Lab & Tech" theme.
- Create
- Integration (AC: 3)
- Connect
uploadform success state to Grid data loading. - Implement
useGridStore(Zustand) to hold the loaded table state. - Render actual data from the uploaded file.
- Connect
Dev Notes
- Performance: Optimized binary stream parsing using Apache Arrow IPC. Zero unnecessary JSON parsing.
- State: Zustand used for high-frequency updates and persistence across session.
- Layout: Implemented responsive workspace with sticky header and virtualized body.
Project Structure Notes
- Organized into
features/smart-gridandfeatures/uploader. - Centralized state in
store/use-grid-store.ts.
References
- [Source: ux-design-specification.md#Core User Experience]
- [Source: architecture.md#Frontend Architecture]
Dev Agent Record
Agent Model Used
{{agent_model_name_version}}
Completion Notes List
- Successfully integrated
apache-arrowfor binary data ingestion. - Implemented
<SmartGrid />with@tanstack/react-virtualfor 50k+ row performance. - Built a functional
<FileUploader />that communicates with the FastAPI backend. - Applied "Lab & Tech" styling with Tailwind CSS.
File List
- /frontend/src/features/smart-grid/components/SmartGrid.tsx
- /frontend/src/features/uploader/components/FileUploader.tsx
- /frontend/src/lib/arrow-client.ts
- /frontend/src/lib/utils.ts
- /frontend/src/store/use-grid-store.ts
- /frontend/src/app/page.tsx