bots-garden/sidekickspublic Fork
⑂ f9f7cb1
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/sidekicks.git
git clone ssh://git@rickub.com/bots-garden/sidekicks.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP

Merge feature/agent-header-short into main

agent committed 2026-11-15T20:38:46+01:00 Browse files
f9f7cb1 parents: 9ba8da1 7af460e
modified .memory/history.md +2 -0
@@ -385,3 +385,5 @@
385385 - Conflict with #54 (AGENTS.md always protected) put to the owner: chose "Instructions tab allowed" — Files tab stays locked, Instructions tab writes (never deletes), CLAUDE.md/GEMINI.md added to AlwaysProtected (config tests updated for the new list).
386386 - Done: agents.InstructionsFiles, WorkspaceService Instructions/Create/Save(conflict)/Import/ChooseInstructions (uses workspace.ErrNotFound, writes with the read version — an empty version only creates), InstructionsTab.svelte + instructions.ts template EN/FR, AgentView tab. Tests Go + vitest; Xvfb (create, edit, save, restart note, 🔒 in Files). make verify green. Docs EN/FR, release notes v1.7.0. Not committed; #113 open for the owner's test.
387387 - **2026-11-15 — #113 closed** (owner); feature/113-agent-instructions merged into main (not pushed).
388+- **2026-11-15 — agent header line shortened** (owner: "ready · sandbox mini-coder-sbx · /Users/…/mini-coder · in #general, #various" far too long; branch feature/agent-header-short, no ticket): agentHeader.ts placeOf (no path; local → 'on this computer') + fewChannels (2 then +N), one line with ellipsis, full text in the tooltip. Xvfb checked. Not committed.
389+- Merged into main (owner OK).
@@ -385,3 +385,5 @@
385 - Conflict with #54 (AGENTS.md always protected) put to the owner: chose "Instructions tab allowed" — Files tab stays locked, Instructions tab writes (never deletes), CLAUDE.md/GEMINI.md added to AlwaysProtected (config tests updated for the new list).385 - Conflict with #54 (AGENTS.md always protected) put to the owner: chose "Instructions tab allowed" — Files tab stays locked, Instructions tab writes (never deletes), CLAUDE.md/GEMINI.md added to AlwaysProtected (config tests updated for the new list).
386 - Done: agents.InstructionsFiles, WorkspaceService Instructions/Create/Save(conflict)/Import/ChooseInstructions (uses workspace.ErrNotFound, writes with the read version — an empty version only creates), InstructionsTab.svelte + instructions.ts template EN/FR, AgentView tab. Tests Go + vitest; Xvfb (create, edit, save, restart note, 🔒 in Files). make verify green. Docs EN/FR, release notes v1.7.0. Not committed; #113 open for the owner's test.386 - Done: agents.InstructionsFiles, WorkspaceService Instructions/Create/Save(conflict)/Import/ChooseInstructions (uses workspace.ErrNotFound, writes with the read version — an empty version only creates), InstructionsTab.svelte + instructions.ts template EN/FR, AgentView tab. Tests Go + vitest; Xvfb (create, edit, save, restart note, 🔒 in Files). make verify green. Docs EN/FR, release notes v1.7.0. Not committed; #113 open for the owner's test.
387 - **2026-11-15 — #113 closed** (owner); feature/113-agent-instructions merged into main (not pushed).387 - **2026-11-15 — #113 closed** (owner); feature/113-agent-instructions merged into main (not pushed).
388+- **2026-11-15 — agent header line shortened** (owner: "ready · sandbox mini-coder-sbx · /Users/…/mini-coder · in #general, #various" far too long; branch feature/agent-header-short, no ticket): agentHeader.ts placeOf (no path; local → 'on this computer') + fewChannels (2 then +N), one line with ellipsis, full text in the tooltip. Xvfb checked. Not committed.
389+- Merged into main (owner OK).
modified docs/release-notes/v1.7.0.fr.md +1 -0
@@ -24,4 +24,5 @@ Brouillon — complété au fil des tickets de la 1.7.0.
2424
2525 - Le code d'un fichier dont un agent donne le lien dans sa réponse est maintenant coloré dans le panneau à côté de la conversation, comme dans l'onglet Fichiers, en lecture seule (#117).
2626 - ↑ dans la zone de saisie rappelle les messages que vous avez écrits dans ce channel ou cette conversation, quel que soit l'agent, même après un changement de channel ou un redémarrage de Sidekicks — jamais ceux d'un autre channel (#118).
27+- La ligne sous le nom d'un agent, dans sa vue, est de nouveau courte : son état, où il tourne et ses premiers channels ; le chemin complet de son dossier et tous ses channels sont dans l'infobulle de la ligne.
2728 - La zone de saisie grandit avec un long message et reprend maintenant sa taille une fois le message envoyé, ou quand ↑ / ↓ rappellent un message plus court (#111).
@@ -24,4 +24,5 @@ Brouillon — complété au fil des tickets de la 1.7.0.
24 24
25 - Le code d'un fichier dont un agent donne le lien dans sa réponse est maintenant coloré dans le panneau à côté de la conversation, comme dans l'onglet Fichiers, en lecture seule (#117).25 - Le code d'un fichier dont un agent donne le lien dans sa réponse est maintenant coloré dans le panneau à côté de la conversation, comme dans l'onglet Fichiers, en lecture seule (#117).
26 - ↑ dans la zone de saisie rappelle les messages que vous avez écrits dans ce channel ou cette conversation, quel que soit l'agent, même après un changement de channel ou un redémarrage de Sidekicks — jamais ceux d'un autre channel (#118).26 - ↑ dans la zone de saisie rappelle les messages que vous avez écrits dans ce channel ou cette conversation, quel que soit l'agent, même après un changement de channel ou un redémarrage de Sidekicks — jamais ceux d'un autre channel (#118).
27+- La ligne sous le nom d'un agent, dans sa vue, est de nouveau courte : son état, où il tourne et ses premiers channels ; le chemin complet de son dossier et tous ses channels sont dans l'infobulle de la ligne.
27 - La zone de saisie grandit avec un long message et reprend maintenant sa taille une fois le message envoyé, ou quand ↑ / ↓ rappellent un message plus court (#111).28 - La zone de saisie grandit avec un long message et reprend maintenant sa taille une fois le message envoyé, ou quand ↑ / ↓ rappellent un message plus court (#111).
modified docs/release-notes/v1.7.0.md +1 -0
@@ -24,4 +24,5 @@ Draft — completed as the 1.7.0 tickets are done.
2424
2525 - The code of a file an agent links to in its answer is now coloured in the panel beside the conversation, like in the Files tab, read-only (#117).
2626 - ↑ in the message box brings back the messages you wrote in this channel or this conversation, whatever the agent, even after switching channels or restarting Sidekicks — never another channel's (#118).
27+- The line under an agent's name, in its view, is short again: its state, where it runs and its first channels; its folder's full path and every channel are in the line's tooltip.
2728 - The message box grows with a long message and now shrinks back once it is sent, or when ↑ / ↓ bring back a shorter message (#111).
@@ -24,4 +24,5 @@ Draft — completed as the 1.7.0 tickets are done.
24 24
25 - The code of a file an agent links to in its answer is now coloured in the panel beside the conversation, like in the Files tab, read-only (#117).25 - The code of a file an agent links to in its answer is now coloured in the panel beside the conversation, like in the Files tab, read-only (#117).
26 - ↑ in the message box brings back the messages you wrote in this channel or this conversation, whatever the agent, even after switching channels or restarting Sidekicks — never another channel's (#118).26 - ↑ in the message box brings back the messages you wrote in this channel or this conversation, whatever the agent, even after switching channels or restarting Sidekicks — never another channel's (#118).
27+- The line under an agent's name, in its view, is short again: its state, where it runs and its first channels; its folder's full path and every channel are in the line's tooltip.
27 - The message box grows with a long message and now shrinks back once it is sent, or when ↑ / ↓ bring back a shorter message (#111).28 - The message box grows with a long message and now shrinks back once it is sent, or when ↑ / ↓ bring back a shorter message (#111).
modified frontend/src/lib/agent/AgentView.svelte +11 -8
@@ -18,6 +18,7 @@
1818 import FilesTab from './FilesTab.svelte'
1919 import TerminalView from './TerminalView.svelte'
2020 import InstructionsTab from './InstructionsTab.svelte'
21+ import { fewChannels, placeOf } from '../agentHeader'
2122 import { signInKey } from '../signin'
2223 import ErrorText from '../chat/ErrorText.svelte'
2324 import { activeTerminal, closeTerminal, newTerminal, runningTerminals, terminalsOf } from '../terminalSessions.svelte'
@@ -29,6 +30,11 @@
2930 const agent = $derived(appState.agents.find((candidate) => candidate.name === name))
3031 const channels = $derived(appState.channels.filter((channel) => !channel.direct && channel.members?.includes(name)).map((channel) => '#' + channel.name))
3132 const stateKey = $derived(`agent.state.${agent?.state ?? ''}`)
33+ const stateText = $derived(hasMessage(stateKey) ? t(stateKey as MessageKey) : (agent?.state ?? ''))
34+ function channelsText(list: string[] | string): string {
35+ const text = Array.isArray(list) ? list.join(', ') : list
36+ return text ? t('workspace.channels', { channels: text }) : t('workspace.noChannel')
37+ }
3238
3339 type Tab = 'files' | 'instructions' | 'terminal' | 'log'
3440 // svelte-ignore state_referenced_locally
@@ -83,13 +89,10 @@
8389 <header>
8490 <div class="identity">
8591 <h2><AgentAvatar icon={agent.icon} title={agent.title} name={agent.name} size={22} /> {agent.title}</h2>
86- <p class="meta">
92+ <!-- Short: the folder's path and every channel are in the tooltip. -->
93+ <p class="meta" title={[stateText, location, channelsText(channels)].filter(Boolean).join(' · ')}>
8794 <span class="dot {agent.state}" aria-hidden="true"></span>
88- <span class="facts">
89- {hasMessage(stateKey) ? t(stateKey as MessageKey) : agent.state}
90- {#if location}· {location}{/if}
91- · {channels.length ? t('workspace.channels', { channels: channels.join(', ') }) : t('workspace.noChannel')}
92- </span>
95+ <span class="facts">{[stateText, location ? placeOf(location, t('workspace.here')) : '', channelsText(fewChannels(channels))].filter(Boolean).join(' · ')}</span>
9396 </p>
9497 </div>
9598 <button onclick={() => openDirect(name)}>{t('workspace.conversation')}</button>
@@ -179,9 +182,9 @@
179182 header { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-bottom: 1px solid var(--border); }
180183 .identity { flex: 1; min-width: 0; }
181184 h2 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
182- .meta { margin: 2px 0 0; color: var(--muted); font-size: 12px; display: flex; gap: 6px; align-items: baseline; }
185+ .meta { margin: 2px 0 0; color: var(--muted); font-size: 12px; display: flex; gap: 6px; align-items: center; }
183186 /* The state, where it runs and its channels: wraps next to the dot, never under it. */
184- .facts { flex: 1; min-width: 0; overflow-wrap: anywhere; }
187+ .facts { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
185188 .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
186189 .dot.ready { background: var(--ok); }
187190 .dot.busy, .dot.starting { background: var(--warn); }
@@ -18,6 +18,7 @@
18 import FilesTab from './FilesTab.svelte'18 import FilesTab from './FilesTab.svelte'
19 import TerminalView from './TerminalView.svelte'19 import TerminalView from './TerminalView.svelte'
20 import InstructionsTab from './InstructionsTab.svelte'20 import InstructionsTab from './InstructionsTab.svelte'
21+ import { fewChannels, placeOf } from '../agentHeader'
21 import { signInKey } from '../signin'22 import { signInKey } from '../signin'
22 import ErrorText from '../chat/ErrorText.svelte'23 import ErrorText from '../chat/ErrorText.svelte'
23 import { activeTerminal, closeTerminal, newTerminal, runningTerminals, terminalsOf } from '../terminalSessions.svelte'24 import { activeTerminal, closeTerminal, newTerminal, runningTerminals, terminalsOf } from '../terminalSessions.svelte'
@@ -29,6 +30,11 @@
29 const agent = $derived(appState.agents.find((candidate) => candidate.name === name))30 const agent = $derived(appState.agents.find((candidate) => candidate.name === name))
30 const channels = $derived(appState.channels.filter((channel) => !channel.direct && channel.members?.includes(name)).map((channel) => '#' + channel.name))31 const channels = $derived(appState.channels.filter((channel) => !channel.direct && channel.members?.includes(name)).map((channel) => '#' + channel.name))
31 const stateKey = $derived(`agent.state.${agent?.state ?? ''}`)32 const stateKey = $derived(`agent.state.${agent?.state ?? ''}`)
33+ const stateText = $derived(hasMessage(stateKey) ? t(stateKey as MessageKey) : (agent?.state ?? ''))
34+ function channelsText(list: string[] | string): string {
35+ const text = Array.isArray(list) ? list.join(', ') : list
36+ return text ? t('workspace.channels', { channels: text }) : t('workspace.noChannel')
37+ }
32 38
33 type Tab = 'files' | 'instructions' | 'terminal' | 'log'39 type Tab = 'files' | 'instructions' | 'terminal' | 'log'
34 // svelte-ignore state_referenced_locally40 // svelte-ignore state_referenced_locally
@@ -83,13 +89,10 @@
83 <header>89 <header>
84 <div class="identity">90 <div class="identity">
85 <h2><AgentAvatar icon={agent.icon} title={agent.title} name={agent.name} size={22} /> {agent.title}</h2>91 <h2><AgentAvatar icon={agent.icon} title={agent.title} name={agent.name} size={22} /> {agent.title}</h2>
86- <p class="meta">92+ <!-- Short: the folder's path and every channel are in the tooltip. -->
93+ <p class="meta" title={[stateText, location, channelsText(channels)].filter(Boolean).join(' · ')}>
87 <span class="dot {agent.state}" aria-hidden="true"></span>94 <span class="dot {agent.state}" aria-hidden="true"></span>
88- <span class="facts">95+ <span class="facts">{[stateText, location ? placeOf(location, t('workspace.here')) : '', channelsText(fewChannels(channels))].filter(Boolean).join(' · ')}</span>
89- {hasMessage(stateKey) ? t(stateKey as MessageKey) : agent.state}
90- {#if location}· {location}{/if}
91- · {channels.length ? t('workspace.channels', { channels: channels.join(', ') }) : t('workspace.noChannel')}
92- </span>
93 </p>96 </p>
94 </div>97 </div>
95 <button onclick={() => openDirect(name)}>{t('workspace.conversation')}</button>98 <button onclick={() => openDirect(name)}>{t('workspace.conversation')}</button>
@@ -179,9 +182,9 @@
179 header { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-bottom: 1px solid var(--border); }182 header { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-bottom: 1px solid var(--border); }
180 .identity { flex: 1; min-width: 0; }183 .identity { flex: 1; min-width: 0; }
181 h2 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }184 h2 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
182- .meta { margin: 2px 0 0; color: var(--muted); font-size: 12px; display: flex; gap: 6px; align-items: baseline; }185+ .meta { margin: 2px 0 0; color: var(--muted); font-size: 12px; display: flex; gap: 6px; align-items: center; }
183 /* The state, where it runs and its channels: wraps next to the dot, never under it. */186 /* The state, where it runs and its channels: wraps next to the dot, never under it. */
184- .facts { flex: 1; min-width: 0; overflow-wrap: anywhere; }187+ .facts { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
185 .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }188 .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
186 .dot.ready { background: var(--ok); }189 .dot.ready { background: var(--ok); }
187 .dot.busy, .dot.starting { background: var(--warn); }190 .dot.busy, .dot.starting { background: var(--warn); }
added frontend/src/lib/agentHeader.test.ts +16 -0
new file mode 100644
@@ -0,0 +1,16 @@
1+// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE
2+import { describe, expect, it } from 'vitest'
3+import { fewChannels, placeOf } from './agentHeader'
4+
5+describe("the line under an agent's name", () => {
6+ it('says where the agent runs, without its folder', () => {
7+ expect(placeOf('sandbox mini-coder-sbx · /Users/k33g/Documents/Sidekicks-Agents/mini-coder', 'on this computer')).toBe('sandbox mini-coder-sbx')
8+ expect(placeOf('container mario · /agents/mario', 'on this computer')).toBe('container mario')
9+ expect(placeOf('local · /Users/me/alice', 'on this computer')).toBe('on this computer')
10+ })
11+ it('names two channels at most, then how many more', () => {
12+ expect(fewChannels(['#general', '#various'])).toBe('#general, #various')
13+ expect(fewChannels(['#a', '#b', '#c', '#d'])).toBe('#a, #b +2')
14+ expect(fewChannels([])).toBe('')
15+ })
16+})
new file mode 100644
@@ -0,0 +1,16 @@
1+// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE
2+import { describe, expect, it } from 'vitest'
3+import { fewChannels, placeOf } from './agentHeader'
4+
5+describe("the line under an agent's name", () => {
6+ it('says where the agent runs, without its folder', () => {
7+ expect(placeOf('sandbox mini-coder-sbx · /Users/k33g/Documents/Sidekicks-Agents/mini-coder', 'on this computer')).toBe('sandbox mini-coder-sbx')
8+ expect(placeOf('container mario · /agents/mario', 'on this computer')).toBe('container mario')
9+ expect(placeOf('local · /Users/me/alice', 'on this computer')).toBe('on this computer')
10+ })
11+ it('names two channels at most, then how many more', () => {
12+ expect(fewChannels(['#general', '#various'])).toBe('#general, #various')
13+ expect(fewChannels(['#a', '#b', '#c', '#d'])).toBe('#a, #b +2')
14+ expect(fewChannels([])).toBe('')
15+ })
16+})
added frontend/src/lib/agentHeader.ts +32 -0
new file mode 100644
@@ -0,0 +1,32 @@
1+// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE
2+
3+// The short line under an agent's name in its view: its state, where it
4+// runs and its channels — without its folder's full path, which made the
5+// line far too long ("ready · sandbox mini-coder-sbx · /Users/…/mini-coder ·
6+// in #general, #various"). The full text goes in the line's tooltip.
7+
8+/**
9+ * Where the agent runs, without its folder: WorkspaceService.Info gives
10+ * "local · /path" or "<kind> <name> · /path"; local becomes here (the
11+ * interface's words for "on this computer").
12+ *
13+ * @example
14+ * placeOf('sandbox mini-coder-sbx · /Users/me/x', 'on this computer') // 'sandbox mini-coder-sbx'
15+ * placeOf('local · /Users/me/x', 'on this computer') // 'on this computer'
16+ */
17+export function placeOf(location: string, here: string): string {
18+ const place = location.split(' · ')[0].trim()
19+ return place === 'local' ? here : place
20+}
21+
22+/**
23+ * The first channels, then how many more: a line stays short however many
24+ * channels the agent is in.
25+ *
26+ * @example
27+ * fewChannels(['#a', '#b', '#c', '#d']) // '#a, #b +2'
28+ */
29+export function fewChannels(channels: string[], shown = 2): string {
30+ const first = channels.slice(0, shown).join(', ')
31+ return channels.length > shown ? `${first} +${channels.length - shown}` : first
32+}
new file mode 100644
@@ -0,0 +1,32 @@
1+// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE
2+
3+// The short line under an agent's name in its view: its state, where it
4+// runs and its channels — without its folder's full path, which made the
5+// line far too long ("ready · sandbox mini-coder-sbx · /Users/…/mini-coder ·
6+// in #general, #various"). The full text goes in the line's tooltip.
7+
8+/**
9+ * Where the agent runs, without its folder: WorkspaceService.Info gives
10+ * "local · /path" or "<kind> <name> · /path"; local becomes here (the
11+ * interface's words for "on this computer").
12+ *
13+ * @example
14+ * placeOf('sandbox mini-coder-sbx · /Users/me/x', 'on this computer') // 'sandbox mini-coder-sbx'
15+ * placeOf('local · /Users/me/x', 'on this computer') // 'on this computer'
16+ */
17+export function placeOf(location: string, here: string): string {
18+ const place = location.split(' · ')[0].trim()
19+ return place === 'local' ? here : place
20+}
21+
22+/**
23+ * The first channels, then how many more: a line stays short however many
24+ * channels the agent is in.
25+ *
26+ * @example
27+ * fewChannels(['#a', '#b', '#c', '#d']) // '#a, #b +2'
28+ */
29+export function fewChannels(channels: string[], shown = 2): string {
30+ const first = channels.slice(0, shown).join(', ')
31+ return channels.length > shown ? `${first} +${channels.length - shown}` : first
32+}
modified frontend/src/lib/i18n/messages.ts +2 -0
@@ -318,6 +318,7 @@ export const en = {
318318 'workspace.removeSandboxCancel': 'Cancel',
319319 'workspace.channels': 'in {channels}',
320320 'workspace.noChannel': 'in no channel',
321+ 'workspace.here': 'on this computer',
321322 'workspace.showHidden': 'Show hidden files',
322323 'workspace.newFile': '+ New file',
323324 'workspace.newFolder': '+ New folder',
@@ -860,6 +861,7 @@ export const fr: Record<MessageKey, string> = {
860861 'workspace.removeSandboxCancel': 'Annuler',
861862 'workspace.channels': 'dans {channels}',
862863 'workspace.noChannel': 'dans aucun channel',
864+ 'workspace.here': 'sur cet ordinateur',
863865 'workspace.showHidden': 'Afficher les fichiers cachés',
864866 'workspace.newFile': '+ Nouveau fichier',
865867 'workspace.newFolder': '+ Nouveau dossier',
@@ -318,6 +318,7 @@ export const en = {
318 'workspace.removeSandboxCancel': 'Cancel',318 'workspace.removeSandboxCancel': 'Cancel',
319 'workspace.channels': 'in {channels}',319 'workspace.channels': 'in {channels}',
320 'workspace.noChannel': 'in no channel',320 'workspace.noChannel': 'in no channel',
321+ 'workspace.here': 'on this computer',
321 'workspace.showHidden': 'Show hidden files',322 'workspace.showHidden': 'Show hidden files',
322 'workspace.newFile': '+ New file',323 'workspace.newFile': '+ New file',
323 'workspace.newFolder': '+ New folder',324 'workspace.newFolder': '+ New folder',
@@ -860,6 +861,7 @@ export const fr: Record<MessageKey, string> = {
860 'workspace.removeSandboxCancel': 'Annuler',861 'workspace.removeSandboxCancel': 'Annuler',
861 'workspace.channels': 'dans {channels}',862 'workspace.channels': 'dans {channels}',
862 'workspace.noChannel': 'dans aucun channel',863 'workspace.noChannel': 'dans aucun channel',
864+ 'workspace.here': 'sur cet ordinateur',
863 'workspace.showHidden': 'Afficher les fichiers cachés',865 'workspace.showHidden': 'Afficher les fichiers cachés',
864 'workspace.newFile': '+ Nouveau fichier',866 'workspace.newFile': '+ Nouveau fichier',
865 'workspace.newFolder': '+ Nouveau dossier',867 'workspace.newFolder': '+ Nouveau dossier',