magpie icon indicating copy to clipboard operation
magpie copied to clipboard

gui: residual horizontal borders rendered under Share on local network when off

Open Beyfish opened this issue 3 weeks ago • 1 comments

magpie version

v0.1.3853

Where

GUI

OS

Windows 11

Steps to reproduce

  1. Open Magpie GUI, navigate to Settings → Network and sharing (设置 → 网络与共享).
  2. Under Local network (局域网), turn Share on local network (局域网共享) On (开启) to see the child cards (Address, Join password, Allowed addresses, Require client certificates, HTTPS).
  3. Switch Share on local network back to Off (关闭).
  4. Inspect the area immediately below the "Share on local network" toggle card.

What happened, and what you expected

What happened: Multiple residual horizontal border lines (around 4-5 lines) remain tightly stacked immediately underneath the "Share on local network" toggle card.

Share on local network: On (开启) Share on local network: Off (关闭,出现残余线条)
lan-on lan-off

Expected: When LAN sharing is turned off, all dependent rows and empty card containers should be completely hidden, leaving no residual borders or lines.

Error text or logs

Root cause analysis:

  1. In internal/gui/assets/app.css, .list has a border:
    .list { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; flex: none; }
    
  2. When LAN sharing is toggled off (!s.lan), the subsequent sub-sections (e.g. #allowList, client certificates, HTTPS list containers) are emptied (e.g. via box.replaceChildren()), but the empty .list containers remain in the DOM without hidden or display: none.
  3. Because there is no .list:empty { display: none; } rule, each 0-height empty .list container still paints its top and bottom borders, collapsing into multiple horizontal lines.

Suggested fix: Either add a CSS rule in app.css to collapse/hide empty lists:

.list:empty {
  display: none;
}

Or set the hidden attribute on the empty list container elements when !s.lan.

Beyfish avatar Nov 12 '26 08:11 Beyfish

Fixed in commit \

Beyfish avatar Nov 18 '26 08:11 Beyfish