Cache spaces offline and show server-unreachable state#120
Conversation
Persist each server's last-known space list to a Hive box so the rail renders its spaces (dimmed) immediately at launch, even when the gateway is offline or slow — instead of icons vanishing until READY arrives. Replace endless loading spinners in the channel list and member roster with a "server unreachable" placeholder (with retry) once the gateway has dropped and exhausted reconnects. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Code Review — findings & fixesAll fixes are committed to the review branch ( 🔴 Critical —
|
The connection.dart and server_unreachable.dart imports were dropped as "unused" — but accord_home_channels.dart and accord_home_rail_tiles.dart are `part of` accord_home.dart and rely on its imports, so removing them left connectionControllerProvider, isUnreachable, and ServerUnreachable undefined in those parts. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Summary
space-cacheHive box (SpaceCache), keyed by connection key. The rail now renders a server's spaces immediately at launch — dimmed while the gateway is connecting/unreachable — instead of icons vanishing until the gatewayREADYarrives (which never comes for an offline server).READYstill refreshes the list authoritatively.ServerUnreachableplaceholder (with a Retry button) shown in the channel list and member roster once the gateway has dropped and exhausted reconnects, replacing the otherwise-endless loading spinner.ConnectionStatus.isReachable/isUnreachablehelpers to distinguish "still connecting" from "gateway down".Test plan
READY.🤖 Generated with Claude Code