Skip to content

fix: wait for Discord chats before showing cached servers - #8

Merged
itz4blitz merged 4 commits into
itz4blitz:mainfrom
vbmithr:fix/discord-sidebar-loading
Oct 17, 2026
Merged

itz4blitz merged 4 commits into
itz4blitz:mainfrom
vbmithr:fix/discord-sidebar-loading

Conversation

@vbmithr

@vbmithr vbmithr commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Opening Discord's home could briefly show cached servers, then insert direct messages above them and push the server list down. Spaces are loaded independently, while the home chat read is coalesced and makes several requests; the home builder previously rendered server rows before that read completed.

Keep the first Discord home in its existing loading state until the home read succeeds. Track whether the home has completed a read separately from the current sublist's loading flag, so background refreshes and returning from a sublist can still draw cached home rows. A completed empty DM list displays servers normally; servers arriving after chats append below them. The design notes document this behavior.

Validation:

  • The new server-first regression test failed before the fix because the incomplete home already contained rows.
  • cargo test --frozen --release -p tinyclient --features gui gui::sidebar::home::tests: all 9 tests passed, including server-first/chat-first arrival, empty DMs, cached rows while a sublist loads, Discord ordering, folders, Signal and Teams home behavior. The GUI test target compiled and linked on Linux, with existing unrelated warnings.
  • Arch revision 11 built successfully with the frozen release build. Existing GUI, debug-index and source-path warnings were emitted.
  • All nine package patches apply cleanly to upstream and match the build sources; checksums, metadata, shell syntax and git diff --check pass.

The tests exercise the sidebar model with controlled arrival states; live Wayland frame-by-frame behavior still needs user verification. No daemon, account, credential or network protocol behavior is changed. This PR is independent of #3–#7.

CI follow-up: the initial Linux and Windows jobs failed in the pre-existing updater fixture test the_release_json_picks_this_machines_archive_and_the_sums: their fixture download URLs omitted the archive filenames that the assertion expects. macOS passed because its fixture URLs already contained the filenames. Commit a1712f9 corrects only those two fixture URLs. The exact failure was reproduced locally; all 7 updater tests with the GUI feature and all 12 non-GUI tinyclient tests now pass on Linux. The new commit triggers a fresh CI run.

vbmithr and others added 2 commits October 17, 2026 14:35
Keep the Discord home in its existing loading state until the first
home read completes. Spaces arrive separately and otherwise render
before DMs, which then push the visible server list down.

Track completed home reads independently of sublist loading so cached
rows stay visible during refreshes and when leaving a sublist. Cover
both arrival orders, empty DMs and cached rows in the sidebar tests,
and document the loading behavior in the design notes.

Co-Authored-By: GPT-6 <noreply@openai.com>
Describe cached home rows when returning from a sublist. Opening a
sublist still uses that list's own loading state.

Co-Authored-By: GPT-6 <noreply@openai.com>
@vbmithr
vbmithr requested a review from itz4blitz as a code owner October 17, 2026 12:37
vbmithr and others added 2 commits October 17, 2026 15:10
Give the Linux and Windows fixture assets URLs containing their archive
filenames, as the existing assertion requires. Both CI jobs failed this
test; the macOS fixture already included the filename. This changes only
fixture data, with no runtime or documentation behavior change.

Co-Authored-By: GPT-6 <noreply@openai.com>
Resolve the update.rs fixture conflict with main's version from itz4blitz#9.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@itz4blitz itz4blitz left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good: loaded_once cleanly separates first-load from refresh/sublist loading, and the tests cover server-first, chat-first, empty DMs and cached refresh. Thanks!

@itz4blitz
itz4blitz merged commit 1f7dcb2 into itz4blitz:main Oct 17, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants