Skip to content

feat(ios): show app and environment versions - #5790

Open
saphid wants to merge 2 commits into
pingdotgg:t3code/rebuild-mobile-app-swiftfrom
saphid:saphid/swiftui-version-settings
Open

feat(ios): show app and environment versions#5790
saphid wants to merge 2 commits into
pingdotgg:t3code/rebuild-mobile-app-swiftfrom
saphid:saphid/swiftui-version-settings

Conversation

@saphid

@saphid saphid commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Shows the SwiftUI app marketing version and build number in Settings → About.
  • Shows the active environment's already-advertised server version, with Not connected and Unknown fallbacks.
  • Carries one already-persisted descriptor field into the existing FeatureEnvironment snapshot.
  • Adds focused formatting/state coverage.

This is the narrow display-only version of the idea. It does not implement source comparison or changelog links, refresh descriptors, add network or persistence lifecycles, change Info.plist, or modify install scripts. It should not be treated as closing a broader source-comparison proposal without maintainer agreement.

Base: pingdotgg/t3code:t3code/rebuild-mobile-app-swift at e55c7ffd1.
Reviewed head: 106e970770f2c875c32ddc02d148f37ae984591d.

Why

The two versions make client/server mismatch reports diagnosable from one screen using data the app already has.

UI evidence

Exact rebased head, paired to a disposable loopback environment:

Settings app and environment versions

The screen shows app version 0.1.0 (19) and the active environment descriptor version.

Verification

  • T3CodeTests/SettingsVersionMetadataTests: 2 focused tests passed.
  • Full native gate: 220 tests in 28 suites passed.
  • Exact-head integrated signed Debug build/install: Settings displayed 0.1.0 (19) and the paired environment version.
  • git diff --check: passed; rebase preserved the feature patch exactly.
  • GPT-5.6 Sol high: no actionable findings; judged minimally scoped for the stated display goal.
  • Direct Claude Opus 5 high attempt exited 1 with HTTP 429 before review; no Claude findings are claimed.
  • Both historical MacroScope threads apply to removed descriptor-refresh code and are resolved. Current-head Check, Test, SwiftUI native, mobile static-analysis, release-smoke, MacroScope correctness/approvability, CodeRabbit, and Cursor checks pass.

Checklist

  • Small and focused
  • Explained the deliberately narrow scope
  • Exact-head UI screenshot attached
  • Focused, full native, and integrated simulator verification
  • Current rebased-head CI/MacroScope complete
  • Maintainer scope alignment / human review

Built with GPT-5.6 Sol in the Codex harness.


Note

Low Risk
Display-only UI and optional decoding of existing server config fields; no auth, networking, or persistence lifecycle changes.

Overview
Surfaces client and server version strings in native Settings so mismatch reports are easier to diagnose from the app, using data the client already receives.

ServerConfigSnapshot now decodes and retains an optional environment descriptor (with lossy handling for malformed payloads) and exposes serverVersion(fallingBackTo:). NativeFeatureClient keeps that descriptor when rebuilding config from provider or settings stream events, and FeatureEnvironment carries serverVersion into feature snapshots.

Settings → About adds an App version row via new SettingsAboutMetadata formatting (bundle version/build, ignoring Xcode placeholders). Connections shows Server {version} only while the environment is connected, hiding stale values when disconnected or reconnecting.

Contract and formatting behavior are covered by updated CoreContractTests and new SettingsAboutMetadataTests.

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

Note

Show app version in Settings and server version per connected environment on iOS

  • Adds an 'App version' row to the Settings About section using a new SettingsAboutMetadata.appVersionLabel utility that reads CFBundleShortVersionString and CFBundleVersion from the main bundle.
  • Displays a 'Server {version}' label in each environment row in ConnectionsView.swift when the environment is connected and a valid serverVersion is available.
  • Extends ServerConfigSnapshot with an optional EnvironmentDescriptor field and a serverVersion(fallingBackTo:) helper; FeatureEnvironment gains an optional serverVersion property propagated from the server config.
  • Malformed environment descriptors in server config payloads are silently dropped without affecting providers or other fields.

Macroscope summarized 1ed616d.

@coderabbitai

