Skip to content

feat(swift-ios): mark debug threads with warning chrome - #5972

Open
saphid wants to merge 9 commits into
pingdotgg:t3code/rebuild-mobile-app-swiftfrom
saphid:saphid/swiftui-debug-title-v2
Open

feat(swift-ios): mark debug threads with warning chrome#5972
saphid wants to merge 9 commits into
pingdotgg:t3code/rebuild-mobile-app-swiftfrom
saphid:saphid/swiftui-debug-title-v2

Conversation

@saphid

@saphid saphid commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Uses the adaptive warning color for the navigation title bar of thread screens in DEBUG builds only, making development threads visually unmistakable without changing release builds.

Verification

  • apps/swift-ios/Scripts/ci-test.sh — 218 tests passed
  • 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

Mark navigation chrome with warning colors on debug builds for Home, New Task, and Thread screens

  • Introduces T3BuildChrome in T3Theme.swift with per-surface helpers that switch backgrounds, foregrounds, toolbar color scheme, and content opacity to a warning presentation in Debug builds; Release builds are unaffected.
  • Adds uiWarning/warningForeground colors to T3Colors with explicit ColorScheme-aware resolution via warning(for:).
  • Applies t3BuildNavigationChrome, t3BuildChromeBackground, and t3BuildChromeMarker view modifiers to ThreadDetailView.swift, NewThreadView.swift, and WorkspaceView.swift.
  • Adds accessibility values on affected surfaces in Debug builds so testers can identify non-release builds via the accessibility tree.
  • New DebugBuildChromeTests.swift verifies warning vs. standard presentation per surface and asserts WCAG contrast compliance for warning colors.

Macroscope summarized 47bebfd.


Note

Low Risk
Visual-only, #if DEBUG-gated styling on navigation bars with tests; no auth, networking, or data-path changes.

Overview
Debug builds now show adaptive warning-yellow title bars on Home, New Task, and thread screens so dev installs are visually distinct from Release; production styling is unchanged.

Adds T3BuildChrome in the design system: compile-time #if DEBUG switches surfaces to warning backgrounds, black foregrounds, a light navigation toolbar scheme, and accessibility values like “Development build.” New modifiers wire this into WorkspaceView (home bar), NewThreadView (top bar), and ThreadDetailView (navigation chrome plus header/actions). Warning colors get UIKit tokens and T3Colors.warning(for:) so the bar tint stays correct when the toolbar forces a light color scheme.

DebugBuildChromeTests assert debug vs release behavior and WCAG contrast for warning text on the warning background; README notes the feature.

Reviewed by Cursor Bugbot for commit 47bebfd. 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: 70172c8c-f44c-4c80-8438-1ad28b9f1dd4

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:XS 0-9 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:

Orange Debug title bar on home

Orange Debug title bar in a live thread

Verified on iOS 26.5 across home, new-thread, and live-thread routes.

@saphid
saphid marked this pull request as ready for review August 10, 2026 09:27
Comment thread apps/swift-ios/Features/Chat/ThreadDetailView.swift Outdated
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Aug 10, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved 47bebfd

This PR adds debug-only visual styling using compile-time #if DEBUG gating, with no impact on release builds. Changes are purely cosmetic (warning colors, accessibility markers) and include comprehensive tests verifying both debug and release behavior.

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

@macroscopeapp
macroscopeapp Bot dismissed their stale review August 10, 2026 10:20

Dismissing prior approval to re-evaluate 826af68

@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). and removed size:XS 0-9 changed lines (additions + deletions). labels Aug 10, 2026
Comment thread apps/swift-ios/Features/Chat/ThreadDetailView.swift Outdated
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Aug 10, 2026
@saphid

saphid commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

Dark-mode simulator verification

Debug thread title bar in dark appearance

Built and launched the integrated personal/swiftui-approved Debug app on iOS Simulator 3565B63B-6AEE-4D1F-8EE8-F7697B4F9C46, paired it to a disposable backend, created a real Codex thread, and received OK. In dark appearance the orange bar keeps the back/menu/title controls black and the metadata/status readable. XcodeBuildMCP build-and-run succeeded.

@macroscopeapp
macroscopeapp Bot dismissed their stale review August 10, 2026 10:47

Dismissing prior approval to re-evaluate 29e4bcd

@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 29e4bcd. Configure here.

Comment thread apps/swift-ios/Features/Chat/ThreadDetailView.swift Outdated
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Aug 10, 2026
@saphid

saphid commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

Rebuilt on the exact current Theo SwiftUI head (5b7ee58f6) before final handoff; the unrelated historical CI-retry commit was removed.

Final verification on exact PR result:

  • 226/226 native tests across 29 suites
  • explicit arm64 Release simulator build: BUILD SUCCEEDED
  • Debug integrated Home, New Task, and Thread proof in light/dark
  • semantic non-color Debug markers scoped to the intended title controls
  • git diff --check clean
  • fresh direct Claude Opus 5 high review of the rebased frozen diff: exit 0, MERGE-READY, no actionable findings

The reviewer also confirmed no path overlap with Theo's newer usage work and no build/release overlap. The shared Debug policy is adaptive; Release uses normal chrome.

@saphid
saphid force-pushed the saphid/swiftui-debug-title-v2 branch from 29e4bcd to ef66325 Compare August 10, 2026 12:06
@macroscopeapp
macroscopeapp Bot dismissed their stale review August 10, 2026 12:06

Dismissing prior approval to re-evaluate ef66325

@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
@saphid

saphid commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

Final connected simulator verification on exact head ef663259d (iPhone simulator, dark appearance):

  • Full native XCTest suite: passed.
  • Paired to a disposable backend built from the same PR worktree.
  • Created and settled a real thread, then reopened it.
  • Verified the orange debug chrome on home and thread; black system back/title/menu controls remain legible, while the composer and working-state accent remain cyan.

Connected home:

Connected dark home debug chrome

Thread detail:

Dark thread debug chrome with composer

@saphid
saphid force-pushed the saphid/swiftui-debug-title-v2 branch from ef66325 to 47bebfd Compare August 11, 2026 10:26
@saphid

saphid commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

Exact final-head simulator proof (47bebfd): warning chrome and the system back chevron remain clearly legible after removing the overly broad tint scope.

Home Thread
Home chrome Thread chrome

Focused DebugBuildChromeTests passed (3/3). 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