Channel menu: Send message to channel opens the side chat ready to type

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 23:12:10 +02:00
co-authored by Claude Opus 5.5
parent 2510633538
commit 0a290de229
2 changed files with 11 additions and 2 deletions
+2 -1
View File
@@ -39,7 +39,8 @@ export function channelMenu(c: Channel): MenuItem[] {
return [
{ header: true, label: c.name || 'Root' },
{ label: here ? 'You are here' : 'Join channel', action: () => session.joinChannel(c.id), disabled: here || !c.canEnter },
{ label: 'Open chat', action: () => { session.showChannel(c.id, 'chat'); ui.panelOpen = true; } },
// Opens the channel's chat in the side panel, ready to type, without joining it
{ label: 'Send message to channel', action: () => { session.showChannel(c.id, 'chat'); ui.panelOpen = true; } },
{ label: 'Show description', action: () => { session.showChannel(c.id, 'info'); ui.panelOpen = true; } },
{ separator: true, label: '' },
{ label: session.isExpanded(c.id) ? 'Collapse' : 'Expand', action: () => session.toggleExpanded(c.id), disabled: c.id === 0 },
+9 -1
View File
@@ -716,7 +716,15 @@ try {
await page.locator('.channel .name', { hasText: 'Lobby' }).click({ button: 'right' });
await page.getByRole('menuitem', { name: 'Join channel' }).click();
await page.locator('.me .who span', { hasText: 'Lobby' }).waitFor();
console.log('ok: channel context menu joins');
// Messaging a channel from its menu opens the side chat, ready to type, without joining
await page.locator('.channel .name', { hasText: 'Games' }).click({ button: 'right' });
await page.getByRole('menuitem', { name: 'Send message to channel' }).click();
const sideInput = page.locator('.panel .composer [contenteditable]');
await sideInput.waitFor();
assert.equal(await sideInput.getAttribute('data-placeholder'), 'Message #Games');
await page.waitForFunction(() => document.activeElement === document.querySelector('.panel .composer [contenteditable]'), null, { timeout: 3000 });
await page.locator('.me .who span', { hasText: 'Lobby' }).waitFor();
console.log('ok: channel context menu joins, and messages a channel from the side chat');
// Side panel can be resized by dragging its left edge
const panelBox = (await page.locator('aside.panel').boundingBox())!;