Two bugs in StockChartView triggered by opening a Korean stock's chart:
1. Top whitespace: DropdownView used ZStack to overlay stockListView
(opacity 0 when chart shown) and StockChartView. ZStack sized to
max(list, chart) — list at ~720 tall pushed the ~500-tall chart to
vertical-center, leaving ~200 of blank above the chart. Replace
ZStack with plain if-let so list and chart are mutually exclusive
in the layout tree.
2. Stat-row line wrap: fmt used %.3f always, producing 'KRW 284000.000'
which overflowed the narrow stat columns and wrapped to two lines
('284000.0' / '00'). Scale precision by magnitude: ≥1000 → integer,
≥10 → 2 decimals, else 3 decimals.
v1.1.7 changed isTradingHour to always return true on weekdays (the US
four-session + overnight coverage spans 24h). Two tests still asserted
the pre-v1.1.7 lunch-break / after-close = not-trading behavior and
have been failing locally for months; CI's new Run Tests step caught
them and aborted the v1.3.5 release.
Update both tests to assert the current desired behavior (trading) and
add a comment explaining the rationale.
UI fix (SDK-agnostic):
- SettingsView height 480 → 620 so the settings mode panel size matches
list mode at maximum. Avoids MenuBarExtra's NSPanel not shrinking when
switching between list and settings views.
- Drop the .id(showSettings) hack — it forced view rebuild but the panel
is managed by AppKit and does not respond to SwiftUI view recreation.
CI hardening:
- Use maxim-lobanov/setup-xcode@v1 with latest-stable so the runner Xcode
is as close to local (Xcode 26.5) as available, minimizing SwiftUI SDK
behavior drift.
- Run xcodebuild test before building the DMG; release will fail-fast on
test regressions instead of shipping broken binaries.
Root cause analysis of v1.3.4 regression:
Local Xcode 26.5 produced a 5.2MB binary linking to macOS 26 SwiftUI
symbols; GH macos-latest with default Xcode 16 produced a 5.0MB binary
linking to macOS 15 SwiftUI. The .id() hack happened to look correct in
the SDK 26 build but not in SDK 15 — same source, different runtime
behavior. The height:620 approach works in both.
MenuBarExtra(.window) caches the NSPanel size from list mode (~720 with
many stocks) and does not auto-shrink when switching to the 480-tall
settings view, leaving a large blank gap. Adding .id(showSettings) tells
SwiftUI to rebuild the view subtree on mode change, prompting the panel
to recompute its size from the new content.
release: 1.3.3 → 1.3.4
The opaque background added in v1.3.2 exposed extra empty space below
the toolbar — the panel was sized larger than the VStack content.
Adding .fixedSize(horizontal: false, vertical: true) before the
background makes the panel size to its actual content.
release: 1.3.2 → 1.3.3
MenuBarExtra(.window) on the new SDK defaults to a vibrant translucent
material, letting whatever is behind bleed through. Apply
Color(.windowBackgroundColor) to the root VStack so the panel reads as
a normal opaque window in both light and dark mode.
release: 1.3.1 → 1.3.2
- Restore corrupted project.pbxproj from v1.2.5
- Add Quote.isToday: compare updateTime date with today (Beijing timezone)
- effectiveDailyPnl returns nil when quote data is not from today
- Prevents stale daily PnL on holidays/weekends
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add Quote.isToday: compare updateTime date with today in Beijing timezone
- effectiveDailyPnl returns nil when quote data is stale (not from today)
- Prevents showing yesterday's change as today's daily PnL on closed markets
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- New Watchlist model: named virtual portfolios with per-stock cost/shares
- Watchlists persisted to watchlists.json, active ID in settings
- AppState: effective cost/shares/PnL methods that respect active watchlist
- Settings: create/delete/switch watchlists, edit writes to active watchlist
- ProfitSummaryView shows active watchlist name
- UI alignment fixes for toggle and text field padding
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Use ZStack overlay for chart instead of if/else branch swap
- ScrollView stays mounted while chart is shown (opacity toggle)
- Scroll position preserved when returning from chart view
- Panel reopen naturally starts from top
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- New setting: "持仓股单独分组置顶" toggle
- When enabled, stocks with holdings are grouped into a "持仓" section at top
- Remaining non-held stocks still grouped by A/HK/US market as usual
- StockGroupView supports custom title for holdings group
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- ET 20:00-24:00: allow Sunday (wd=1) as Monday overnight start
- ET 00:00-04:00: allow Saturday (wd=7) as Friday overnight continuation
- Fixes no data shown on Sunday evening when overnight API has live data
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add PythService.swift: fetch overnight prices from us-overnight-stock-api.vercel.app
- Restore "夜盘" session in usMarketSession() (ET 20:00-04:00)
- Parallel fetch Sina + Pyth during overnight, merge once to avoid UI flicker
- Clear stale after-hours extendedPrice before applying overnight data
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove "夜盘" from usMarketSession(), only keep 盘前/盘中/盘后
- Night session (ET 20:00-04:00) has no free real-time data API
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fallback to extended price when main price is 0 during night session
- Extend US stock refresh to cover all sessions (weekday all-day)
- Regenerate app icons with 4x supersampling for smooth rounded corners
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Show NSAlert with version info when new version found
- User must confirm before download begins
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add SHA-256 hash verification for downloaded DMG in auto-update
- Fix shell command injection: use positional args instead of path interpolation
- Add log rotation (truncate to 500KB when exceeding 1MB)
- Replace critical try? with do/catch + logToFile for data persistence
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix "daily + total" PnL mode only showing daily: use single Text concatenation
- Move PnL options into status bar picker (daily / total / both), hide icon in PnL mode
- Add rounded corners to app icon for macOS consistency
- Add LaunchAgent plist fallback for launch-at-login on Intel Macs
- Remove StatusBarPnL enum, use statusBarStockId special values instead
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add setting to choose status bar PnL: none / daily / total / both
- Fix launch-at-login: remove unconditional register() on every launch
- Add error logging for SMAppService register/unregister
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Show floating PnL percentage for each stock and portfolio summary
- Show daily/total PnL percentage in profit summary view
- Replace manual GitHub download with in-app auto-update (download DMG, mount, replace, relaunch)
- Disable app sandbox for Process support (non-App Store distribution)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- StockChartView: mark 盘前/盘中/盘后 with colored background zones and text labels for US stocks
- UpdateChecker: check latest release via GitHub API, prompt user to download if newer version found; semantic version comparison to avoid false positives
- SettingsView: add 关于 section with version and 检查更新 button; hide scrollbar (.never)
- DropdownView: hide scrollbar (.never)
- ProfitSummaryView: replace opaque white background with subtle transparent tint
- project.pbxproj: normalize MARKETING_VERSION to 1.0.0 (three-part semver)
- README/README_CN: add main screenshot
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>