mirror of
https://github.com/wu736139669/hapi.git
synced 2026-11-06 01:11:37 +00:00
perf(native): optimize iOS transcript refresh and add frame profiling
Preserve hosted rows while propagating current SwiftUI environments and render captures. Add differential refresh regressions, opt-in real-clock iOS/Android profiling, and reproducible performance results. Validation: typecheck; CLI/hub/web/shared/relay suites (Web rerun with NODE_OPTIONS=--no-experimental-webstorage for Node 26/jsdom compatibility); existing iOS Debug/Release and Android regression runs.
This commit is contained in:
@@ -21,7 +21,6 @@ private enum TranscriptRow: Identifiable, Equatable {
|
||||
|
||||
struct ChatTranscriptView: View {
|
||||
let model: ChatModel
|
||||
@Environment(\.self) private var environment
|
||||
|
||||
private var rows: [TranscriptRow] {
|
||||
var rows: [TranscriptRow] = [.history(model.historyPaging.phase, model.hasMore)]
|
||||
@@ -50,8 +49,8 @@ struct ChatTranscriptView: View {
|
||||
},
|
||||
onLayout: { version, progress in model.historyLaidOut(version: version, madeProgress: progress) }
|
||||
) { row in
|
||||
// HostingConfiguration creates a new root: inherit app services.
|
||||
AnyView(rowView(row).environment(\.self, environment))
|
||||
// The list bridges the current environment into its hosting roots.
|
||||
AnyView(rowView(row))
|
||||
}
|
||||
.overlay(alignment: .bottomTrailing) {
|
||||
if !model.followsTail || model.hasTrimmedTail || model.isJumpingToLatest {
|
||||
|
||||
Reference in New Issue
Block a user