b140a1163d472fdbe97dce7b7ebbef8062f42654
Yahoo Finance auth fix (root cause of empty Setups tab): - Options endpoint has required cookie+crumb auth since 2024; our old client sent no auth and got 401, which try? silently turned into nil. - New flow in ensureAuth(): (1) GET finance.yahoo.com/quote/AAPL/ with a desktop Chrome User-Agent to seed the A1S session cookie into URLSession.shared cookie storage, (2) GET /v1/test/getcrumb with that cookie, cache the crumb for 1 hour. All options API calls now append ?crumb= and automatically retry once on 401. - Switched User-Agent from mobile Safari to desktop Chrome — Yahoo Finance returns different (broken) auth behaviour for the mobile UA on options. - Price history endpoint still works without crumb (200 confirmed) so it uses a plain request; only the options endpoints go through fetch(). Error surfacing: - RecommendationsViewModel.refresh() now uses do/catch instead of try? so failures are printed to console and surfaced via vm.error - RecommendationsView shows a wifi-exclamationmark error card with a Retry button when vm.error is set Autocorrect disabled: - Added .autocorrectionDisabled() to the ticker TextField in AddPositionSheet (PortfolioView) and LogTradeSheet Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Description
No description provided
Languages
Swift
70%
Python
30%