Context
Render architecture audit from #203. Both the toast layer and the resource indicator are high-frequency but completely self-contained UI sections that currently live as inline helpers on AnotherOneApp. Because they share the parent's render lifecycle, any unrelated state change causes them to re-render unnecessarily.
Toast layer
Fields today on AnotherOneApp: toasts, next_toast_id, toast_drag, copied_toast, pasted_image_preview.
Zero dependencies on any other app state. During toast animations the render tick runs at 16ms — this currently re-renders the entire app. As View<ToastController> only the toast layer repaints during animations.
Resource indicator
Fields today on AnotherOneApp: resource_indicator_open, last_resource_usage_refresh, resource_collapsed_nodes. Reads registry_state for usage data.
3 fields, all specific to this panel. Updates at 1–5s cadence.
What to do
- Extract toast fields into
struct ToastController implementing Render. Store as Entity<ToastController> on app. Pass toast mutations via the existing app-action pattern or a small dedicated channel.
- Extract resource indicator fields into
struct ResourcePanel implementing Render. Store as Entity<ResourcePanel> on app. Push a ResourceSnapshot from the drain tick when usage data changes.
- Neither requires a snapshot design — both have fully local state with no
project_store dependency.
Context
Render architecture audit from #203. Both the toast layer and the resource indicator are high-frequency but completely self-contained UI sections that currently live as inline helpers on
AnotherOneApp. Because they share the parent's render lifecycle, any unrelated state change causes them to re-render unnecessarily.Toast layer
Fields today on
AnotherOneApp:toasts,next_toast_id,toast_drag,copied_toast,pasted_image_preview.Zero dependencies on any other app state. During toast animations the render tick runs at 16ms — this currently re-renders the entire app. As
View<ToastController>only the toast layer repaints during animations.Resource indicator
Fields today on
AnotherOneApp:resource_indicator_open,last_resource_usage_refresh,resource_collapsed_nodes. Readsregistry_statefor usage data.3 fields, all specific to this panel. Updates at 1–5s cadence.
What to do
struct ToastControllerimplementingRender. Store asEntity<ToastController>on app. Pass toast mutations via the existing app-action pattern or a small dedicated channel.struct ResourcePanelimplementingRender. Store asEntity<ResourcePanel>on app. Push aResourceSnapshotfrom the drain tick when usage data changes.project_storedependency.