From cc5ea4ad24ff99359b66084728f6b7475def8bde Mon Sep 17 00:00:00 2001 From: Naveen Kumar B Date: Wed, 3 Jun 2026 17:03:29 +0530 Subject: [PATCH 1/2] docs: add task board constitution with real-time requirements --- .specify/memory/constitution.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .specify/memory/constitution.md diff --git a/.specify/memory/constitution.md b/.specify/memory/constitution.md new file mode 100644 index 0000000000..f768103473 --- /dev/null +++ b/.specify/memory/constitution.md @@ -0,0 +1,25 @@ +# Task Board Constitution + +## Code Quality +- Enforce TypeScript strict mode throughout the application. Explicit `any` types are strictly prohibited. +- Architecture must utilize functional components with React hooks exclusively; legacy class components are banned. +- Maintain modularity by enforcing a maximum threshold of 50 lines of execution logic per function. + +## Testing +- Maintain a mandatory minimum threshold of 80% automated code coverage before merge approval. +- Execute isolated unit testing via Vitest for all complex drag-and-drop state transitions and column array sorting logic. +- Implement end-to-end (E2E) testing suites via Playwright to validate critical user pathways (card creation, deletion, and cross-column movement). + +## UX & Accessibility +- Ensure strict compliance with WCAG 2.1 AA accessibility guidelines, specifically establishing full keyboard-interactable focus states for grid movement. +- Provide fluid drag-and-drop feedback utilizing a visual "ghost card" element tracking user cursor position seamlessly. +- Implement empty-state UI boundaries: Unpopulated grid columns must display a descriptive "Drop cards here" placeholder state. + +## Security +- Enforce secure token-based authentication handshakes prior to opening active board sessions or rendering API resource endpoints. +- Apply rigorous input sanitization protocols on all free-text input variables (card titles, descriptions) to eliminate cross-site scripting (XSS) injection vectors. + +## Real-Time Collaboration +- Establish dynamic, persistent server connections via modern WebSocket protocols to broadcast multi-user board state updates instantly without complete page document refetches. +- WebSocket state management systems must implement transparent, silent reconnection logic to preserve unsaved local canvas drift during unexpected connection disruptions. +- Conflict Resolution Engine: Concurrent mutations to an individual data record will resolve using a Last-Write-Wins (LWW) protocol, generating an immediate visual notification to the superseded client session. From 2d0387eb036ed0a1bd2579d27dbfc76c56c121bd Mon Sep 17 00:00:00 2001 From: Naveen Kumar B Date: Wed, 3 Jun 2026 17:43:18 +0530 Subject: [PATCH 2/2] docs: write slice 2 card crud specification with cross-user deletion edge case --- .specify/specification/card_crud.md | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .specify/specification/card_crud.md diff --git a/.specify/specification/card_crud.md b/.specify/specification/card_crud.md new file mode 100644 index 0000000000..9284096fd2 --- /dev/null +++ b/.specify/specification/card_crud.md @@ -0,0 +1,32 @@ +# Specification: Card CRUD (Slice 2) + +## Feature: Card Content Management + +### Description +Provides users with the capabilities to create, read, update, and delete individual task cards within board columns to manage daily item workflows. + +### User Stories +- US-01: As a user, I want to create a card inside a column so I can document a new task. +- US-02: As a user, I want to view a card's full details so I can read detailed context descriptions. +- US-03: As a user, I want to modify card details so I can keep task descriptions up to date. +- US-04: As a user, I want to delete a card so I can permanently remove redundant work items. + +### Acceptance Criteria +- AC-01: Clicking "Add Card" opens an inline input field; pressing Enter or clicking "Save" creates the card instantly at the bottom of that column. +- AC-02: Clicking a card title triggers a modal canvas window displaying the full title and markdown-supported description fields. +- AC-03: Editing titles or descriptions triggers an auto-save loop after 500ms of typing inactivity, displaying a "Saved" status indicator. +- AC-04: Clicking the "Delete" action button prompts an explicit confirmation modal window before executing permanent document data erasure. + +### Edge Cases +- EC-01: Submit empty title input field → Reverts field line and highlights container border in red with "Title cannot be blank" validation text. +- EC-02: Lose network connection while editing description field → Freezes editor input box and displays a prominent offline retry banner indicator. +- EC-03: [ADDED FOR EXERCISE] A card is deleted by User A while currently being viewed inside a details modal window by User B → Close User B's open modal panel instantly, clear the element record from their active display view, and trigger a floating toast warning notification stating: "This card has been deleted by another team member." + +### Data Requirements +- Card Input Payload: { title: String, description: MarkdownString, columnId: UUID } +- Card Visual State: { isEditing: Boolean, isModalOpen: Boolean } + +### Non-goals +- No background color formatting customizable per individual card element. +- No historical log archiving or data field revision undo/redo tracking inside the card canvas. +- No file attachment or asset upload support within descriptions.