conduit/lib/core/database/tables
cogwheel d5c6b11b28
Optimize performance and harden lifecycle handling (#581)
* Optimize performance and harden lifecycle handling

* Address PR review feedback

* Clean up duplicate App Intent image retries

* Fix follow-up pin-to-top routing

* Restore no-jump pin dismissal on user scroll

A later timeline optimization kept the synthetic pin spacer active through every manual scroll, undoing the guarded dismissal from #560 and allowing iOS range correction to snap the viewport. Restore the phantom-free range guard and cover both unsafe and safe dismissal offsets so the regression cannot recur silently.

* Rebuild chat turn anchoring like T3 Code

Create the anchor from the exact optimistic user-message ID, replace the full-screen phantom range and capped physics with measured anchored end space, and use item-level layout correction until real content fills the viewport. Cancel automatic corrections on the first user gesture so streaming growth cannot reintroduce scroll jumps.

* Fix Android cookie-clear verification and allow https-upgrade capture origins

The verified cookie clear treated Android's unimplemented getAllCookies as
failure, blocking SSO sign-in on empty stores and permanently arming the
incomplete-logout fence. Exact-origin capture checks silently dropped token
capture for http-configured servers upgraded to https by their proxy; capture
now also trusts the default-port https upgrade of the configured origin.
Also stabilize the background-validation sanitization test's poll deadline.

* Restore same-origin redirect recovery, pool warmup, and native fixes

- Replay credential-safe 3xx hops (same origin or default-port https
  upgrade) for idempotent methods on the shared API client; cross-origin
  hops still surface to the caller.
- Warm the completion client's actual connection pool at startup again;
  checkHealth's request-scoped probe no longer touches it.
- Graceful ApiService dispose so provider rebuilds cannot abort in-flight
  SSE streams; cap connectivity failure backoff at the healthy interval.
- iOS: thread the trusted origin into native sheet avatar loads so auth
  headers are attached again; let oversized STT tap buffers fall back to
  one-off copies instead of being dropped.

* Harden PR re-application: auth, upload/share, and provider regression fixes

Auth: logout preserves connection prerequisites (custom headers, mTLS)
while still revoking session credentials (legacy apiKey, captured proxy
Cookie headers); config-header edits and legacy apiKey migration no
longer sign the user out; cold-start background validation retries for
~7s to cover slow tunnels; interactively reissued byte-identical tokens
are accepted after logout; SSO button failures surface visibly.

Uploads/share: native-share durable keys derive from payload id +
ordinal instead of mutable content checksums; Hermes/direct-model
shares route through the local composer path instead of retrying
forever; pre-connection network failures defer instead of failing
terminally; orphaned receipt-held rows are garbage collected once
native storage is confirmed drained; disposed-queue persistence reports
failure so staged files survive; legacy staging roots are reclaimable.

Providers/UI: queued-completion banner watches every ownership-fence
input so retry/cancel cannot silently no-op; drawer keeps previous rows
during pagination reloads; authenticated image cache keys derive from a
stable server+token digest so the disk cache survives restarts while
accounts stay isolated.

* Make share staging indeterminate-ownership test hermetic under concurrency

The test snapshotted the process-global staging temp root, so files staged
or cleaned by concurrently running suites broke exact set equality. Assert
only that this test's own artifact never appears.

* Stabilize streaming UI and pending share persistence

Persist Android pending-share state atomically with migration coverage. Keep prompt anchoring and streaming haptics stable across row remounts, and reduce markdown streaming churn while hardening placeholder cleanup.

* Make streaming Markdown preparation incremental

* Reuse stable Markdown render inputs

* Avoid cumulative structured stream rebuilds

* Instrument and streamline structured output

* Hide dismissed sidebar native chrome

* Reduce streaming platform view retention
2026-07-20 21:04:28 +05:30
..
app_cache.dart refactor(persistence): move caches + attachment queue from Hive to Drift (PR-2) (#517) 2026-06-19 21:08:10 +05:30
attachment_queue.dart Optimize performance and harden lifecycle handling (#581) 2026-07-20 21:04:28 +05:30
chats.dart Offline-first persistence with Drift (#508) 2026-06-19 15:08:16 +05:30
folders.dart Offline-first persistence with Drift (#508) 2026-06-19 15:08:16 +05:30
messages.dart Offline-first persistence with Drift (#508) 2026-06-19 15:08:16 +05:30
notes.dart Offline-first persistence with Drift (#508) 2026-06-19 15:08:16 +05:30
outbox.dart Offline-first persistence with Drift (#508) 2026-06-19 15:08:16 +05:30
sync_meta.dart Offline-first persistence with Drift (#508) 2026-06-19 15:08:16 +05:30