Repository navigation
chore: Formatting - bring .prettierrc over from cdr/m - #9
Merged
Merged
Conversation
kylecarbs
approved these changes
Jan 6, 2022
Yonaben99
pushed a commit
to Yonaben99/coder
that referenced
this pull request
Sep 22, 2026
…gration Real, tested IBKR Client Portal Gateway integration behind the PortfolioDataSource abstraction from Phase 1: session management (tickle heartbeat, gateway-reachable/connected/authenticated tracked as distinct states), account discovery with per-user selection (no hardcoded account ID), account summary/positions/allocation mapped from IBKR's documented response fields, and market data for held positions. Every response carries a live/cached/unavailable envelope (LiveDataStatus gains "cached") so a stale value is never shown as live. Errors are classified into a safe taxonomy before reaching routes or logs — no raw IBKR error body is ever exposed. No IBKR password or 2FA code is stored anywhere; the gateway's own browser-based login is the only supported auth path for individual accounts, documented in docs/IBKR_INTEGRATION.md along with the endpoints used, refresh strategy, and known Phase 2 limitations (no WebSocket streaming, no performance history yet). Frontend: Home/Portfolio/Position Detail now render real IBKR data with per-metric source/status/timestamp; new Settings -> IBKR page with a working "Test IBKR Connection" button and setup instructions. Also fixes a latent bug: apiClient.post() always sent Content-Type: application/json even with no body, which Fastify rejects on a bodyless POST (surfaced by the Test Connection button). Live authentication could not be verified from this sandbox: it has no path to run/authenticate a real gateway (no outbound access to IBKR's servers, no browser for the required 2FA login). Architecture, 55 new unit tests (fixtures clearly labeled synthetic, connection state machines exercised via an injected fake HTTP client), and a 10-check browser smoke test against the running app all pass; see docs/IBKR_INTEGRATION.md coder#9 for exact steps to connect a real account. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Msvf2D4V6R9A854aSRgNyv
Yonaben99
pushed a commit
to Yonaben99/coder
that referenced
this pull request
Sep 22, 2026
…I, read-only)
Real tool-calling AI agent behind the AIProvider abstraction, using
OpenAI's Responses API (OpenAIProvider). PortfolioAiAgent is
provider-agnostic and orchestrates an 11-tool loop (getAccountSummary,
getPositions, getPosition, getPortfolioAllocation,
getPortfolioPerformance, getMarketData, getRecentTrades, getOpenOrders,
getHistoricalPortfolioSnapshots, getRiskMetrics, getPortfolioContext),
each calling Phase 1/2's existing PortfolioDataSource /
IbkrPortfolioDataSource / MarketDataSource services rather than IBKR
directly, and each returning the same LiveData<T> envelope Phase 2
established. Capabilities that don't exist yet (trades, orders,
snapshot history, risk) are real functions returning an honest
"unavailable" result, never fabricated data.
The system prompt defaults responses to Hebrew, requires every claim
to be labeled FACT/CURRENT DATA/ANALYST ESTIMATE/AI
INTERPRETATION/SCENARIO/UNCERTAINTY, and forbids answering
current-state questions from conversation memory alone. Conversations
persist to the existing AIConversation/AIMessage schema with per-user
ownership enforced.
Also fixes a related bug the AI chat surfaced: apiClient.post() with
no payload sent no body at all, which fails schema validation on
routes expecting a JSON object (even one with no required fields).
post() now always sends a real body (default {}), fixing this for
every current and future caller rather than patching one call site.
No live OpenAI call was possible from this sandbox (no
OPENAI_API_KEY here, confirmed before implementation) — verified via
97 backend unit/integration tests (fixtures clearly labeled synthetic,
the "not configured" path exercised for real, no test pretends OpenAI
is connected) and an 11-check browser smoke test showing the full
flow end-to-end with an honest Hebrew "not available" reply. See
docs/OPENAI_INTEGRATION.md coder#9 for exact live-test setup steps.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msvf2D4V6R9A854aSRgNyv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This brings over the same
.prettierrcwe used incdr/m, and runs the formatter w/ the new settings