Repository navigation
fix(api): align Android with current server contracts - #17
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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.git diff --checkpasses.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.