Skip to content

feat(mobile): show skeletons instead of loading notices - #269

Merged
nixuuu merged 1 commit into
devfrom
feat/mobile-skeletons
Nov 6, 2026
Merged

nixuuu merged 1 commit into
devfrom
feat/mobile-skeletons

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 6, 2026

Copy link
Copy Markdown
Member

Mobile screens inserted loading notices above their content, including one notice per workspace in Projects. Replace those notices with shared skeletons, keep loaded content during refreshes, and present project text edits as text fields.

What changed

ui/Skeleton.tsx supplies the shared building block: the web's translucent light/dark fill, rounded corners and an opacity pulse. It stops pulsing under the system reduced-motion setting and hides pending controls from touch and accessibility. Known form rows stay mounted behind the skeleton, so loading does not insert or remove an extra box or spacer. List placeholders use the corresponding row/card structure; the number of results and arbitrary text wrapping are unknown before the first response.

View Coverage
General, Appearance, Threads, Text generation Skeletons in the existing account-setting rows and controls, including Appearance previews. Already loaded account settings remain visible while reloading.
Diffs, device preferences, typography and display choices Shared choice rows mask their values until device preferences load. Keybindings and disabled Soon items remain static reference content.
Projects One settings resource serves the project, its workspaces, defaults and add forms. Workspace cards no longer fetch the same settings independently. Project name, Label and Root path are inline text inputs with a fixed space for their Save action, without picker chevrons. The project empty state waits for overview data.
Workers and Updates Existing overview worker cards stay visible; pending network details, unknown worker rows, update rows and detail forms use skeletons. Install commands reserve their multiline form while release metadata loads.
Computers and move preview Self details and linked-computer rows have placeholders. Move preview waits for a result before showing its empty state.
Network access and Worktrees Render the actual fixed form structure while the first response is pending; use row skeletons for unknown worktree lists.
Providers and Proxies Skeleton cards follow the definition/card controls. Worker settings and model toggles have first-load placeholders. Saved definitions stay visible while refreshing.
Connectors and Agent environment Shared row skeletons cover connector/account lists and environment sections. Nested editors inherit skeleton-aware fields and controls instead of loading notices. Errors and empty states remain text.
Schedules The schedule card's fields and actions provide its skeleton structure. Empty states wait for the first response.
Threads, bots and Archived Matching three-line thread rows and bot rows with avatar placeholders. Archive refresh failures keep previously loaded threads visible. The initial connecting notice no longer appears above the list.
Thread and bot conversations Conversation skeletons replace the initial spinner inside the existing feed viewport. Snapshots remain visible during reconnects; connection failures remain text. Thread details use connector row skeletons.
New thread, mentions and pairing Pending composer choices and the pairing form use the shared skeleton. New thread waits for placement/default settings before showing a blocker or allowing creation. Mention search keeps earlier results visible but disables stale choices until the current query resolves.

The remaining spinners show ongoing actions: sending, uploading attachments, running shell commands, and busy buttons. They do not stand in for fetched content.

Verification

  • Passed bun install, bun run gen:check, bun run typecheck, bun run lint, bun run format:check, and bunx expo lint in apps/mobile.
  • Passed the web build.
  • Passed bun run check:tmp with a private TMPDIR on disk: 1481 pass, 158 skip, 0 fail, 1639 tests across 264 files; nothing left in its temp directory. Opt-in live tests were skipped. No UI tests were added or run.
  • Self-reviewed the loading/refresh branches, empty/error states, retained data, write actions and shared layout wrappers. No gateway or authentication changes.

Device coverage gap

Device verification was unavailable. Canopy_Fold failed to boot both initially and on the final retry: “The emulator process … exited with code 1 before coming online.” The remote Mac had 1.9 GiB free on the final check. Medium belonged to another agent's active session and was left untouched. The maintainer explicitly authorized skipping device checks in this situation.

Folded/unfolded, light/dark, short/long text, slow first-load, refresh geometry and the reduced-motion behavior have not been visually verified. Static review and the gates do not establish pixel-perfect layout parity. No code, APK or build artifacts were copied to the Mac; no native build or AVD data changes were made, so there are no manually created Mac artifacts to clean up.

Copy audit (§8)

  • “Loading settings…”, “Loading connections…” and “Searching…” → visual skeletons, with concise accessible loading labels. This removes transient notices without inventing replacement status prose.
  • Project text-edit triggers → text fields with action labels “Save project name”, “Save label” and “Save root path”. Labels use sentence case and start with a verb; the action space stays reserved.
  • Existing actionable errors, empty states and help text remain. No new glossary terms or decorative copy. Controls have accessible labels and disabled states.
  • The device/width/text-length checks in §8.9 remain unverified for the device reasons above.

@nixuuu
nixuuu merged commit 74f3313 into dev Nov 6, 2026
15 of 17 checks passed
@nixuuu
nixuuu deleted the feat/mobile-skeletons branch November 6, 2026 10:48
nixuuu added a commit that referenced this pull request Nov 6, 2026
Thread switches render the device's latest snapshot before connecting,
then resume the watch from its journal checkpoint. The header and
composer use real thread/project/model/worker metadata from the copy or
overview. Cold reads reuse the generic skeleton components merged in
#269. A quiet fixed-space “Syncing…” state keeps cached content visible
until live; sending and stopping wait for live, and other actions retain
authoritative gateway checks.

The cache uses existing Expo app-private `expo-file-system` storage at
`Paths.cache/thread-snapshots-v1`, so no new native dependency is
needed. The OS may evict it safely. Binary protobuf files use atomic
replacement and persistent LRU timestamps. Disk limits are **16 threads
/ 64 MiB**, with **16 MiB maximum per entry**; the memory LRU holds **6
threads / 24 MiB**. Writes coalesce into 2-second windows and flush on
screen exit/background. Size budgets measure encoded protobuf, not the
entire decoded object heap.

Pairing device ID and certificate pin isolate cache scopes. Unpair or
detected revocation fences new writes, clears memory and serializes disk
deletion; orphan scopes are removed before mounting screens. An offline
device detects remote revocation upon reconnect. Failed deletion reports
an actionable storage error. Snapshot secret fields contain request
metadata only, never stored secret values, ciphertext, device tokens or
provider credentials. Ordinary conversation text remains private
conversation data.

Android development builds disable Expo's network inspector: its HTTP/2
response preview waits for up to 1 MiB, blocking small open-ended
Connect streams. Certificate pinning, authorization and wire format
remain unchanged. Device verification identified this behavior in both
thread deltas and the pre-existing overview watch. The fresh EAS build
with the inspector disabled receives small deltas, becomes live and
clears Syncing. No temporary transport bypass is committed.

Measurements use two synthetic conversations with 500 completed turns /
3,001 timeline items each, including tool output. Initial baseline app
samples on Medium_Phone_API_36.1 were 3177.15 / 3660.23 / 3324.30 ms to
first content (median 3324.30 ms), transferring about 6.23 MB protobuf
per open. The final controlled comparison below uses the same
Canopy_Fold emulator, fresh native build and SSH network path. The
full-watch control disables cache reads/writes and requests the original
full snapshot; both modes use the current timeline renderer.

| Watch open on Fold | Full-watch control | Warm cache + delta |
| --- | ---: | ---: |
| First content, three samples | 3119.1 / 3677.3 / 3104.1 ms | 653.6 /
580.9 / 693.4 ms |
| Median | 3119.1 ms | 653.6 ms |
| Initial protobuf update received by the app | 6,233,091–6,233,101 B |
513–523 B |

After a process restart, a disk-backed open showed content in **709.5
ms**, then received a **523 B delta**. Empty-cache controls took 2234.9
/ 2708.1 ms and received full snapshots, as expected. Cached switches
visibly kept content in place and reached live. Revoking the live
synthetic device returned the app to pairing with the revocation
message; inspecting its private cache confirmed no snapshot files
remained.

Timing runs from the thread hook mounting to snapshot render plus two
animation frames; pre-mount navigation animation is excluded. Byte
figures measure the initial WatchThread protobuf update, excluding
framing, TLS and separate metadata RPCs. These are instrumented
development-mode, synthetic, shared-host results, not production
guarantees. Provisional HMR/debugging samples are excluded. The browser
results are in the preceding layer. A separate local tail-loading stage
is deferred; the existing mobile FlatList remains, and two nested
item/turn scans were replaced with a Set and grouped Map.

Verification: install, generated-contract check, typecheck, lint,
formatting, Expo lint and Expo Doctor (20/20) pass. iOS and Android
production JS exports pass. The complete `check:tmp` run passed **1,490
tests, 159 skipped, 0 failed**, with 10,039 assertions. Meaningful
filesystem/gateway tests cover restart, cursor durability, byte/count
LRU limits, oversized/corrupt entries, unpair races and late writes,
real paired TLS HTTP/1.1 and HTTP/2 delta reads, secret/token exclusion
and actual device revocation. Protocol owner/fallback/restart and
two-gateway remote coverage are in the first layer.

Device qualification: the fresh Android dev build installed on
Canopy_Fold on the Mac Studio. Light/dark and open/closed hinge postures
were checked; this generic AVD retains its wide viewport when closed.
Phone-width light/dark layouts were checked on Medium's existing dev
client with the current JS. Installing the fresh native build on Medium
failed, including the tool-prescribed retry, with “Requested internal
only, but not enough space”; it was not reinstalled or cleared to make
room. No iOS runtime or physical Galaxy check is claimed. The task-owned
app, servers, gateway/Postgres, port forwards and emulator were cleaned
up afterward.

Copy audit (§8): removed temporary “Thread / Thread”, “Default model”
and “Worker” values when metadata is known. Unknown metadata/timeline
uses shared skeletons. The existing quiet “Syncing…” copy has reserved
space. Revocation/storage errors state the cause and recovery action. No
new glossary term or colour-only state. Draft stack; do not merge
individual layers.
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