fix(ui): set lang=ja and add Japanese fonts to sans stack#255
Open
maxx-masa wants to merge 6 commits into
Open
fix(ui): set lang=ja and add Japanese fonts to sans stack#255maxx-masa wants to merge 6 commits into
maxx-masa wants to merge 6 commits into
Conversation
…racts
Quotes via aliceId failed with IBKR error 321 ("symbol must be entered")
for every IBKR contract, and returned all-zeros for delayed-data accounts.
Root cause + fixes:
- UnifiedTradingAccount._expandAliceIdIfNeeded: the override-copy loop only
skipped ''/null/undefined, so `new Contract()`'s default conId=0 clobbered
the conId resolved from the aliceId — the broker received an empty contract.
Skip value===0 (all Contract numeric fields default to 0 == "unset").
- IbkrBroker.getContractDetails: only force the USD currency default when
resolving by symbol; forcing it on conId lookups excluded JPY/TSE listings.
- IbkrBroker.getQuote: hydrate conId-only contracts via reqContractDetails
before reqMktData; request delayed data (reqMarketDataType(3)) so accounts
without a real-time subscription (free-trial/paper) still get prices; fall
back last->close outside trading hours.
- request-bridge: map delayed tick types (DELAYED_BID..DELAYED_CLOSE) and
CLOSE in tickPrice/tickSize, not just real-time BID/ASK/LAST/VOLUME.
- ibkr-types: add `close` to TickSnapshot.
Verified against a live IB Gateway paper session: 7203.T (TSEJ/JPY) and
AAPL both return correct quotes.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…racts Placing a JP-stock paper order and reading it back both failed after the quote fixes: - IbkrBroker.placeOrder: a conId-resolved contract could carry a stale display symbol and the default USD currency, which conflict with what the conId actually is (e.g. NRI/USD vs 4307/JPY) → IBKR error 478. Re-resolve the full contract from a clean conId-only reqContractDetails query before ordering so symbol/exchange/currency always agree. - tool/trading.ts summarizeOrder: orders fetched over HTTP from the UTA service arrive as JSON with Decimal fields serialized to strings, so calling .equals()/.toFixed() on order.totalQuantity threw "totalQuantity.equals is not a function". Rehydrate each Decimal field via a toDec() coercion before formatting. Verified end-to-end against IB Gateway paper: BUY 100 NRI (4307.T) LMT @5200 submitted and reads back as status=Submitted. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ly intervals
getCalendarDays matched intervals with /^(\d+)([dwhm])$/, but the actual
interval enum uses uppercase 1W / 1M / 1Q. So 'W'/'M'/'Q' never matched and
fell through to the 365-day fallback — weekly and monthly history was
silently capped at ~1 year (and the intended "weekly = 5 years" branch on
lowercase 'w' was dead code, since the enum emits 1W). Lowercase 'm'
(minutes) also collided conceptually with months.
Match the real units (case-sensitive so minutes 'm' ≠ months 'M') and give
each a sensible span: days 5y, weeks 10y, months 20y, quarters 30y. Verified:
CLOSE('SPY','1M') now returns 240 monthly bars back to 2006 (was ~13).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CurrencyHistoricalDataSchema had open/high/low/volume/vwap as nullable but
close as a bare z.number(). A single null close bar (common in FX monthly/
weekly series, e.g. USDJPY) made the whole response fail zod validation with
"Expected number, received null". Equity/index/commodity historical models
already mark close nullable; align currency to match. Null bars are dropped
downstream by the indicator data filter.
Verified: CLOSE('USDJPY','1M') now returns 240 monthly bars back to 2006
(previously threw on validation).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…2026-06-01) Document the day's fixes (commits c143cd7, 215007d, 9975a44, 6fb6e6a): JP-stock quote/order/read-back via IBKR paper, extended historical lookback for W/M/Q intervals, and null-tolerant currency historical schema. Includes root causes, verification, and the 5-year SPY/ACWI/NRI comparison artifact. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Switch <html lang> from zh-CN to ja so Chrome stops offering to translate the page, and prepend Japanese faces (Hiragino/Yu Gothic/Meiryo/Noto Sans CJK JP) to --font-sans so Japanese glyphs resolve instead of rendering as missing-glyph tofu. SC fonts kept as trailing fallback for compatibility. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@maxx-masa is attempting to deploy a commit to the luokerenx4's Team Team on Vercel. A member of the Team first needs to authorize it. |
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
<html lang>をzh-CN→jaに変更。Chrome がページを中国語と誤判定して Google 翻訳のポップアップを出す問題を解消。--font-sansの先頭に日本語フェイス(Hiragino / Yu Gothic / Meiryo / Noto Sans CJK JP)を追加。lang="ja"でも日本語グリフが解決され、欠字(豆腐文字)が出なくなる。簡体字フォントは互換のため末尾フォールバックに残置。Test plan
Boundary touch
なし(UI 表示のみ。trading / auth / broker / migrations には触れていない)
🤖 Generated with Claude Code