Server rail: the server with voice is shown on top

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 23:04:53 +02:00
co-authored by Claude Opus 5.5
parent f9e7042a73
commit e7b317313a
2 changed files with 6 additions and 0 deletions
+2
View File
@@ -96,6 +96,8 @@
</nav> </nav>
<style> <style>
/* The server you are talking on leads the list, wherever it sits in your own order */
.tile.voice { order: -1; }
.rail { .rail {
width: 68px; flex: none; background: var(--bg-0); display: flex; flex-direction: column; width: 68px; flex: none; background: var(--bg-0); display: flex; flex-direction: column;
align-items: center; gap: 8px; padding: 12px 0; overflow-y: auto; align-items: center; gap: 8px; padding: 12px 0; overflow-y: auto;
+4
View File
@@ -881,6 +881,10 @@ try {
await page.locator('.channel .name', { hasText: 'Root' }).dblclick(); await page.locator('.channel .name', { hasText: 'Root' }).dblclick();
await until2('voice moved to the second server', () => !userState('alice-b')?.selfDeaf && !!userState('alice')?.selfDeaf); await until2('voice moved to the second server', () => !userState('alice-b')?.selfDeaf && !!userState('alice')?.selfDeaf);
assert.equal(await page.locator('.rail .tile.voice').getAttribute('title').then(t => t?.startsWith('Second')), true); assert.equal(await page.locator('.rail .tile.voice').getAttribute('title').then(t => t?.startsWith('Second')), true);
// The server with voice leads the rail, although it was added last
const railTop = (title: string) => page.locator(`.rail .tile[title^="${title}"]`).boundingBox().then(b => b!.y);
assert.ok(await railTop('Second') < await railTop('Test Server'), 'voice server on top');
assert.match(await page.locator('.rail .tile').first().getAttribute('title') ?? '', /^Test Server/, 'the saved order is untouched');
console.log('ok: voice follows the channel you join'); console.log('ok: voice follows the channel you join');
// Messages on the server not on screen show as unread on its tile // Messages on the server not on screen show as unread on its tile