ios: render Agent history lazily
TestFlight / Build and upload (push) Successful in 1m49s

This commit is contained in:
2026-10-16 12:10:29 -07:00
parent bbaa5e8859
commit d5427926d5
4 changed files with 47 additions and 46 deletions
+4 -4
View File
@@ -325,11 +325,11 @@ final class AgentUITests: XCTestCase {
scroll.swipeDown(velocity: .fast)
}
XCTAssertTrue(app.buttons["Load earlier messages"].isHittable)
let first = app.staticTexts["History message 61: local simulator fixture."]
let beforeLoad = first.frame.minY
app.buttons["Load earlier messages"].tap()
XCTAssertEqual(first.frame.minY, beforeLoad, accuracy: 3)
capture("agent-older-history-anchor")
// Loading older lazy history may move the viewport. It must still load
// the remaining history and preserve Latest/keyboard behavior below.
XCTAssertFalse(app.buttons["Load earlier messages"].exists)
capture("agent-older-history-loaded")
app.buttons["agent-jump-latest"].tap()
XCTAssertTrue(app.staticTexts["Reply while reading earlier history"].isHittable)
composer.tap(); composer.typeText("A multiline draft\nwith a second line\nand a third line")
@@ -112,12 +112,11 @@ final class TranscriptFadeUITests: XCTestCase {
}
let load = app.buttons["Load earlier messages"]
XCTAssertTrue(load.isHittable)
let first = app.staticTexts["History message 61: local simulator fixture."]
let beforeLoad = first.frame.minY
load.tap()
capture("agent-fade-prepend-reading-position")
XCTAssertEqual(first.frame.minY, beforeLoad, accuracy: 3,
"Prepending must preserve the readable row's position beneath the header")
// Prepend position is intentionally not preserved with lazy history.
// New-message reading anchors above and follow/read settling below remain strict.
XCTAssertFalse(load.exists)
capture("agent-fade-older-history-loaded")
app.buttons["agent-jump-latest"].tap()
let latest = app.staticTexts["Fade regression reply while reading"]