Skip to content

feat: featured and user-pinned servers on multiplayer list - #188

Merged
cursor[bot] merged 1 commit into
mainfrom
cursor/edge-promoted-pinned-servers-2b12
Aug 30, 2026
Merged

feat: featured and user-pinned servers on multiplayer list#188
cursor[bot] merged 1 commit into
mainfrom
cursor/edge-promoted-pinned-servers-2b12

Conversation

@gaoyu06

@gaoyu06 gaoyu06 commented Aug 30, 2026

Copy link
Copy Markdown
Member

改动范围

  • Edge 自绘多人列表:拉取 GET /api/v1/launcher/servers 作为推荐服置顶;用户可删除后本地不再显示;用户可置顶自建服。
  • 推荐行用现有 UiChrome.badge,用户置顶用 keyChip,样式区分。
  • 隐藏/置顶写入 sidecar promoted_servers.json,不改 servers.dat NBT。
  • 明确不做:不改 mixin、prism、Nova、backend、website;不新增端点;不加遥测。

是否可直接上线

否。阻塞:无 1.8.9 游戏内截图,视觉差与详情栏「置顶」按钮布局未在真实客户端确认。须等已锁定的功能级单次验收。

上线前是否需要 review

是。触发:公共多人界面行为与重要 UI。前置:U3 提交后,与 Nova 视觉、backend 文档一并做一次验收,不另开 Edge-only reviewer。

已跑验证

  • ./gradlew build(含 test,JDK 21):BUILD SUCCESSFUL
  • 无头 JVM 冒烟:sidecar 写入/跨进程读回、地址大小写、id 优先隐藏键

真实对象证据

  • 入口:主菜单 → 多人 → MixinGuiMultiplayerGuiMultiplayer
  • API:PromotedServersService.fetch(){API_BASE_URL}/api/v1/launcher/servers
  • 配置:.minecraft/FPSMaster Edge/promoted_servers.json

依赖

不依赖 backend 新字段或其他 PR。无迁移。

回滚

git revert 77880ff;运行时删除 promoted_servers.json 即可恢复推荐位显示,不影响 servers.dat

Open in Web Open in Cursor 

…pinnable own servers

Co-authored-by: Gao Yu <gaoyu06@users.noreply.github.com>
@cursor
cursor Bot marked this pull request as ready for review August 30, 2026 06:58
@cursor
cursor Bot merged commit f0a22cf into main Aug 30, 2026
4 checks passed
@cursor
cursor Bot deleted the cursor/edge-promoted-pinned-servers-2b12 branch August 30, 2026 06:58

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

First-pass on this diff only. The PR merged while this review was starting, so this is residual — not a merge gate. Not approving.

Bug: deleting a saved server that shares an address with a featured listing also writes a hide key, so the featured row never comes back. Deleting the same address after the player pinned it does not hide, and the featured row reappears. Hide should run only for promoted-only rows (!servers.contains(selectedServer)).

Missing verification: no tests in the diff (sidecar hide/pin/normalize was claimed as headless smoke but not committed). The new pin row in the detail column has no short-window check; needs one 1.8.9 capture at a small guiHeight before treating that layout as done.

Open in Web View Automation 

Sent by Cursor Automation: Edge 前置维护

Comment on lines +150 to 154
if (isPromotedEntry(selectedServer)) {
PromotedServersService.getInstance().hideByAddress(selectedServer.serverIP);
}
servers.remove(selectedServer);
saveServerList();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

isPromotedEntry is true for any row styled as featured, including a collapsed own server. Delete then both removes servers.dat and permanently dismisses the featured listing.

The opposite path is already in rebuildServerEntries: a pinned own server is stored as promoted=false, so the same delete skips hide and the featured row comes back.

Gate hide on promoted-only data:

if (!servers.contains(selectedServer)) {
    PromotedServersService.getInstance().hideByAddress(selectedServer.serverIP);
}
servers.remove(selectedServer);

Comment on lines +409 to +417
if (ownServer) {
boolean pinned = PromotedServersService.getInstance().isPinned(selectedServer.serverIP);
float pinY = joinY - 4f - rowH;
if (UiChrome.buttonClicked(this, x + pad, pinY, width - pad * 2f, rowH, null,
FPSMaster.i18n.get(pinned ? "multiplayer.unpin" : "multiplayer.pin"),
UiChrome.Style.DEFAULT, mouseX, mouseY)) {
PromotedServersService.getInstance().setPinned(selectedServer.serverIP, !pinned);
rebuildServerEntries();
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This inserts a full-width pin row above Join with no remaining-height check. Stats already sit ~127px from the top of the pane; pin + join + edit/delete take ~76px from the bottom. On a short guiHeight (GUI scale 2 / small window) they overlap the stats grid.

Need one 1.8.9 screenshot at a short height before this column is done. If it collides, drop pin onto the edit/delete row or hide it when pinY would enter the stats block.

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