Skip to content

fix(mobile): J5's sheets follow the app theme in dark mode - #876

Merged
Jacksondr5 merged 3 commits into
j5/mainfrom
j5code/mobile-archive-sheet-dark
Nov 1, 2026
Merged

Jacksondr5 merged 3 commits into
j5/mainfrom
j5code/mobile-archive-sheet-dark

Conversation

@Jacksondr5

@Jacksondr5 Jacksondr5 commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

Problem

At Checkpoint 1, with the phone in dark mode, the archive warning (#845) opened as a light sheet. Its title and summary were light grey on near-white and nearly invisible, while the ask cards inside were dark.

Closes #868

What changed

Cause. The sheet set its surface with className="bg-sheet" on react-native-safe-area-context's SafeAreaView. Uniwind themes only React Native's own components (its Metro resolver rewrites react-native), so that className was silently dropped. The Modal stayed white, and the theme-coloured text sat on it. The same cause is behind the "Inline flex: on Android a flex-1 class left this Modal's content zero-height" comments in several J5 sheets.

Fix. Upstream's sheets (ThreadArrangementSheet) put the surface on a View with SafeAreaView inside it. Every J5 sheet with the pattern now does the same, as the Captain asked (same concern: J5's sheets follow the theme):

  1. Archive warning (ArchiveWarningSheet)
  2. Create persona (AgentCreateModal)
  3. Edit persona (AgentEditorModal)
  4. Persona folder picker (AgentFolderPickerModal)
  5. Persona import conflicts (AgentImportConflictModal)
  6. "Who are you?" (NameQuestion)
  7. Playbook conversation (PlaybookConversationModal)
  8. Playbook details, and playbook import / copy / rename (the two modals in PlaybookLibrarySettingsScreen)

The playbook sheets also used three web colour names that mobile's theme doesn't define. Inside those sheets they now use mobile's names: bg-background becomes bg-sheet, text-destructive becomes text-danger-foreground, and text-muted-foreground becomes text-foreground-muted. Without a surface, bg-background left those sheets white too. The text classes only lost their tint, because AppText defaults to text-foreground. The same web names on the Personas page itself (outside any sheet) are left for #867, which owns that page's dark-mode text.

The diff is mostly reindentation; git diff -w shows the real change.

UI changes

iOS (iOS 26.5 Simulator, same data on both sides; base c2b7939de8, head 53522ecc5b). In dark mode the sheets were white, with near-white title and summary text. After the fix they follow the app theme. Light mode shows no change.

Sheet Before After
Archive warning, dark Archive warning sheet in dark mode, before Archive warning sheet in dark mode, after
Create persona, dark Create persona sheet in dark mode, before Create persona sheet in dark mode, after
Create playbook, dark Create playbook sheet in dark mode, before Create playbook sheet in dark mode, after
Archive warning, light Archive warning sheet in light mode, before Archive warning sheet in light mode, after
Create persona, light Create persona sheet in light mode, before Create persona sheet in light mode, after
Create playbook, light Create playbook sheet in light mode, before Create playbook sheet in light mode, after

Android (Android 16 emulator, 1080×2400, same data on both sides; base c2b7939de8, head 53522ecc5b). All nine sheet surfaces in the eight files. In dark mode, every sheet was white or unthemed before; after, each has a dark surface with readable text, at full height. Light mode shows no change.