coderabbitai Bot commented Aug 9, 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: 7c54f530-0af8-491b-8ad8-9604258b5651

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 9, 2026
Comment thread apps/swift-ios/App/NativeFeatureClient.swift Outdated
Comment thread apps/swift-ios/App/NativeFeatureClient.swift
@saphid
saphid force-pushed the saphid/swiftui-version-settings branch from 1a884f1 to 96b9e47 Compare August 9, 2026 11:50
@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Aug 9, 2026
@saphid
saphid force-pushed the saphid/swiftui-version-settings branch from 96b9e47 to 106e970 Compare August 10, 2026 01:20
@saphid
saphid marked this pull request as ready for review August 10, 2026 01:26
@macroscopeapp

macroscopeapp Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

1 blocking correctness issue found.

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

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Aug 10, 2026
@saphid

saphid commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

@t3dotgg Ready for your review against the current SwiftUI branch. Final head 106e970; focused/full native and integrated evidence are in the PR body. Current-head CI and MacroScope are green, and all review threads are resolved.

@t3dotgg
t3dotgg force-pushed the t3code/rebuild-mobile-app-swift branch from 4cb3307 to 497f54f Compare August 10, 2026 03:58
@saphid

saphid commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

Rebuilt this feature as one clean commit on the current Theo SwiftUI base. It now shows separate app and environment version rows, prefers the live server-config version over stale pairing metadata, preserves that value across partial config updates, and leaves one shared formatter for the changelog PR to reuse. Verification: 5 focused tests and all 227 native tests passed; final direct Claude Opus 5 high review exited 0 with no actionable findings. GitHub CI is rerunning on the refreshed head.

@saphid
saphid force-pushed the saphid/swiftui-version-settings branch from 106e970 to dfbd649 Compare August 10, 2026 11:33
@macroscopeapp
macroscopeapp Bot dismissed their stale review August 10, 2026 11:33

Dismissing prior approval to re-evaluate dfbd649

@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Aug 10, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Aug 10, 2026
@saphid
saphid force-pushed the saphid/swiftui-version-settings branch from dfbd649 to 1ed616d Compare August 11, 2026 10:26
@macroscopeapp
macroscopeapp Bot dismissed their stale review August 11, 2026 10:27

Dismissing prior approval to re-evaluate 1ed616d


private func mapEnvironment(_ environment: Environment, activeID: String?) -> FeatureEnvironment {
FeatureEnvironment(
let serverVersion = serverConfigsByEnvironmentID[environment.id]?

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.

🟡 Medium App/NativeFeatureClient.swift:3828

mapEnvironment reads serverVersion only from serverConfigsByEnvironmentID[environment.id]?.environment?.serverVersion and never falls back to environment.descriptor?.serverVersion. When the server config is not yet cached (or lacks an embedded environment snapshot), the returned FeatureEnvironment.serverVersion is nil even though the persisted descriptor has a valid version, so a connected environment is shown with an unknown version. Consider coalescing the config value with environment.descriptor?.serverVersion.

🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/swift-ios/App/NativeFeatureClient.swift around line 3828:

`mapEnvironment` reads `serverVersion` only from `serverConfigsByEnvironmentID[environment.id]?.environment?.serverVersion` and never falls back to `environment.descriptor?.serverVersion`. When the server config is not yet cached (or lacks an embedded environment snapshot), the returned `FeatureEnvironment.serverVersion` is `nil` even though the persisted descriptor has a valid version, so a connected environment is shown with an unknown version. Consider coalescing the config value with `environment.descriptor?.serverVersion`.

@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 1 potential issue.

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 1ed616d. Configure here.

private func mapEnvironment(_ environment: Environment, activeID: String?) -> FeatureEnvironment {
FeatureEnvironment(
let serverVersion = serverConfigsByEnvironmentID[environment.id]?
.environment?.serverVersion

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.

Paired version fallback left unwired

Medium Severity

mapEnvironment only reads serverConfigsByEnvironmentID’s live environment?.serverVersion and never calls serverVersion(fallingBackTo:), so the persisted pairing descriptor is ignored. Connected environments can show no server version when config is missing, soft-decoded away, or not yet merged, even though pairing metadata already has a version.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 1ed616d. Configure here.

@saphid

saphid commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

Exact final-head simulator proof (1ed616d): Settings renders the app name, version/build, and platform cleanly at phone width. The disconnected environment fallback is visible in Connections; connected server-version behavior remains covered by focused metadata tests.

Exact version settings

Focused version/core tests passed (16 total). The current native-CI red is the base-branch provider-catalog fixture failure fixed separately in #6130.

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