Commit Graph

59 Commits

Author SHA1 Message Date
481419afc1 ci: add CI pipeline for Rust and TypeScript tests
Some checks failed
CI / TypeScript Lint + Typecheck + Test (push) Has been cancelled
CI / Rust Format + Clippy + Test (push) Has been cancelled
- Gitea Actions workflow with parallel TypeScript and Rust jobs
- TypeScript: bun install, lint, typecheck, test
- Rust: fmt check, clippy, test with Tauri system deps
- Add rust-toolchain.toml to pin Rust 1.93.0 for reproducibility

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-01 14:26:50 -04:00
895181dc8c feat: add search/query utilities, filing type filters, and query history
- src/lib/searchQuery.ts: query parsing (ticker vs company name), form
  type constants, filing item filtering, and error message builders
- src/lib/searchQuery.test.ts: 32 tests covering query classification,
  form type validation, filter toggling, and error messages
- FilingsPanel: quick-filter chips for common SEC form types (10-K,
  10-Q, 8-K, 20-F, etc.) with toggle behavior
- FilingsPanel.test.tsx: 10 tests including new form type commands and
  chip rendering
- src/hooks/useQueryHistory.ts: localStorage-persisted command history
  with deduplication and search (max 50 entries)
- src/hooks/useQueryHistory.test.ts: 5 tests for deduplication logic

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-01 14:25:21 -04:00
f12047052e chore: add linting/formatting config and improve README
- Add ESLint flat config with TypeScript and React hooks plugins
- Add rustfmt.toml with edition 2021 defaults
- Rewrite README with setup instructions, project structure, and features
- Add lint script to package.json
- Install ESLint dev dependencies

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-01 14:10:15 -04:00
e74f92e0f5 docs: add CONTRIBUTING.md with operational guidelines
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-01 13:45:39 -04:00
fc42025ca5 committing to move onto other things 2026-05-01 13:39:58 -04:00
088f6f6e4b Add fullscreen editor modal and secure external links with target=_blank 2026-04-28 00:19:42 -04:00
ddb28cf8cf Merge t3code/expand-inspector-editor: add expandable full-screen editor modal to ResearchInspector 2026-04-27 23:07:57 -04:00
d935ac80ef Add expandable full-screen editor modal to ResearchInspector note body 2026-04-27 23:06:27 -04:00
70fe6efd70 Refactor Research UI into decomposed screen/workbench/rail architecture with dedicated controllers and hooks 2026-04-27 21:48:35 -04:00
682b6509f4 Add rich text editor, chat history, period range selectors, and research workspace management
- Replace textarea with Tiptap-based ResearchEditor in research capture modal and memo workbench
- Add chat history sidebar with restore-to-tab functionality and workspace preferences
- Add period range selectors to Balance Sheet and Cash Flow panels
- Add research workspace rename, archive, stage management, and search API integration
- Refactor SEC EDGAR service for multi-period fetch with mapping support
- Add agent artifacts, background jobs, and prompts modules
- Fix inline mapping editor ISO date validation and mapping modal formula validation
- Improve ConfirmDialog overflow handling and SettingsPage workspace preferences
- Add MemoOutlineRail drag-and-drop reordering
2026-04-26 01:41:59 -04:00
36ac44f9b0 Add SEC filings and financial statement panels 2026-04-24 22:13:56 -04:00
4d133f1964 Add detailed cash flow statement line items 2026-04-24 21:45:38 -04:00
38205f62fe Refactor terminal workspace state and support chat cancellation 2026-04-16 23:56:17 -04:00
5f2c9fb56a Add formula mapping warnings, concept values, and fix panel refresh targeting
- Propagate formula evaluation failures as warnings instead of hard errors
- Populate AvailableXbrlConcept.value from XBRL fact numeric values
- Fix topological sort in-degree direction bug for formula dependency ordering
- Fix mappings refresh to skip non-earnings panels instead of returning null
- Parse cached formula ASTs on service startup to catch parse errors early
- Refactor CommandInput: move command shadow below input for cleaner layout
- Render mapping warnings in EarningsPanel footer
2026-04-16 22:34:58 -04:00
7663e504af Optimize Rust backend for correctness, performance, and idioms
- Fix data consistency bug where replace_ghosts_for_workspace returned
  stale unmutated ghost data instead of the DB-persisted versions
- Replace 11 RwLock .unwrap() calls with proper error propagation via
  read_cache/write_cache helpers to prevent lock poisoning panics
- Add error logging to 3 silently swallowed spawn/scheduler errors
- Replace per-call Vec allocation in get_function with match statement
- Cache 6 regex compilations as LazyLock<Regex> statics
- Cache stop-words BTreeSet and common concepts as LazyLock statics
- Fix O(n*m) merge_unique with HashSet-based membership testing
- Eliminate clone chains in mapping CRUD via ownership transfer
- Change String params to &str where only reading (import_mappings, import)
- Restructure resolver to nested HashMap for zero-alloc borrowed lookups
- Use Arc<str> for streaming event IDs to avoid per-event String clones
- Replace to_ascii_lowercase with eq_ignore_ascii_case (zero-alloc)
- Remove intermediate Vec<f64> allocation in chart summarization
- Add #[non_exhaustive] to public error enums (AppError, ResearchError)
- Implement std::str::FromStr for TargetField instead of inherent method
- Remove 9 unnecessary .to_string() on const store keys
- Add #[must_use] to ~20 pure functions across all modules
- Fix double-clone in save_job, useless_format, needless_borrow,
  unnecessary_map_or, and ambiguous boolean expression
2026-04-16 00:58:05 -04:00
e2d626767c Add custom XBRL concept mappings system with formula editor, portfolio quote caching, and agent config refactoring
Backend:
- New mappings module (storage, service, types, events) for persistent custom XBRL
  concept mappings with formula validation and ticker-scoped concept discovery
- Tauri commands: CRUD for custom mappings, import/export, formula validation,
  and ticker concept listing
- Portfolio service: quote caching with 5-min TTL, event-driven progressive loading
  (loading -> loaded -> ready) so UI can render cached data while fresh quotes fetch
- Agent config: split provider settings into remote/ollama structs, validate API key
  presence at save-time for remote provider routes, clean up test helpers
- Terminal: add /concepts and /mappings commands; /mappings add requires agent approval
- SEC EDGAR: integrate mappings service into lookup for concept enrichment

Frontend:
- MappingEditorModal, FormulaEditor with autocomplete, ConceptSelector, ConceptSuggestions
- MappingsSettingsCard for managing custom mappings in settings
- useMappings and useEarningsMappings hooks with cache-invalidation events
- mappingsBridge and mappingsRefresh utilities, formulaAutocompleteUtils
- Updated EarningsPanel, TerminalOutput, StatementTableMinimal for concept display
- Agent settings UI refactored for dual provider config (remote + Ollama)
2026-04-15 23:15:51 -04:00
fe1fed97c5 Populate null earnings fields with safe margin calculations
Add calculated values for gross_profit_margin, operating_margin, and
other_operating_expenses to provide more comprehensive financial data
matching fiscal.ai methodology.

Implementation:
- Add calculate_gross_profit_margin() function for (Gross Profit / Revenue) × 100
- Add calculate_operating_margin() function for (Operating Profit / Revenue) × 100
- Add calculate_other_operating_expenses() to derive from components
- Include comprehensive unit tests with edge case coverage

Safety features:
- Null propagation using ? operator for missing data
- Division protection with f64::EPSILON checks
- Proper handling of negative values (losses)
- Semantic distinction between Some(0.0) and None

Validation: MSFT FY2024 data shows 68.8% gross margin and 45.6%
operating margin, matching fiscal.ai calculations.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 16:34:38 -04:00
e925bb218d Remove dead CompanyFacts earnings code and eliminate all compiler warnings
Remove ~400 lines of unused code from facts.rs that was left behind after
migrating to the filing-native XBRL approach for the /em command.

- Remove dead earnings functions (build_earnings_periods, etc.)
- Remove unused utility functions (month_abbreviation, duration_value_for_period, etc.)
- Remove unused concept constants (BASIC_EPS_CONCEPTS, COST_OF_SALES_CONCEPTS, etc.)
- Simplify OverlayPeriodKind enum to only keep Any variant
- Fix unused variable warnings in dei.rs and types.rs
- Update test mocks to remove obsolete fields

Result: 0 compiler warnings (down from 35)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 14:50:34 -04:00
56b30dc276 Remove crabrl dependency and fix MSFT DEI fiscal period extraction
Remove crabrl dependency completely:
- Remove crabrl from Cargo.toml dependencies
- Remove crabrl Parser usage from facts.rs and xbrl.rs
- Remove latestXbrlParsed field from SourceStatus across TypeScript and Rust

Improve DEI fiscal period extraction:
- Add fallback logic for missing DEI facts in filings
- Add helper functions to extract fiscal year from period end dates
- Add helper functions to infer fiscal period from filing dates
- Update test fixtures to include proper DEI facts
- Make extraction more robust by using context period information

This fixes the "No eligible annual filings were found for MSFT" error
by making the DEI extraction more tolerant of incomplete metadata.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 14:23:22 -04:00
27dfe629fe Fix local model setup UX and clean Rust warnings 2026-04-11 21:03:05 -04:00
e31c7dd2e2 Support per-flow remote and Ollama routing 2026-04-11 15:22:07 -04:00
4259d54154 Add Ollama provider options 2026-04-11 10:49:26 -04:00
534b154a37 tweaking the research implementation, notes now can be taken in trminal and active workspace selector should be functional 2026-04-11 00:42:11 -04:00
074c40416b refactor: implement unified linear design system with hard-corner components
- Introduce comprehensive CSS variable token system with RGB color values for better opacity handling
- Add terminal-based component variants (bg, border, text, spacing)
- Implement hard-corner component language (border-radius: 0 globally enforced)
- Add research-specific design tokens for workspace components
- Introduce status-aware color tokens (info, success, error, warning)
- Add Tailwind v4 integration with @theme inline configuration
- Create new terminal components: TerminalBadge, TerminalCard, TerminalInput
- Improve mobile responsiveness with touch-friendly targets (44px min) and better spacing
- Enhance accessibility with improved focus states and keyboard navigation
- Add comprehensive responsive breakpoints (xs, sm, md, lg)
- Maintain backward compatibility with legacy CSS variable aliases
- Update all existing components to use new design tokens

This establishes a cohesive design foundation that unifies the terminal,
research, and panel components under a single linear token system while
maintaining the application's distinct technical aesthetic.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 00:17:26 -04:00
9d5e882b5e Fix portfolio research state issues and convert capture to modal
- Fix critical event subscription bug causing stale state when switching workspaces
- Add research notes display to portfolio holdings with expandable note previews
- Implement getNotesByTicker backend command for fetching notes by symbol
- Add portfolio context to terminal tabs showing active portfolio name
- Convert research capture bar to space-saving modal dialog
- Add "New Note" button to research toolbar for quick access
- Improve portfolio switching UX with visual indicators and clear labeling

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 18:42:53 -04:00
6b2d51e56b Codex ended here and GLM took over wish me luck pt.2 2026-04-09 17:44:28 -04:00
3a442f81f4 Codex ended here and GLM took over wish me luck 2026-04-09 17:43:55 -04:00
af6eb242be Removed old documentation 2026-04-09 16:25:11 -04:00
edcd8d7401 Update terminal components and command specifications
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 16:14:41 -04:00
1fc677d2a6 Implement research workflow and frontend wiring 2026-04-09 15:58:50 -04:00
7696464b64 feat(news): add news ingestion and panel integration
Co-Authored-By: Oz <oz-agent@warp.dev>
2026-04-08 23:23:38 -04:00
51e2f74d5b chore: sync main with architecture review follow-ups 2026-04-08 19:16:24 -04:00
e0079e2ca0 Merge remote-tracking branch 'origin/main' 2026-04-08 19:15:23 -04:00
9b856107b0 fix(ui): Fix terminal response area clipping on right side
- Add overflow-x-hidden to prevent horizontal scrolling at container level
- Add break-words to content container for proper word breaking
- Add break-words to plain text and markdown rendering
- Add break-all to links and inline code for long content
- Ensure all content stays within viewport width

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 19:07:44 -04:00
368279552c Merge branch 't3code/codebase-architecture-review' into main 2026-04-08 19:01:11 -04:00
e8a5ace693 Fix streaming, portfolio persistence, and app shell 2026-04-08 19:00:46 -04:00
0fbdd32432 Order terminal agent transcript by streamed events 2026-04-06 23:43:36 -04:00
faa5b2198a Add tool-backed terminal chat and markdown replies 2026-04-06 22:16:52 -04:00
a7cb435206 Feed active panel context into agent chat 2026-04-06 14:22:08 -04:00
21cbce8a41 Make portfolio state reactive in sidebar and improve command autocomplete controls 2026-04-06 00:57:12 -04:00
91cc3cc3d4 Implement portfolio management backend and terminal UI 2026-04-05 22:36:18 -04:00
bbe94c06a1 test(terminal): fix Google Finance chart fixture 2026-04-05 21:15:22 -04:00
c37857cacc refactor(ui): streamline terminal panels and financial views 2026-04-05 21:12:22 -04:00
8689e3ddd1 feat(sidebar): track recent ticker lookups 2026-04-05 21:11:53 -04:00
d89a1ec84b feat(settings): add SEC EDGAR configuration controls 2026-04-05 21:11:23 -04:00
cfc5a615e3 feat(terminal): add Google Finance and SEC EDGAR backends 2026-04-05 21:11:05 -04:00
d62b02482e working search 2026-04-05 00:17:26 -04:00
1d93535551 Add dedicated settings workspace 2026-04-04 21:04:05 -04:00
457ad5fe3a removing dirty changes 2026-04-04 14:11:26 -04:00
1dc7bb3391 Reduce live search requests for exact symbol lookups 2026-04-04 14:09:10 -04:00