Sheet Before After
Archive warning with an open ask, dark Archive warning with an open ask in dark mode, before Archive warning with an open ask in dark mode, after
Archive warning with an open ask, light Archive warning with an open ask in light mode, before Archive warning with an open ask in light mode, after
Create persona, dark Create persona in dark mode, before Create persona in dark mode, after
Create persona, light Create persona in light mode, before Create persona in light mode, after
Edit persona, dark Edit persona in dark mode, before Edit persona in dark mode, after
Edit persona, light Edit persona in light mode, before Edit persona in light mode, after
Persona folder picker, dark Persona folder picker in dark mode, before Persona folder picker in dark mode, after
Persona folder picker, light Persona folder picker in light mode, before Persona folder picker in light mode, after
Persona import conflict, dark Persona import conflict in dark mode, before Persona import conflict in dark mode, after
Persona import conflict, light Persona import conflict in light mode, before Persona import conflict in light mode, after
"Who are you?" question, dark "Who are you?" question in dark mode, before "Who are you?" question in dark mode, after
"Who are you?" question, light "Who are you?" question in light mode, before "Who are you?" question in light mode, after
New playbook conversation, dark New playbook conversation in dark mode, before New playbook conversation in dark mode, after
New playbook conversation, light New playbook conversation in light mode, before New playbook conversation in light mode, after
Import playbook YAML, dark Import playbook YAML in dark mode, before Import playbook YAML in dark mode, after
Import playbook YAML, light Import playbook YAML in light mode, before Import playbook YAML in light mode, after
Playbook details, dark Playbook details in dark mode, before Playbook details in dark mode, after
Playbook details, light Playbook details in light mode, before Playbook details in light mode, after

Known limit: the status bar after a theme switch. These pairs switch the system to dark mode while the sheet is open, the same way on both sides. Android keeps the status-bar icon colour a Modal had when it opened (React Native copies the app's status-bar style into the sheet's window only at open). So a sheet left open across a light-to-dark switch shows dark icons on a dark sheet until it's reopened. A sheet opened in dark mode shows white icons, as here. This applies to every React Native sheet, upstream's included, and is not something this PR changes.

Edit persona opened while already in dark mode, with white status-bar icons, after

Live testing

iOS: pass at 53522ecc5b, run by the crew's tester (GPT-6 Astra through Codex). The archive warning used a real open ask from a Claude Haiku agent. The archive warning, Create persona and Create playbook were captured in light and dark mode. Trunk reproduced the near-white text on a white sheet in dark mode; the head is readable and themed throughout. Cancel kept the agent. Report: project artifact test-reports/j5code-mobile-wave1b-tester/53522ecc5b-ios.md.

Not exercised on iOS: the other five sheets, and error or loading states. The Android pass covers all eight sheets.

Android: pass at 53522ecc5b, run by the wave-2 tester (GPT-6 Astra through Codex) against trunk c2b7939de8. Two real Claude Haiku turns supplied the artifact and open-ask data. All nine sheet surfaces opened on both sides, in light and dark, with matching data and viewport. Cancel and Back were exercised: archive Cancel kept the ask, and import-conflict Cancel left the existing persona intact. Report: project artifact test-reports/mobile-wave2-android/53522ecc5b.md.

The head was later updated from trunk (the Captain's merge commit). The eight changed files are identical to the tested commit, so that update wasn't re-tested.

Not exercised: the playbook import/copy/rename sheet in its Copy and Rename forms (only Import was captured; all three share one sheet); loading and server-error states; the "Who are you?" question for a brand-new owner (the unknown-device path was covered); tablet width; native video.

Checklist

  • One concern: the description has no "also" (J5 sheets follow the theme)
  • Tests cover the changed behavior: visual only; AGENTS.md asks for captures, not tests
  • UI changes: iOS and Android before/after above
  • Live testing: iOS and Android passed; limits listed above
  • Upstream-owned files: none edited
  • Upstream product: no change. Upstream's WorkspaceFileWebPreview.tsx has the same dropped-className pattern; it's on the give-back list.
  • Surfaces: every J5 mobile sheet checked; iOS and Android share the code
  • Docs: no user-facing behavior changed

Built by Claude Opus 5.5 in J5 Code (Claude Code harness).

🤖 Generated with Claude Code

The archive warning opened as a light sheet in dark mode, with its title and
summary nearly invisible. Its surface was a className on
react-native-safe-area-context's SafeAreaView, which uniwind doesn't theme, so
the class was dropped and the Modal stayed white. Seven more J5 sheets had the
same pattern, and some lost their flex-1 the same way. Every J5 sheet now puts
its surface and flex on a View around the SafeAreaView, as upstream's sheets
do, and the playbook sheets use mobile's colour names instead of web's.

Closes #868

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
j5-code Ready Ready Preview Nov 1, 2026 8:45pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 69603e7 and 5e002b8.

Files selected for processing: 8
  • apps/mobile/src/j5/agents/AgentCreateModal.tsx
  • apps/mobile/src/j5/agents/AgentEditorModal.tsx
  • apps/mobile/src/j5/agents/AgentFolderPickerModal.tsx
  • apps/mobile/src/j5/agents/AgentImportConflictModal.tsx
  • apps/mobile/src/j5/archive/ArchiveWarningSheet.tsx
  • apps/mobile/src/j5/playbooks/PlaybookConversationModal.tsx
  • apps/mobile/src/j5/playbooks/PlaybookLibrarySettingsScreen.tsx
  • apps/mobile/src/j5/sharing/NameQuestion.tsx

Included review availability: This review used your included allowance. 2 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 3 reviews per hour.

Walkthrough

Mobile sheets now place their themed background and flex layout on a wrapper outside SafeAreaView. Playbook text color classes also changed. Form fields, selection behavior, validation, and actions remain unchanged.

Changes: Mobile sheet layout and colors

Layer / File(s) Summary
Move sheet surfaces outside safe areas
apps/mobile/src/j5/agents/AgentCreateModal.tsx, apps/mobile/src/j5/agents/AgentEditorModal.tsx, apps/mobile/src/j5/agents/AgentFolderPickerModal.tsx, apps/mobile/src/j5/agents/AgentImportConflictModal.tsx, apps/mobile/src/j5/archive/ArchiveWarningSheet.tsx, apps/mobile/src/j5/playbooks/PlaybookConversationModal.tsx, apps/mobile/src/j5/playbooks/PlaybookLibrarySettingsScreen.tsx, apps/mobile/src/j5/sharing/NameQuestion.tsx
These sheets move their background and flex layout to a wrapping View outside SafeAreaView. Playbook explanatory, description, and error text color classes also changed. Existing sheet content and actions remain unchanged.

Estimated code review effort: 2 (Simple) | ~12 minutes

Suggested reviewers: bryantderosier

Merge Risk: Minimal · up to 5e002

The sheet backgrounds now follow the app theme, with no identified issue requiring a merge delay.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title names the main change: J5 sheets in the mobile app now follow the app theme in dark mode, which matches the raw summary (sheet surfaces moved from SafeAreaView to a themed View across J5 she…
Description check Passed The description follows the template. Problem, What changed, UI changes, Live testing, Upstream impact, and Checklist are all present. The Problem section names the cause, links #868, and explains the…
Linked Issues check Passed [#868] Requirement: the J5 archive warning sheet must follow the app theme in dark mode. Evidence: the whole-PR diff of apps/mobile/src/j5/archive/ArchiveWarningSheet.tsx at head 5e002b8 moves the …
Out of Scope Changes check Passed The PR changes eight files: ArchiveWarningSheet.tsx, AgentCreateModal.tsx, AgentEditorModal.tsx, AgentFolderPickerModal.tsx, AgentImportConflictModal.tsx, PlaybookConversationModal.tsx, PlaybookLibrar…
Full details: Title check

Explanation

The title names the main change: J5 sheets in the mobile app now follow the app theme in dark mode, which matches the raw summary (sheet surfaces moved from SafeAreaView to a themed View across J5 sheets) and the linked issue #868. It is a conventional-commit title and is specific enough for a teammate scanning history.

Full details: Description check

Explanation

The description follows the template. Problem, What changed, UI changes, Live testing, Upstream impact, and Checklist are all present. The Problem section names the cause, links #868, and explains the affected users. What changed explains the className root cause and the fix across the listed sheets. UI changes has before/after captures for iOS and Android in light and dark modes. Live testing reports iOS and Android results and lists what was not exercised. Upstream impact is omitted, which the template allows when the PR only touches J5-owned paths, and the PR states upstream files were not edited. The checklist is filled in. The description ends with the model and harness, as the template asks. Minor gaps: the one-concern checklist item and the claim that the head update was not re-tested are noted but not resolved in the description itself.

Full details: Linked Issues check

Explanation

[#868] Requirement: the J5 archive warning sheet must follow the app theme in dark mode. Evidence: the whole-PR diff of apps/mobile/src/j5/archive/ArchiveWarningSheet.tsx at head 5e002b8 moves the sheet surface from className="bg-sheet" on SafeAreaView (dropped, because react-native-safe-area-context is not themed by Uniwind) to a View with className="flex-1 bg-sheet" that wraps SafeAreaView. Title and body text keep text-foreground, which follows the theme. The title, scrollable facts, and Cancel/confirm controls are unchanged. The PR reports iOS and Android light/dark captures and live tests, which were not re-run here. The coding requirement is met by the code change. Light/dark visual verification and before/after captures are non-coding and are not assessed. No automated test is added; the issue does not request one.

Full details: Out of Scope Changes check

Explanation

The PR changes eight files: ArchiveWarningSheet.tsx, AgentCreateModal.tsx, AgentEditorModal.tsx, AgentFolderPickerModal.tsx, AgentImportConflictModal.tsx, PlaybookConversationModal.tsx, PlaybookLibrarySettingsScreen.tsx, and NameQuestion.tsx. All apply the same fix as the linked issue #868: move the theme surface from className on SafeAreaView to a wrapping View. The other seven files are J5 sheets with the same dropped-className defect. Fixing them extends the #868 fix to the same root cause in the same theme area, so they are connected to the objective. The playbook sheets also replace web color names (bg-background, text-destructive, text-muted-foreground) with mobile theme names inside those sheets. This is a dark-mode text and surface fix within the same sheets. The PR description states that the Personas page itself is left for #867, so that page is not changed here. The large line counts in several files are mostly reindentation from wrapping the content in a new View, as the description states; the wrapping is needed for the surface change. No unrelated change was found in the reviewed diff. Limit: the diffs for the seven non-archive files were not inspected line by line. This assessment relies on the file summaries and the PR description for those files.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@Jacksondr5 Jacksondr5 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Combined panel review (reviewer-opus + reviewer-sol) at 53522ec

Verdict: no findings, and the panel approves the source. Still pending: Android light and dark before/after captures of the sheets. iOS is deferred to Checkpoint 2.

  • Cause and fix. className on react-native-safe-area-context's SafeAreaView is dropped, so the sheet surface never applied. All eight J5 sheets now put the surface and flex-1 on a View around SafeAreaView style={{ flex: 1 }}, as upstream's ThreadArrangementSheet.tsx:410–411 does. This also explains #854: the flex-1 class on SafeAreaView never applied there either.
  • Behaviour kept. The inline flex: 1 on KeyboardAvoidingView (#854's sizing fix) stays. The archive sheet keeps its own SafeAreaProvider. NameQuestion stays full screen, can't be dismissed, and keeps bg-screen.
  • Playbook sheet tokens. bg-background, text-muted-foreground and text-destructive map to mobile's bg-sheet, text-foreground-muted and text-danger-foreground. The same web names on the Playbooks page body (PlaybookLibrarySettingsScreen.tsx:42, :155, :191, :197, …) are left for #867, as the PR says.
  • No J5 <SafeAreaView … className> remains in src/j5.
  • Reviewer-run: mobile vp run typecheck exit 0, and lint clean on src/j5. It's visual only, so no tests are asked for.

When #873 rebases onto this, keep both the outer themed View and #873's identity behaviour in NameQuestion.tsx.

Reviewed by Claude Opus 5.5 (reviewer-opus) and Sol 6.1 (reviewer-sol) in J5 Code.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 effective changed lines (test files excluded in mixed PRs). labels Nov 1, 2026
…ive-sheet-dark

# Conflicts:
#	apps/mobile/src/j5/sharing/NameQuestion.tsx
@Jacksondr5
Jacksondr5 merged commit c199a7e into j5/main Nov 1, 2026
32 checks passed
@Jacksondr5
Jacksondr5 deleted the j5code/mobile-archive-sheet-dark branch November 1, 2026 21:10

This branch was successfully deployed

1 active deployment
Preview — 5e002b89 Deployed Nov 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 effective changed lines (test files excluded in mixed PRs). 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.

Mobile: archive warning sheet ignores dark mode

1 participant