feat: add Citations and WatchlistChat components, integrate with API
- Implemented Citations component to display citation data. - Created WatchlistDrawer and ChatSidebar components for managing watchlists and AI chat functionality. - Integrated API calls for watchlist management and chat interactions. - Updated index.tsx to include new components in the main application layout. - Added API client in lib/api.ts for structured API interactions. - Developed Alerts, Dashboard, Portfolio, Routines, Screener, and Report pages with relevant data fetching and UI components. - Introduced styles in tokens.css for consistent theming across the application. - Configured TypeScript and Vite for project setup and development.
This commit is contained in:
1 parent
0db2cf28b3
commit
8c184ccae1
111 files changed
+12349
-62
No files matched your search
@@ -0,0 +1,35 @@
|
||||
package store
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
// Seed loads the historical week; row counts must match the fixture manifest.
|
||||
func TestSeed(t *testing.T) {
|
||||
db, err := Open(t.TempDir() + "/seed.db")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer db.Close()
|
||||
st, err := db.SeedFromDir("../../tests/fixtures", "demo")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if st.Snapshots != 23 {
|
||||
t.Fatalf("snapshots = %d, want 23", st.Snapshots)
|
||||
}
|
||||
if st.Watchlist != 2 {
|
||||
t.Fatalf("watchlist = %d, want 2", st.Watchlist)
|
||||
}
|
||||
if got := db.SnapshotCount("daily"); got != 1 {
|
||||
t.Fatalf("daily snapshots = %d, want 1", got)
|
||||
}
|
||||
// Idempotent re-seed.
|
||||
st2, err := db.SeedFromDir("../../tests/fixtures", "demo")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if st2.Snapshots != 0 {
|
||||
t.Fatalf("re-seed snapshots = %d, want 0", st2.Snapshots)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user