Skip to content

Strip comments down to section headers and a few warnings - #2

Merged
Spottq merged 1 commit into
mainfrom
claude/strip-comments-rh3xyo
Oct 10, 2026
Merged

Spottq merged 1 commit into
mainfrom
claude/strip-comments-rh3xyo

Conversation

@Spottq

@Spottq Spottq commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Before: the code carried about 1,360 comment blocks (1,277 in Kotlin, 80 in XML, the rest in the ProGuard rules and the baseline profile), most of them restating what the code below already says.

After: about 150 are left: the section headers, a dozen one-line warnings and the licence attributions. 139 files, about 2,900 lines lighter; the app itself is unchanged.

Merge #1 first. This PR is stacked on #1's branch so it also cleans the code #1 adds, the lock-screen standings widgets included. If #1's branch is kept after its merge, switch this PR's base to main before merging it.

How: a script that lexes Kotlin properly (nested block comments, string templates, raw strings) removed the comments, and a second one checked the result against the base: with comments dropped, every Kotlin file lexes to the same tokens with the same line breaks (bar one empty catch block now written as {}), every XML file parses to the same tree, and the ProGuard and baseline-profile rules are the same lines. All 226 unit tests pass before and after.

What stays besides the headers:

  • F1SignalRClient: negotiate must not inherit the socket's infinite read timeout; unchanged snapshots still get re-emitted for the composite's watchdog.
  • SessionResultsStore: bump VERSION on every mapping change.
  • AutoFollow: the alarm is handled synchronously in onReceive.
  • LiveUpdateService: every start but ACTION_STOP must call startForeground(); the accent is a span, not setColor().
  • F1Widget, StandingsWidget: padding instead of a Spacer (a Glance Column holds at most 10 children), the One UI blur, and the receiver that keeps its first name.
  • SamsungLockWidgetLarge, StandingsLockWidget: hidden views are set both ways. styles_lock_standings.xml: the title line is dashes as text so the host recolours it.
  • The manifest: specialUse rather than dataSync. app/build.gradle.kts: release builds are signed with the debug key.
  • The MIT attributions for code adapted from twidget, blur-widget-demo and Codex-Meter.

@Spottq Spottq self-assigned this Oct 9, 2026
@Spottq
Spottq force-pushed the claude/strip-comments-rh3xyo branch 2 times, most recently from a25107c to 1770004 Compare October 9, 2026 22:28
The code carried about 1,360 comment blocks, mostly KDoc that restated
a function's name or narrated the lines below it. About 150 stay:

- the "// ---- name" dividers in long files and the group headers in
  the manifest, string resources and ProGuard rules;
- a one-line warning where the code alone invites a wrong "fix": the
  negotiate read timeout, the results cache's version bump,
  startForeground() on every start, Glance's 10-children limit, the
  One UI blur, the widget receiver's original name, debug signing on
  release builds and the like;
- the MIT attributions for code adapted from twidget, blur-widget-demo
  and Codex-Meter.

Only comments and blank lines change. With comments dropped, every
Kotlin file lexes to the same tokens with the same line breaks (bar one
empty catch block now written as {}), the XML files parse to the same
trees and the ProGuard and baseline-profile rules are the same lines.
All 226 unit tests pass before and after.
@Spottq
Spottq force-pushed the claude/strip-comments-rh3xyo branch from 1770004 to 88db7c0 Compare October 9, 2026 22:58
@Spottq
Spottq changed the base branch from claude/project-thread-sfj346 to main October 10, 2026 09:35
@Spottq
Spottq merged commit 26bf358 into main Oct 10, 2026
1 check passed
Spottq added a commit that referenced this pull request Oct 10, 2026
- Merged #1 and #2: tyre stints and pit stops in the expanded driver row,
  the title-fight line in both standings tables, three home-screen
  standings widgets and their 2x2 lock-screen versions, CI, and the
  comment cleanup.
- Driver names: the short name takes the initial of the name a driver
  races under, so Jolpica's "Andrea Kimi" Antonelli reads "K. Antonelli"
  in the standings, results and live timing (DriverNames).
- Live Update on Android 17: the leader's metric is labelled "P1" like
  the other cells; the lap count stays only in the title.
- README: the standings widgets, tyres and pit stops, the title line.
- Version 1.2 (versionCode 4).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants