Initial commit: Brachnha Insight project setup

- Next.js 14+ with App Router and TypeScript
- Tailwind CSS and ShadCN UI styling
- Zustand state management
- Dexie.js for IndexedDB (local-first data)
- Auth.js v5 for authentication
- BMAD framework integration

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Max
2026-01-26 12:28:43 +07:00
commit 3fbbb1a93b
812 changed files with 150531 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
**🔥 CODE REVIEW FINDINGS, Max!**
**Story:** `3-1-history-feed-ui.md`
**Git vs Story Discrepancies:** Git repository not detected (Manual verification performed). New files verified.
**Issues Found:** 2 High, 1 Medium, 0 Low
## 🔴 CRITICAL ISSUES
- **Syntax Error in Production Code**: `src/components/features/journal/HistoryFeed.tsx` (Line 27) contains a syntax error: `const loading = useHistoryStore((s) => s.loading));` (extra closing parenthesis). This prevents the app from compiling.
- **Incorrect Sorting Logic (AC Violation)**: `DraftService.getCompletedDrafts` sorts by Primary Key (ID) instead of `completedAt`. The query `.where('status').equals('completed').reverse()` uses the `status` index, which falls back to ID sorting. This means drafts created earlier but completed later will appear at the bottom, violating "newest first" (by completion date) requirement.
## 🟡 MEDIUM ISSUES
- **Inefficient Index Usage**: The Schema V4 in `src/lib/db/index.ts` adds `completedAt` as a simple index (`status, completedAt`), but a compound index `[status+completedAt]` would be more efficient and allow precise sorting/filtering in one query.
## 🟢 LOW ISSUES
- None found.
I have identified these issues. Please select an action:
1. **Fix them automatically** - I'll fix the syntax error and correct the sorting logic (updating schema if needed).
2. **Create action items** - Add to story Tasks/Subtasks.
3. **Show me details** - Deep dive into values.