mirror of
https://github.com/kennethnym/aris.git
synced 2026-03-20 09:01:19 +00:00
refactor: move feed enhancement into UserSession
Move enhancement logic from HTTP handler into UserSession so the transport layer has no knowledge of enhancement. UserSession.feed() handles refresh, enhancement, and caching in one place. - UserSession subscribes to engine updates and re-enhances eagerly - Enhancement cache tracks source identity to prevent stale results - UserSessionManager accepts config object with optional enhancer - HTTP handler simplified to just call session.feed() Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
@@ -61,10 +61,7 @@ function partsEqual(a: unknown, b: unknown): boolean {
|
||||
const bKeys = Object.keys(b)
|
||||
if (aKeys.length !== bKeys.length) return false
|
||||
return aKeys.every((key) =>
|
||||
partsEqual(
|
||||
(a as Record<string, unknown>)[key],
|
||||
(b as Record<string, unknown>)[key],
|
||||
),
|
||||
partsEqual((a as Record<string, unknown>)[key], (b as Record<string, unknown>)[key]),
|
||||
)
|
||||
}
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user