Repository navigation
chore(ui): remove dead banner ViewBuilder params from the Daily hubs - #1099
Merged
Merged
Conversation
Drop the `Banner` generic and the `banner:` param from DailyHubShellView, DailyHubView and MinesweeperDailyHubView. No production caller has passed one since #1020; the banner lives in the shared tabViewBottomAccessory. - BannerSlotDarkBandRegressionTests passed a banner via trailing closure; it now reconstructs the old in-shell composition so the #851 no-band pin stays (base vs head rendered PNG byte-identical). - 29 assertViewStructure TXT baselines: line 1 only (root type loses the generic argument), spliced rather than re-recorded so the macOS 27 renderer drift (#1097) is not baked in. No PNG changes. Closes #1096 part of #1014 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Owner
Author
|
PM review record, head
|
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.
Closes #1096
part of #1014
What
Drop the
Bannergeneric and thebanner:ViewBuilder param fromDailyHubShellView(GameShellKit),DailyHubView(SudokuKit) andMinesweeperDailyHubView(MinesweeperKit), plus the two forwarding call sites. No production caller has passed one since #1020; the banner lives in the sharedtabViewBottomAccessory. Today-case comments in bothLive+TabRoots.swiftare rewritten as mirrors and no longer describe a dead param. GameShellKit stays zero-dependency.Kept on purpose: the now single-child
VStack(spacing: 0)inDailyHubShellView.body, so the structure TXT moves on line 1 only (PM-accepted).Finding: one test DID pass a banner
BannerSlotDarkBandRegressionTests(the #851 dark-band pin) builtDailyHubView(viewModel:) { BannerSlotView(…) }through a trailing closure, so the issue'sbanner:regex could never match it. PM ruling (A): keep the pin, reconstruct the pre-#1024 in-shell composition in the fixture (VStack(spacing: 0) { DailyHubView; BannerSlotView }.background(page token)). Proof it is faithful: base-rendered vs head-rendered PNG forpostFix_themedBackground_dailyHubDarkMode_bannerOpen_noBandarecmpbyte-identical.Other test touches:
DailyHubViewTabReturnRetryTests.swiftDailyHubView<EmptyView>→DailyHubView(compile fix).DailyHubShellViewGenericityTestsneeded no edit — its 3 sites infer the generics.Snapshot changes — 29
.txt, line 1 only, 0 PNGgit diff --stat origin/main -- '**/__Snapshots__/**'→ 29 files, 1 insertion + 1 deletion each, all.txt.DailyHubViewTests(10)…GV8SudokuUI12DailyHubViewVS_9EmptyView_GVS_30_EnvironmentKeyWritingModifier…GS5_……V8SudokuUI12DailyHubViewGVS_30_EnvironmentKeyWritingModifier…GS4_…TodayTabViewTests(5)…TodayTabHostO8SudokuUI8AppRouteGVS4_12DailyHubViewVS_9EmptyView__GVS_30_…GS8_……TodayTabHostO8SudokuUI8AppRouteVS4_12DailyHubView_GVS_30_…GS7_…MinesweeperDailyHubSnapshotTests(9)…NavigationPathGV13MinesweeperUI23MinesweeperDailyHubViewVS_9EmptyView__GVS_30_…GS7_……NavigationPathV13MinesweeperUI23MinesweeperDailyHubView_GVS_30_…GS6_…MinesweeperTodayTabViewTests(5)…TodayTabHostO13MinesweeperUI8AppRouteGVS4_23MinesweeperDailyHubViewVS_9EmptyView__……TodayTabHostO13MinesweeperUI8AppRouteVS4_23MinesweeperDailyHubView_…The root type loses its
EmptyViewgeneric argument; the mangling substitution indices after it renumber (e.g.GS5_→GS4_,GS8_→GS7_,GS7_→GS6_); exact prefixes vary per fixture wrapper. Store-frame and ASC-emit suites are green and their baselines untouched.Spliced, not re-recorded. This host is on macOS 27.0 (#1097): all 29 files are already red on clean
origin/mainfrom renderer drift (line 4NSClipView→SwiftUI.HostingClipView, or a 1pt_FocusRingViewy-shift). A record-mode run would have baked that drift into 29 baselines. Instead each file = head-rendered line 1 + committed lines 2+. Proofs:origin/main, 29/29.diff(spliced, head-rendered)==diff(origin/main committed, base-rendered)— drift lines only, no line 1.Base vs head (no-record), same commands and exact filters, sequential
Base = clean detached tree at
331b4de7. Post = this branch after the splice.--filter DailyHub(76)--filter TodayTab(5)--filter ASCScreenshotEmit(9)--filter BoardLoaderViewDailyPrecheckTests(6)--filter BannerSlotDarkBandRegressionTests(1)These runs are red, and red identically on base — they are not green.
#1097 (environment) — base-identical failures, not from this PR
DailyHubViewTests10,TodayTabViewTests5,MinesweeperDailyHubSnapshotTests9,MinesweeperTodayTabViewTests5,BannerSlotDarkBandRegressionTests1) + the drift lines in the same 29 TXT.ProgressScreenTests,MinesweeperCompletionSnapshotTests,MinesweeperPracticeHubSnapshotTests,MinesweeperControlClusterSnapshotTests,MinesweeperBoardLoaderViewFailedExitTests.cmpbyte-identical base↔head; 29/29 TXT differ at exactly1c1. Zero PNG failures exist only at head. No PNG was re-recorded.Positive control for the
banner:searchgit grep -n -E '(^|[^A-Za-z_])banner:' -- '*.swift'origin/main: hits inDailyHubShellView.swift(:65, :94),DailyHubView.swift(:66, :80, :307),MinesweeperDailyHubView.swift(:48, :58, :174) and the Today-case comments in bothLive+TabRoots.swift.Live+TabRoots.swift/LiveRouteFactory.swiftfiles are the Practice/Settings history comments from feat(monetization): #1024 follow-through after #1062 merges — merge main, simulator evidence, open PR #1080/feat(monetization): move banner to tabViewBottomAccessory, with tab-bottom fallback #1024, out of scope here.Other gates
swiftlint --stricton changed Swift files: 0 violations.scan:hygiene, gitleaks: pass.** BUILD SUCCEEDED **, Minesweeper** BUILD SUCCEEDED **(aftertuist generate).🤖 Generated with Claude Code