Feat/dynamic match fetch#1
Open
waliviqas wants to merge 22 commits into
Open
Conversation
Adds GameFetchService that pulls live rosters, stats, and injury news from ESPN/MLB/NHL/Google News so the match cache is built on demand from a team name instead of shipping hardcoded data. TeamSetupView drives the flow on first launch and from the sidebar. Research center gains Stats-First, Story-First, and Tactical spotting board modes plus a commentator style picker. Network client entitlement enabled for live fetches. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Closes the three gaps between GameFetchService and src/data/FetchGame.swift: fetchNewsForPlayer pulls top-3 Google News headlines for the first six players per side, makeStoryline picks the strongest signal (status → news headline → top stat → position fallback), and makeMatchupNote populates the Tactical card. Story-First and Tactical modes now carry real content when the cache is built dynamically. Adds NewsService (port of src/data/News.swift) exposing fetchLeagueNews, fetchAllSportsNews, and fetchPlayerNews so the Research UI can surface a live news feed — registered in the Xcode project under Services. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a dedicated News sidebar tab that pulls live headlines across the major leagues via NewsService and groups them by league with filter chips. A "Synthesize to Research Notes" button packages the current list plus loaded match context (teams, key players) and sends it to gemini-2.5-flash for a broadcaster-style digest, which is date-stamped and appended to the current session's notes so it's available offline during the game. GeminiService reads the API key from ~/Library/Application Support/BroadcastBrain/gemini_key.txt — outside the repo to avoid ever committing it. Missing key surfaces a guidance error instead of a blank failure. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
First launch now always forces the team setup flow — the bundled Argentina vs France cache is no longer a silent fallback, so every user starts with their own match instead of demo data. Commentator style picker is sport-neutral: dropped the "5.2 xG / 4-3 Formation" soccer-specific previews for mode icons, rewrote the three descriptions to state what each mode actually does (numbers lead / narrative leads / matchups lead). Research tab gains a NOTES drawer: a floating toggle in the top-right of any spotting mode slides in an editable notes panel bound to the current session, so synthesized digests from the News tab are finally visible next to the board. News tab gains a SELECT ARTICLES toggle with per-row checkboxes. When active, clicks toggle selection instead of opening the article; the synthesize button updates its label and count; selection clears on success. Status messages are granular — Reading N headlines → Writing the digest → Appending to notes → Saved. GeminiService branches its prompt on curation: curated picks drop match context and force one bullet per headline, bulk synthesis keeps the match-prefer/league-fallback behavior. Error surface shows the real sandbox path so key placement is obvious. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Conflicts: # BroadcastBrain/ContentView.swift # BroadcastBrain/Stores/AppStore.swift # BroadcastBrain/Views/Components/Tokens.swift # BroadcastBrain/Views/SidebarView.swift
…hSheet — incompatible with TeamSetupView flow)
…ewsTabView/News surface on top; light-mode setup screen with stronger dots + full coverage
… spacing, 28% opacity)
…OTES now lives in StatusBar trailing slot (no overlap with LIVE)
…lay name, usage descriptions)
Removes the "LANDING PAGE" FooterPillButton and its collapsed-sidebar globe IconButton — both pointed at http://localhost:3000 which isn't where the landing page lives. Keeps the light/dark toggle and the expand-sidebar icon. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Conflicts: # BroadcastBrain.xcodeproj/project.pbxproj # BroadcastBrain/Views/SidebarView.swift
…r3294/YC-Hackathon into feat/dynamic-match-fetch # Conflicts: # BroadcastBrain/Views/SidebarView.swift
… audio
Teammate is removing Apple's SFSpeechRecognizer from the macOS app
in favor of Gemma 4's native audio input (E4B on Cactus). The
landing page's architecture narrative needs to match that story.
ArchitectureDiagram:
- dropped the "APPLE STT" pipeline stage; COMMENTATOR now flows
directly into GEMMA 4 · CACTUS
- updated gemma stage subtitle to call out native audio input
- rewrote the supporting paragraph (no more "Apple captures audio,
transcribes on-device")
WhyWeWin: "Apple STT" → "Gemma 4 (native audio in)" in the
voice-to-action latency bullet.
Features: Live co-pilot body now credits Gemma 4 with taking audio
natively, not Apple.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces the placeholder SVG mockups with actual captures of the running app so the landing page shows the real UI (BROADCAST BRAIN sidebar, live transcript + stat cards pane, spotting board with ARG vs FRA stat cards). spotting-board-preview.png — Squads/spotting board (ARG vs FRA) live-dashboard-mockup.png — Live pane, ready for kick-off Features.tsx: feature-01 and feature-02 preview refs now point at the .png files. Old SVGs kept on disk for now in case we want to roll back. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drops the bundled ARG/FRA fallback that the main merge re-introduced. The AppStore now reads only the user-saved cache; no cache means showingSetup triggers automatically on launch, so every user builds their own match instead of landing on the hardcoded sample. Adds persistCache to save the user's fetched cache under Application Support so later launches skip setup. Gemini curated-synthesis prompt rewritten to demand a structured block per selected article: numbered, with WHO / WHAT / ANGLE fields forcing concrete facts (names, stats, implication). Prevents the "one vague bullet for three articles" degeneracy that was showing up in the Notes drawer. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…eat/dynamic-match-fetch
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.
Dynamic match cache + Research spotting modes + News tab with Gemini synthesis