Repository navigation
feat(console-api): inbox, account drafts and performance contracts - #669
Merged
Merged
Conversation
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
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.
Summary
Add stable backend contracts for the console inbox, account drafts and performance reads. Keep the existing UI and save routes compatible.
Why
A console frontend needs structured differences, stored history and explicit data availability without interpreting technical evidence or treating missing financial data as zero.
Changes
GET /api/decisions-inboxGET /api/owner-decisions/historyGET /api/accountsGET /api/account-settings/diff,GET /api/account-settings/historyPOST /api/account-settings/draftGET /api/performance/calendar,/summary,/returns,/assets,/holdings,/tradesContracts:
web/strategy-switch-console/frontend/src/api/contracts.tsandweb/strategy-switch-console/contracts/console-api.schema.json. Reference:docs/console-api.mdanddocs/console-performance-charts.md.Move the existing chart calculations into a shared Worker/frontend module, preserving the frontend import path and bundle output. Extend the loopback synthetic demo with every endpoint and ready, empty, partial, stale, not-connected, read-failed and conflict scenarios. No runtime dependency is added.
Testing
Risk and rollback
Changes are additive backend projections and a draft-only save alias. Existing read routes, exact receipts and four UI saves remain supported. Revert this change to remove the new contracts.
No trading, strategy, risk, RECONCILE_ONLY, unknown-result guard, secret, IAM, permission or authentication behavior was changed. No real account/market data are committed, no financial values are fabricated, and no new upstream source is called. There are no batch actions. Production verification is read-only.
Breaking changes
None.