Skip to content

feat(swift-ios): embed an exact build changelog with links - #5969

Draft
saphid wants to merge 7 commits into
pingdotgg:t3code/rebuild-mobile-app-swiftfrom
saphid:saphid/swiftui-changelog-v2
Draft

feat(swift-ios): embed an exact build changelog with links#5969
saphid wants to merge 7 commits into
pingdotgg:t3code/rebuild-mobile-app-swiftfrom
saphid:saphid/swiftui-changelog-v2

Conversation

@saphid

@saphid saphid commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Embeds a bounded offline changelog for Debug device installs and shows exact commits in Settings with commit and detected PR links. Generation is compact, portable across remotes, best-effort without Git history, and independent of the older version-settings PR.

Verification

  • apps/swift-ios/Scripts/ci-test.sh — 220 tests passed; generator tested with real and missing Git history
  • Fresh independent Claude Opus 5 high review completed; all actionable findings were addressed and the final repair review found no blockers.
  • Simulator visual evidence will be attached before marking this PR ready for review.

Scope

Targets the active native SwiftUI owner branch (#5178).

Note

Embed a git-based build changelog in the iOS app's Settings screen

  • Adds a Swift script (generate-build-changelog.swift) that extracts commits between a base ref and HEAD, builds PR links from commit titles, and writes a size-limited JSON file (48 KiB cap, oldest entries dropped first).
  • The install-device.sh build script base64-encodes the JSON and injects it into the app bundle via the T3_BUILD_CHANGELOG build setting for Debug device builds.
  • A new BuildChangelog model decodes the base64 JSON from Info.plist at runtime, exposing short commit hashes and deduplicated entry summaries.
  • A new BuildChangelogView renders the latest change, earlier changes in a timeline, and commit/PR links; empty states are shown when no changelog is embedded or no diffs exist between revisions.
  • The Settings About section now displays the app version string and a "Build changelog" navigation row.

Macroscope summarized 1e1f4a9.


Note

Low Risk
Settings-only UI plus optional Debug build metadata; no auth, networking, or release-path behavior changes.

Overview
Adds an offline build changelog for native SwiftUI Debug device installs: commits since a configurable base ref are embedded at build time and surfaced in Settings → About.

Build pipeline: generate-build-changelog.swift walks git log between T3_SWIFT_CHANGELOG_BASE_REF (default upstream/t3code/rebuild-mobile-app-swift) and HEAD, parses PR numbers from titles, caps payload size (~48 KiB), and writes JSON. install-device.sh runs this only for Debug, base64-encodes the result into T3_BUILD_CHANGELOG, and passes it through Info.plist as T3BuildChangelog.

In-app: BuildChangelog decodes the embedded payload; Build changelog in About shows version/build via SettingsAboutMetadata, highlights the latest commit, lists earlier changes on a timeline, and links to commits/PRs when a repo URL is available. Empty or missing changelog states are handled explicitly.

Tests cover version labeling, changelog decode, and summary deduplication; README documents T3_SWIFT_CHANGELOG_BASE_REF.

Reviewed by Cursor Bugbot for commit 1e1f4a9. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2895c41c-9a90-4aaa-ae6f-628451709fd9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Aug 10, 2026
@saphid

saphid commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

Simulator evidence from the integrated approved Debug build (the exact PR head is covered by the passing native CI job):

Build changelog showing commit and PR links

Verified in the iOS 26.5 simulator: the embedded changelog decoded, displayed both build entries, and exposed actionable commit and PR links.

@saphid
saphid marked this pull request as ready for review August 10, 2026 09:26

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit cb69786. Configure here.

Comment thread apps/swift-ios/Scripts/generate-build-changelog.swift
Comment thread apps/swift-ios/Features/Settings/BuildChangelog.swift
@macroscopeapp

macroscopeapp Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces a new feature with new user-facing UI (build changelog view in Settings), new data models, new build scripts, and workflow changes. While well-structured and tested, new features with this scope warrant human review.

You can customize Macroscope's approvability policy. Learn more.

@saphid

saphid commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

Final dependency-safe changelog is preserved at saphid/swiftui-changelog-final-stack (71a07b1c9), one clean commit on the composed release/debug integration head. Do not force-update this Theo-targeted PR yet: its tested base includes open #5790#5970#5972 → rebuilt #5789. Updating now would duplicate those diffs.

Unique behavior reuses #5790 formatting; accepts notes only when embedded version/build match the installed app; shows explicit Unavailable otherwise; sanitizes credentials/jargon; bounds metadata; keeps Release free of local Git history; and composes generation after the cleanup trap while preserving monotonic validation/debug metadata/build order.

Verification: changelog/install composition + monotonic + debug shell suites pass; focused Settings 6/6; Debug run; Release build with empty changelog; full native 103 XCTest + 236 Swift Testing, one expected skip, zero failures; git diff --check clean. Tailnet-only proof: https://alexs-macbook-pro-1.tail4e5636.ts.net:10015/changelog-final-proof.mp4

Conflict classification: feature complementary, code/history conflicting because old #5969 duplicates version rows/formatter and overlaps Info.plist/install ownership. Landing order: #5790#5970#5972 → unique #5789 5230a96b4 → unique changelog 71a07b1c9; then update this PR. Opus review unavailable at confirmed 429; no verdict claimed.

@saphid
saphid marked this pull request as draft August 10, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant