Skip to content

Steam Friends in the in-game menu through Madeira Dock - #572

Open
Vuqar05 wants to merge 4 commits into
willfaust:mainfrom
Vuqar05:pr/steam-friends
Open

Vuqar05 wants to merge 4 commits into
willfaust:mainfrom
Vuqar05:pr/steam-friends

Conversation

@Vuqar05

@Vuqar05 Vuqar05 commented Nov 5, 2026

Copy link
Copy Markdown

Dependency: this PR depends on willfaust/madeira-dock#10. Merge that one first. The madeira-dock submodule is pinned to that PR's branch, and tools/build-ipa.sh builds dockhost.exe from the submodule, so the Friends feature ships only with that Dock code.

Before merging this PR, once the Dock PR is merged:

  1. Set .gitmodules back to https://github.com/willfaust/madeira-dock.git. It points at the Vuqar05 fork for now, because the pinned commit exists only there.
  2. Update the madeira-dock pin to the merged commit on main.

Games started through Madeira Dock have no Steam overlay, so players can't see friends, invite them or join them. This adds that to the in-game menu, using the friends feed and commands from the Dock PR.

What changed

  • Friends page: the Session menu gets a Friends page while Dock's feed exists (DockFriends.swift). Friends who invited you come first, then joinable friends, friends in this game, in other games, online and offline.
  • Actions: Join on a joinable friend, Accept on an invite, and Invite on online friends while you have a lobby or connect string to invite with. Each row shows the result.
  • Status: Settings › Steam › Status offers Online, Away, Invisible and Offline, passed to Dock as MADEIRA_DOCK_PERSONA_STATE. Offline turns friends off for the whole game and can only be chosen before it starts. The other three can also be changed on the Friends page.
  • Report size: the app now reads a Dock report of up to 1 MiB instead of 32 KB, because a long session with friends on writes more than the old limit and a report past the cap would hide the game-end result.
  • Docs: docs/MADEIRA_DOCK.md describes the feature, how the launch entry is picked and how the submodule is pinned.

Limits

  • Friends needs the January client build. On other builds Dock doesn't write the feed, so the Friends entry doesn't appear and the launch is unchanged.
  • SteamIDs and names stay on the device; logs carry counts and result codes.

Tests

  • Device-tested: sending an invite, receiving one and joining with it, joining a friend without an invite, being joined without sending one, and the Offline status turning friends off.
  • Not device-tested: the last commit, which removes a duplicated backdrop layer from the Session menu, and the connect-string invite.
  • No host tests were added on the app side.

🤖 Generated with Claude Code

Vuqar05 and others added 4 commits November 4, 2026 15:56
Show a running Dock session’s friends, accept incoming invites, send join and invite commands, and let players choose their Steam presence. Pin the focused Dock Friends branch while it awaits upstream integration.
With friends off, Dock no longer opens the command file every 500 ms or
answers friends-cmd-result=6, which is what its README now says.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Describe how the launch entry is picked, the chosen status and what has been
tested, and stop naming a fixed Dock commit. Pin Dock's matching doc fixes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Steam Friends commit left the menu's dimming layer in twice, which
darkened the game behind the menu more than intended.

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

Vuqar05 commented Nov 5, 2026 •

Copy link
Copy Markdown
Author

I closed it, because I forgot to implement inviting people who are seen as offline, but then I remembered that steam doesn't allow accepting invites on the desktop client when the user is in invisible mode and in offline there is no point. If you think that it is still needed, let me know

@125hz

125hz commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

Review for today's wave (wave 7 merged the other open pull requests). This one is held: it depends on willfaust/madeira-dock#10, which is also held for a maintainer decision (self-built protocol messages, Friends on and Online by default). Once that is settled, these fixes are needed here:

  1. .gitmodules changes the submodule URL to Vuqar05/madeira-dock; it must stay willfaust/madeira-dock.
  2. The madeira-dock pin moves to 90f967e9, which is dock Add immersive iPad game mode #10's head and not on dock main. Repin to the dock main commit after Add immersive iPad game mode #10 merges.
  3. Stale Friends list: the host deletes the feed only at a clean exit, and the app treats the file's existence as "Friends available", resetting only at the next Dock start. After a killed Wine process a later non-Dock game shows a Friends button with an old list and every command ends in "No answer from Steam". Clear the feed and command files in MadeiraDock.cleanup() and at session end, or ignore a feed older than about 10 s.
  4. tests/host/check-dock-report.py:64 still checks the old 32769-byte cap after the limit moved to 1 MiB; it passes but no longer tests the cap.
  5. docs/MADEIRA_DOCK.md now calls 125hz/madeira-dock the canonical repository; upstream's is willfaust/madeira-dock.
  6. The command sequence is seeded from epoch seconds and printed by the host as a signed 32-bit number; past 2^31 the app never matches its own command. Mask it to 31 bits.

Smaller points: checkResult reads the whole report (now up to 1 MiB) every 0.5 s on the main thread while a command is pending, and refresh() republishes friends/available even when nothing changed, redrawing the session menu every 3 s; assign only on change. The new UI strings are not localized. No new network calls in the app, and the handoff and token code are untouched apart from the DockFriends.shared.reset() call.

125hz added a commit that referenced this pull request Nov 5, 2026
An ours-strategy merge of the pull request heads squashed above, so GitHub marks them merged: #575, #574, #556, #541, #540, #568, #564, #546, #544 and #571. #567 was taken in part (its Japanese-locale files, credited to its author) and is closed with a pointer to that commit; #572 waits with madeira-dock#10.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

@intraducine intraducine left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What this change does: This adds Steam Friends to the running game menu. It is a distinct feature, so it should stay open with Dock PR #10.

Must fix before merge:

  1. The app keeps a stale friends list after the feed is lost or invalid. In refresh(), available only checks whether bytes were read, and friends is only replaced on a successful parse. I compiled the production file with only its external app dependencies stubbed. After loading one valid friend, deleting the feed produced available=false with one stale friend. Replacing the feed with one invalid byte produced available=true with that same friend. An open Friends page can still show its old Join/Invite controls. Clear the list and mark it unavailable when the feed cannot be parsed, and add a regression test for valid-to-missing and valid-to-invalid transitions.

  2. The app side has no regression checks and no passing current-head CI run. Please cover feed bounds, command bytes, matching command results and timeout/reset behavior. The current run requires approval; the empty check list is not a passed build.

The five Dock native suites passed at 90f967e with AddressSanitizer and UndefinedBehaviorSanitizer. That includes the new friends format suite, with no live Steam or device session. Keep the stated merge order: Dock #10 first, then restore the canonical willfaust/madeira-dock URL and pin its merged commit in this PR.

Verdict: Fix the stale feed state and add app checks before merge.
Not checked: fresh device UI, live invites, or the pinned client-layout check against a Valve DLL.

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.

3 participants