Skip to content

fix(android): request include_compacted on session message loads - #709

Merged
Codename-11 merged 1 commit into
Codename-11:devfrom
ophirhan:fix/include-compacted-session-messages
Oct 19, 2026
Merged

Codename-11 merged 1 commit into
Codename-11:devfrom
ophirhan:fix/include-compacted-session-messages

Conversation

@ophirhan

Copy link
Copy Markdown
Contributor

Summary

Hermes in-place compaction archives older turns under the same session id (compacted=1). Android session message loads only sent limit/offset/order, so reopen depended on the server default (historically false) and could show only the compaction summary plus a short active tail. Always request include_compacted=true on Dashboard and Hermes API message pagination so user-visible scrollback matches stored display history.

Changes

  • HermesApiClient.getMessages — add include_compacted=true query parameter
  • DashboardApiClient.getSessionMessages — add include_compacted=true query parameter
  • CHANGELOG.md — Unreleased fixed entry

Verification

  • Diff reviewed: query param only on the two message-load clients
  • Hygiene: local-stack.sh hygiene-scan clean vs upstream/dev
  • Device: after companion server default included compacted, reopen restored full archived scrollback; this client change makes Android independent of server default
  • Focused unit/lint not re-run for this two-line query change (N/A rationale: no UI/Compose logic)

Screenshots

No visual change (same transcript UI; more history rows when compacted archive exists).

Compatibility / risk

  • Requires Hermes session messages API that accepts include_compacted (already present). Harmless if ignored by older servers.
  • Slightly larger transcript payloads after long compacted sessions; pagination still applies.
  • Rollback: remove the query parameter.

Lineage / contributor credit

  • Source PR(s): N/A
  • Attribution preserved by: N/A

Checklist

  • Target branch is dev, unless this is a dev → main release PR or a focused production-tag hotfix PR to main
  • Scope is focused and related issues/PRs are linked
  • Android changes: lint and focused tests ran, or rationale is listed above
  • Translation changes: N/A
  • Server/plugin changes: N/A
  • Desktop changes: N/A
  • Docs/site changes: N/A
  • UI changes were tested on a relevant device — reopen restored full scrollback with server default; client flag is belt-and-suspenders
  • Commit messages follow Conventional Commits
  • CHANGELOG.md is updated for user-visible changes
  • Public writing hygiene checked: no secrets, private infrastructure, personal names, or AI/process narration
  • Salvaged/replacement work: N/A

@hermes-relay-triage hermes-relay-triage Bot added area:android Kotlin app needs-maintainer-review Automated triage exhausted; needs a human labels Oct 13, 2026
@hermes-relay-triage

Copy link
Copy Markdown

🤖 Hermes-Relay automated PR intake

Thanks for addressing compacted session scrollback on Android! This targets dev and includes all template sections, a changelog entry, compatibility/rollback notes, and an explicit rationale for not rerunning lint or focused tests.

The reported hygiene scan and device observation are useful context, but the reopen observation used a changed server default rather than this client flag. Please add the device/emulator and server version details, and either verification of this PR's client against a server default that excludes compacted messages or an explicit note that this check remains outstanding.

A maintainer will review the verification gap and implementation; this automated intake does not establish code correctness.

@ophirhan

Copy link
Copy Markdown
Contributor Author

Rebased onto current dev (force-with-lease).

  • Kept only the include_compacted query fix (DashboardApiClient + HermesApiClient).
  • Dropped the follow-on onnxruntime 1.27 pin commit — that bullet/pin is already on dev.
  • Hygiene-scan clean.

Ready for review when CI finishes on the new head.

Hermes in-place compaction archives older turns under the same session.
Without include_compacted=true, reopen only showed the summary and short
active tail. Always pass the flag on Dashboard and Hermes API message
pagination so scrollback matches stored display history.
@ophirhan
ophirhan force-pushed the fix/include-compacted-session-messages branch from 11780bc to 1f15c64 Compare October 19, 2026 16:58
@Codename-11
Codename-11 merged commit 047ade5 into Codename-11:dev Oct 19, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:android Kotlin app needs-maintainer-review Automated triage exhausted; needs a human

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants