Closes docs/RUST.md's "client-core prerequisites for P1" box: the cache-vs-server stitching TranscriptSource.kt does, and the joinPages/healSplitMessage/adoptRun page-boundary healing TranscriptItems.kt does, both ported into client-core with no UI framework dependency. Neither Kotlin file had a JVM unit test of its own, so the port used the Kotlin source and AGENTS.md's "things that have bitten" paging incidents as the spec instead of a test-for-test transcription. Both regressions get a dedicated test: TranscriptSource::page refuses before == 0 before touching the cache or the network (loadOlderPage's incident), and adopt_run now runs on every page join rather than only the one where a split call was found (the "one run drawn as two" incident). fetch_transcript_lines (api.rs, additive) pairs each transcript line with the exact server bytes via serde_json::value::RawValue rather than re-serializing a parsed Value, so a cached line and a live SSE frame for the same event agree byte-for-byte -- the fetch_transcript_page other callers under iris/ depend on is untouched. client-core: 85 -> 109 tests. cargo test/clippy --all-targets/fmt clean. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
17 lines
376 B
Rust
17 lines
376 B
Rust
//! The app's pure logic, shared between the server and any Rust client --
|
|
//! see `docs/CLIENT_CORE.md` for what lives here and what does
|
|
//! not yet.
|
|
|
|
pub mod ansi;
|
|
pub mod api;
|
|
pub mod config;
|
|
pub mod event_stream;
|
|
pub mod highlight;
|
|
pub mod notifications;
|
|
pub mod sse;
|
|
pub mod transcript_cache;
|
|
pub mod transcript_fold;
|
|
pub mod transcript_source;
|
|
|
|
pub use event_model::*;
|