Skip to content

chore: Formatting - bring .prettierrc over from cdr/m - #9

Merged
bryphe-coder merged 3 commits into
mainfrom
bryphe/chore/port-prettier-config
Jan 6, 2022
Merged

bryphe-coder merged 3 commits into
mainfrom
bryphe/chore/port-prettier-config

Conversation

@bryphe-coder

Copy link
Copy Markdown
Contributor

This brings over the same .prettierrc we used in cdr/m, and runs the formatter w/ the new settings

@bryphe-coder bryphe-coder self-assigned this Jan 6, 2022
@bryphe-coder
bryphe-coder requested a review from kylecarbs January 6, 2022 15:04
Comment thread .github/workflows/coder.yaml Resolved
@bryphe-coder
bryphe-coder merged commit 2769f4c into main Jan 6, 2022
@bryphe-coder
bryphe-coder deleted the bryphe/chore/port-prettier-config branch January 6, 2022 21:02
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants