Skip to content

finding(skills): the published mobile guide's useOffline snippet destructures a key the hook does not return, and lists a sync state that does not exist #6856

Description

@claude

Noticed while implementing objectui#6818 (the auto-sync stale-queue guard on the
same hook). Out of scope there: that card's file surface is
packages/react/src/hooks/useOffline.ts plus its test directory, and this is a
published skill document.

What

skills/objectui/guides/mobile.md:121-142 (the "Offline support" section),
measured on 1e14d70 — two independent errors in one block:

  1. A destructured key the hook does not return. Line 127 reads

    const { isOnline, queue, syncState } = useOffline();

    OfflineResult has no queue member. The queue is exposed only as
    pendingCount: number, alongside queueMutation / sync / clearQueue.
    A reader who copies this gets queue === undefined, silently.

  2. A sync state that does not exist. Line 142 reads

    Sync states: `idle` -> `syncing` -> `synced` | `error`

    SyncState is declared at packages/react/src/hooks/useOffline.ts:67 as
    'idle' | 'syncing' | 'error' | 'offline'. There is no synced — so a
    consumer branching on it has written a branch that can never run — and
    offline, the state the hook enters whenever isOnline is false and the one
    this entire guide section is about, is missing from the list.

Why it may matter, and why it may not

skills/ is the published corpus: it is what an agent copies into a user's
repository, which is a wider blast radius than an in-repo example. And it is
unguarded by construction — objectui#5465 records that check-doc-snippet-types
does not scan skills/, so nothing has ever compiled this block. That issue is
the systemic gap; this is one concrete instance of what falls through it, and
the two are not duplicates.

No user-visible break is measured and none is claimed. Filed as an observation
for triage.

Dedupe

/search/issues returns silent zeros for this seat, so this went through the
repo-scoped REST list endpoint plus a local grep: 247 open issues collected,
zero hits for mobile.md, guides/mobile, syncState or pendingCount, and
the only useOffline hit is objectui#6818 itself. Control terms hit in the same
read (hook matched 15 issues, useETagCache matched objectui#6817, offline
matched objectui#6818), so the zero is a real reading rather than a broken one.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions