Skip to content

fix(api): align Android with current server contracts - #17

Merged
cheetahbyte merged 7 commits into
mainfrom
fix/android-file-compatibility
Nov 14, 2026
Merged

cheetahbyte merged 7 commits into
mainfrom
fix/android-file-compatibility

Conversation

@cheetahbyte

@cheetahbyte cheetahbyte commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Align existing Android features with the current server contract. Includes the three earlier API-projection commits: generated transcript and job types, server-provided chat work state and automation timing, and schedule, citation, and reasoning previews.

Migrate bot and group chat attachments to raw uploads and file-ID sends/downloads. Preserve optimistic sends, drafts, scoped upload reuse, and request-ID retries; propagate deleted-file markers across retained transcript references and discard late image downloads. Extend contract generation for upload headers, binary bodies/downloads, and group snapshot events.

Replace installation-linked push presence with independent foreground chat views and exact visible-surface seen acknowledgements. Presence works without notification permission or FCM registration. Scope retries to their original account/chat, rotate view identity across Activity recreation, clear before session revocation, and refresh references without overwriting newer transcript state.

Why

The server no longer accepts inline attachments or exposes the old group attachment and device-presence routes. Local timing, citation, and reasoning logic also duplicates projections now provided by the server.

Evidence

  • Initial file compatibility and generator regressions failed before their fixes and pass afterward.
  • Deletion regressions reproduced retained-reference cache issues before correction; bot and group coverage passes.
  • The old presence endpoint assertion and three notification lifecycle regressions failed before their fixes and pass afterward.
  • Controller coverage includes mount/foreground gates, bot/group identity, serialized clears, heartbeat, account changes, 100-ID batches, retry/navigation ownership, invalid IDs, and teardown.
  • Renderer policy coverage includes exact surface identity, viewport intersection, card readiness, HTTP/event references, and stale-refresh guards.
  • python3 -m unittest discover -s scripts -p 'test_*.py': 12 passed.
  • python3 scripts/contract.py check: byte-identical generated output.
  • ./gradlew testDebugUnitTest lintDebug assembleDebug: passed; 508 Android unit tests, no failures or skips.
  • Contract assets match the finished sibling server export; git diff --check passes.
  • Independent reviews and focused correction reviews found no remaining issues in this session's migrations. The three earlier projection commits were not exhaustively re-reviewed.
  • Live device/emulator viewport behavior, live providers, and cross-client delivery were not tested. Unsupported group cards and unverified standalone question-card mappings remain unacknowledged.
  • Previous PR CI passed; its test job took 2m23s, above the repository's two-minute target. Notification adoption does not change CI configuration; the new run's duration is pending.

Risk & Rollback

Reversibility: Reversible, no persisted-data migration. Reverting restores the old client behavior, including incompatibility with the current file and attention APIs. Server-side seen acknowledgements already accepted are not undone by reverting.

Blast Radius: Android transcript rendering, job activity, automation timing, reasoning previews, chat attachment sends/downloads, notification attention reporting, and generated contract tooling. No server changes or new Library browser. Push registration, preferences, FCM payloads, duplicate tracking, and taps remain unchanged.

Old views clear best-effort within two seconds; lost clears expire through the server's 120-second presence TTL. Uploads can remain in the server Library after failed sends or connection changes. Acknowledgements cannot recall a push already accepted by a provider.

Use typed transcript blocks and server-projected job activity, working state, and automation timing. Keep unfinished job steps current across history pages and preserve transcript downloads.
Remove handwritten block and job item models and pass generated values through HTTP and SSE adapters. Reuse canonical schemas during generation and reject conflicting definitions.
Remove local cron descriptions, next-run calculation, citation parsing, and reasoning policy. Use generated server previews with scoped retries, stale-response guards, save gating, and periodic label refresh.
@cheetahbyte
cheetahbyte merged commit b2743d2 into main Nov 14, 2026
2 checks passed
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