Skip to content

Add native dev-client scripts and fix mobile shell layout#13

Merged
TraderSamwise merged 5 commits into
masterfrom
feat/gui-next
May 23, 2026
Merged

Add native dev-client scripts and fix mobile shell layout#13
TraderSamwise merged 5 commits into
masterfrom
feat/gui-next

Conversation

@TraderSamwise

@TraderSamwise TraderSamwise commented May 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • add native dev-client scripts and placeholder app assets for deterministic Expo prebuilds
  • document web/native local and relay GUI development workflows
  • fix mobile safe-area handling and remove duplicate nav from the mobile drawer

Verification

  • yarn --cwd app typecheck
  • git push pre-push verify: yarn typecheck && yarn lint && yarn test (607 tests)

Summary by CodeRabbit

  • New Features

    • Improved safe-area handling for top/bottom UI and status bar
    • Draft restoration when sending fails
    • Sidebar can optionally hide bottom navigation; mobile drawer UI adjusted
  • Documentation

    • Expanded local dev and build instructions, emulator endpoint examples, and daemon guidance
  • Chores

    • Added platform-specific dev and GUI helper scripts (web, native, iOS, Android)
    • Added utilities for resolving iOS chrome insets

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 23, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d3582ed9-3b6f-4fd2-a278-22278ad59336

📥 Commits

Reviewing files that changed from the base of the PR and between 2b63a17 and 22ec7d1.

⛔ Files ignored due to path filters (3)
  • app/assets/images/adaptive-icon.png is excluded by !**/*.png
  • app/assets/images/favicon.png is excluded by !**/*.png
  • app/assets/images/icon.png is excluded by !**/*.png
📒 Files selected for processing (13)
  • AGENTS.md
  • README.md
  • app/.env.example
  • app/app/_layout.tsx
  • app/components/AppShell.tsx
  • app/components/ChatComposer.tsx
  • app/components/MobileTabBar.tsx
  • app/components/ProjectSidebar.tsx
  • app/components/TopBar.tsx
  • app/lib/native-safe-area.ts
  • app/package.json
  • docs/dev-runtime.md
  • package.json
✅ Files skipped from review due to trivial changes (5)
  • app/.env.example
  • app/lib/native-safe-area.ts
  • AGENTS.md
  • README.md
  • docs/dev-runtime.md
🚧 Files skipped from review as they are similar to previous changes (5)
  • app/components/MobileTabBar.tsx
  • app/app/_layout.tsx
  • app/package.json
  • app/components/ProjectSidebar.tsx
  • app/components/ChatComposer.tsx

📝 Walkthrough

Walkthrough

The PR refactors the app's development workflow by introducing platform-specific dev scripts with daemon URL configuration, integrating safe-area layout handling across React Native UI components, enabling ProjectSidebar to hide its bottom navigation in drawer contexts, and adding draft restoration logic to ChatComposer's send failure paths.

Changes

Development Runtime Scripts & Configuration

Layer / File(s) Summary
Root and app dev scripts with daemon configuration
package.json, app/package.json, app/.env.example
Root package.json adds dev:gui:* platform scripts; app/package.json introduces dev:web:*, dev:native:*, dev:ios:*, dev:android:* commands in both local and relay modes with environment variables for daemon URL and connection mode; .env.example documents iOS/Android simulator daemon addresses.
AGENTS.md and README.md development guidance
AGENTS.md, README.md
AGENTS.md replaces generic instructions with explicit yarn dev:*:local scripts and adds yarn build --android / yarn build --all native commands; README.md updates the GUI/backend walkthrough to use aimux-dev daemon and new platform-specific dev scripts, with platform-specific simulator daemon URLs clarified.
dev-runtime.md comprehensive developer reference
docs/dev-runtime.md
Documentation fully describes the isolated aimux-dev runtime: Local GUI section uses yarn dev:web:local, native dev splits into platform-specific iOS/Android local builds plus Metro-only HMR via yarn dev:native:local, and both modes document corresponding yarn dev:gui:* root helper commands and production relay targets.

Safe Area Layout System

Layer / File(s) Summary
Root layout SafeAreaProvider and StatusBar
app/app/_layout.tsx
RootLayout imports and wraps the navigation tree in SafeAreaProvider, adds StatusBar configuration that responds to the current colorScheme, ensuring system UI integrates with root navigation.
Native safe-area utilities
app/lib/native-safe-area.ts
Adds IOS_MIN_TOP_INSET, IOS_MIN_BOTTOM_INSET, resolveChromeTopInset, and resolveChromeBottomInset to clamp iOS insets and return 0 on web.
TopBar and MobileTabBar safe-area insets
app/components/TopBar.tsx, app/components/MobileTabBar.tsx
TopBar and MobileTabBar independently compute and apply safe-area insets: TopBar derives topInset with iOS adjustment and applies dynamic height/padding, replacing fixed h-14; MobileTabBar computes bottomInset and applies to container height and padding.
ProjectSidebar visibility control and AppShell integration
app/components/ProjectSidebar.tsx, app/components/AppShell.tsx
ProjectSidebar now accepts optional showBottomNav prop (default true), updates header text to "All projects", adds flex-1 styling, and conditionally renders bottom nav; AppShell passes showBottomNav={false} when rendering ProjectSidebar in the mobile animated drawer.

Chat Composer Draft Restoration

Layer / File(s) Summary
Draft restoration on send failures
app/components/ChatComposer.tsx
ChatComposer introduces restoreDraftIfUntouched(text, images) helper that conditionally repopulates draft state when empty. The send handler captures submittedText and submittedImages separately, clears draft state immediately after payload preparation, and restores captured values on three failure paths: early send return, deliveryState === "failed", and exception catch.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • TraderSamwise/aimux#12: Both PRs modify app/components/ChatComposer.tsx to change chat composer input/send behavior.
  • TraderSamwise/aimux#9: Introduced the initial aimux-dev daemon workflow and related scripts that this PR refines.

Poem

🐰 Scripts split by platform, neat and spry,
Insets snug the chrome where edges lie,
Drafts bounce back when sends go awry,
A tiny rabbit claps—hip, hop, high!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 15.38% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main changes: adding native dev-client scripts and fixing mobile shell layout issues, which are reflected throughout the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/gui-next

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

app/app/_layout.tsx

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

app/components/AppShell.tsx

ESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox.

app/components/ChatComposer.tsx

ESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox.

  • 4 others

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
app/components/MobileTabBar.tsx (1)

23-29: 💤 Low value

Consider whether the iOS minimum inset of 24px is necessary.

The Math.max(insets.bottom, 24) ensures at least 24px of bottom padding on iOS. While this provides consistent spacing on older devices without a home indicator, it may be unnecessary on modern iOS where insets.bottom already accounts for the home indicator (~34px).

If the 24px minimum is intentional for visual consistency, consider adding a comment. Otherwise, the system-provided insets.bottom should be sufficient:

Suggested simplification
  const insets = useSafeAreaInsets();
  const bottomInset =
-   Platform.OS === "web"
-     ? 0
-     : Platform.OS === "ios"
-       ? Math.max(insets.bottom, 24)
-       : insets.bottom;
+   Platform.OS === "web" ? 0 : insets.bottom;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/components/MobileTabBar.tsx` around lines 23 - 29, The bottomInset
calculation in MobileTabBar.tsx currently forces a 24px minimum on iOS via
Math.max(insets.bottom, 24); decide whether to keep that legacy minimum or rely
on the system inset: either (A) simplify by replacing Math.max(insets.bottom,
24) with insets.bottom so bottomInset uses the system safe area directly, or (B)
if the 24px floor is intentional for visual consistency, add an explanatory
comment above the bottomInset const referring to the reason and when it can be
removed; update the const named bottomInset and references to insets so the
change is localized to the bottomInset computation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/components/TopBar.tsx`:
- Around line 12-14: TopBar currently clamps the iOS safe-area top inset with a
magic number (const in TopBar: topInset calculation using Math.max(insets.top,
54)), which is unexplained and mirrors a similar clamp in MobileTabBar
(Math.max(insets.bottom, 24)); extract the 54 (and the 24) into clearly named
constants (e.g., IOS_MIN_TOP_INSET and IOS_MIN_BOTTOM_INSET) with a short
comment documenting why the value was chosen (notch vs Dynamic Island vs
non-notch testing) and update TopBar.topInset and MobileTabBar to use these
constants so the intent and source of the numbers are explicit and easy to
adjust after device testing.

---

Nitpick comments:
In `@app/components/MobileTabBar.tsx`:
- Around line 23-29: The bottomInset calculation in MobileTabBar.tsx currently
forces a 24px minimum on iOS via Math.max(insets.bottom, 24); decide whether to
keep that legacy minimum or rely on the system inset: either (A) simplify by
replacing Math.max(insets.bottom, 24) with insets.bottom so bottomInset uses the
system safe area directly, or (B) if the 24px floor is intentional for visual
consistency, add an explanatory comment above the bottomInset const referring to
the reason and when it can be removed; update the const named bottomInset and
references to insets so the change is localized to the bottomInset computation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e1a40bef-533a-43ca-916d-fd64ebe465c9

📥 Commits

Reviewing files that changed from the base of the PR and between 56a7b75 and 2b63a17.

⛔ Files ignored due to path filters (3)
  • app/assets/images/adaptive-icon.png is excluded by !**/*.png
  • app/assets/images/favicon.png is excluded by !**/*.png
  • app/assets/images/icon.png is excluded by !**/*.png
📒 Files selected for processing (12)
  • AGENTS.md
  • README.md
  • app/.env.example
  • app/app/_layout.tsx
  • app/components/AppShell.tsx
  • app/components/ChatComposer.tsx
  • app/components/MobileTabBar.tsx
  • app/components/ProjectSidebar.tsx
  • app/components/TopBar.tsx
  • app/package.json
  • docs/dev-runtime.md
  • package.json

Comment thread app/components/TopBar.tsx Outdated
@TraderSamwise TraderSamwise changed the title Improve GUI native dev and mobile shell Add native dev-client scripts and fix mobile shell layout May 23, 2026
@TraderSamwise
TraderSamwise merged commit b13b789 into master May 23, 2026
1 check passed
@TraderSamwise
TraderSamwise deleted the feat/gui-next branch May 23, 2026 12:47
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.

1 participant