Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion docs/conversations.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ The conversations already loaded stay available while Boite reloads it.
Fold a project to hide its threads. Its heading shows the thread count just
after the project name, on desktop and phone.

In the Projects view, the projects where something needs you come first.
Below them, Inactive gathers the projects where no thread runs and nothing
waits on you; fold it to hide them. No threads, closed at launch, lists the
projects without a single thread: choose one to start a thread there. Archived
projects come last, closed too. Turn off Inactive projects in the Filter menu
to keep every project in the main list.

A thread with a pull request keeps its last badge on this device. When you
reopen Boite, the badge can appear as soon as the thread is listed, and Boite
updates it when it checks again.
Expand Down Expand Up @@ -169,7 +176,8 @@ above the message box or the bottom tabs.
Restore and Delete. Select a title to read the conversation. Restore it from
the row or from the open conversation before sending a message. Restoring brings back your message
draft. Its agent starts again with your first message.
- A project's Done list shows ten rows at a time; scroll it for the rest.
- A project's Done list opens from the Done count in its heading, on desktop
and phone, and shows ten rows at a time; scroll it for the rest.
The row shows when each conversation was put away. To reveal Restore on
desktop, point to the row or focus it with the keyboard. Restore is visible
on touch screens.
Expand Down
24 changes: 14 additions & 10 deletions docs/internals/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -415,24 +415,28 @@ includes running, queued and background work. Pins and unsent
drafts stay visible while Working is folded and appear once when expanded;
questions and failures stay in the main list. Done and Archived read only that project's
archived summaries when expanded, with the same reading and restore actions as
Recent. Set aside, below the open projects, holds the projects with nothing open
but conversations archived by hand: archiving is how work is put away to pick up
later, so those projects keep a card whose body is that list, drawn at once and
read like open rows, with no Archived pill while the card is unfolded. Working
and Set aside start open; their headers fold them for the session.
Two closed folds below, on desktop and phone, hold the projects with no card
Recent. Inactive (section `paused`), below the open projects, holds the projects whose every
conversation rests: none at work, none with news, a question, a failure, a pin
or unsent text, and no new draft, so folding it hides nothing that waits on the
user. A project leaves it as soon as a conversation starts or needs the user.
Two folds below, on desktop and phone, hold the projects with no thread to show
(`ProjectShelf.svelte`, its rows in `ProjectShelfRows.svelte`, loaded at the
first opening or once the list has drawn): Idle projects, with nothing to do,
at most a done history, then Archived projects, a step quieter. Choosing an idle row starts a draft
first opening or once the list has drawn): No threads, without a single
conversation (archived and done history aside), then Archived projects, a step
quieter. Their rows are the cards' headers, in one list by name whatever the
machine, its icon on the header once several are listed. Choosing an idle row starts a draft
there; choosing an archived row restores the project, then starts a draft. Under
the pointer a row archives (idle) or restores and removes (archived) without
opening anything; its full menu opens with a right click or a long press, and an
idle row takes a dragged thread. An idle project
with done conversations shows that count on its row, which unfolds
with done or archived conversations shows each count on its row, which unfolds
that history under it. Creating or restoring a conversation or starting a draft
returns its project to the open cards. In the custom order a project moves among
the cards of its own section.
Group idle projects, in settings and the Display options panel, can be disabled
Every fold starts from one table, `PROJECT_FOLDS_OPEN`: Working and Inactive open,
No threads and Archived projects closed. A header folds its section for the
session; the next launch starts from the table again.
Group inactive projects, in settings and the Display options panel, can be disabled
to keep every project but the Working ones as open cards, in their normal order. Both grouping preferences persist on
the device. Expansion follows the owning project between desktop and phone for
the current session. Phone search exposes matching
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/app/boot.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ test('Alt+digit reaches the history unfolded under an idle project, after the li
expect(sidebarRows.list.map(entry => entry.threadId)).toEqual(drawn());
await store.open('t-trace');
await store.archive('t-descriptors', true);
projectThreadView.shelfOpen = true;
projectThreadView.folds.idle = true;
const row = '[data-testid=idle-project][data-project-id="p-notes"]';
await waitFor(() => document.querySelector(`${row} [data-testid$=-toggle]`) !== null);
query<HTMLButtonElement>(`${row} [data-testid$=-toggle]`).click();
await waitFor(() => document.querySelector(`${row} [data-testid=done-thread]`) !== null);
await waitFor(() => sidebarRows.list.at(-1)?.threadId === 't-descriptors');
expect(sidebarRows.list.map(entry => entry.threadId)).toEqual([...store.threadsOf('p-boite').map(() => expect.any(String)), 't-descriptors']);
} finally {
projectThreadView.shelfOpen = false;
projectThreadView.folds.idle = false;
projectThreadView.done = [];
projectThreadView.archived = [];
}
Expand Down
52 changes: 39 additions & 13 deletions packages/ui/src/components/DoneThread.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@
import { workspace, type Machine } from '../lib/workspace.svelte';
import { longPress } from '../lib/long-press';
import MachineIcon from './MachineIcon.svelte';
import ProviderLogo from './ProviderLogo.svelte';
import Menu from './Menu.svelte';

/**
* A done or archived conversation, drawn like a thread row and on its column: the title
* (the agent only in its tooltip), when it was put away, and under it the pull request it ended
* A done or archived conversation, drawn like a thread row and on its columns (ThreadCard.svelte's classic row):
* the agent's mark, the title on the live titles' edge, when it was put away where a live row ends on its time,
* and under it the pull request it ended
* with, which opens on the forge. The row reads the conversation and its
* actions keep restoration separate.
*/
Expand Down Expand Up @@ -76,10 +78,11 @@
</script>

<!-- svelte-ignore a11y_no_static_element_interactions -->
<div class="done-thread" class:open data-testid="done-thread" data-thread-id={thread.id} data-machine-id={machine?.id ?? workspace.machines.find(m => m.store === owner)?.id}
<div class="done-thread" class:open class:restorable={thread.archived} data-testid="done-thread" data-thread-id={thread.id} data-machine-id={machine?.id ?? workspace.machines.find(m => m.store === owner)?.id}
oncontextmenu={(event) => contextMenu.open(event, items, pick)} use:longPress={(target) => !!target.closest('.row')}>
<button type="button" class="ghost row" data-testid="done-thread-open" title="{thread.title} · {agent}" disabled={deleting} onclick={select}>
<span class="headline">
<span class="provider" aria-hidden="true"><ProviderLogo providerId={thread.providerId} size={14} /></span>
{#if machine}
<span class="machine" title={machine.label} aria-label={machine.label}><MachineIcon icon={machine.icon} os={owner.core?.os} /></span>
{/if}
Expand Down Expand Up @@ -111,14 +114,19 @@

<style>
.done-thread {
/* The thread row's own measures (ThreadCard.svelte), so both lists share one column and one height. */
--pad-x: 8px;
/* The classic thread row's measures (ThreadCard.svelte): its sides, its 34 px line, the agent's mark stepped out
under the project's tile, so a done title starts where a live one does and its time ends where theirs end. */
--pad-x: 10px;
--provider-shift: 4px;
--act: max(32px, var(--control-sm));
--act-room: calc(var(--act) + 3px);
position: relative;
font-size: 13.5px;
border-radius: var(--radius-md);
transition: background var(--dur-2) var(--ease-out-quint);
-webkit-touch-callout: none;
}
.done-thread.restorable { --act-room: calc(2 * var(--act) + 3px); }
.done-thread:hover, .done-thread:focus-within { background: var(--color-hover); }
.done-thread.open { background: var(--color-active); }
.row {
Expand All @@ -127,15 +135,17 @@
align-items: stretch;
width: 100%;
height: auto;
min-height: 32px;
padding: 6px calc(2 * max(var(--control-sm), var(--icon-button-target)) + var(--pad-x)) 6px var(--pad-x);
min-height: var(--row);
padding: 7px var(--pad-x);
gap: 4px;
background: transparent;
}
.row::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.row:hover:not(:disabled) { background: transparent; }
.row:active:not(:disabled) { transform: none; }
.headline { display: flex; align-items: center; min-width: 0; min-height: 20px; gap: 8px; }
.headline { display: flex; align-items: center; min-width: 0; min-height: 20px; gap: 6px; margin-left: calc(-1 * var(--provider-shift)); }
/* Put away: the mark a step back, like the title, and both wake under the pointer. */
.provider { display: inline-flex; flex: none; margin-right: 4px; opacity: 0.5; transition: opacity var(--dur-2) var(--ease-out-quint); }
.machine { display: inline-flex; align-items: center; flex: none; color: var(--color-muted-foreground); }
/* Done or archived, put away: a step quieter than the live rows above it (lighter ink, regular weight), and it
wakes under the pointer. */
Expand All @@ -150,14 +160,17 @@
font-weight: 400;
transition: color var(--dur-2) var(--ease-out-quint);
}
.done-thread:hover .title, .done-thread:focus-within .title, .done-thread.open .title { color: var(--color-foreground); }
time { flex: none; color: var(--color-subtle); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.done-thread:is(:hover, :focus-within, .open) .title { color: var(--color-foreground); }
.done-thread:is(:hover, :focus-within, .open) .provider { opacity: 1; }
time { flex: none; color: var(--color-subtle); font-size: var(--text-xs); font-variant-numeric: tabular-nums; transition: opacity var(--dur-2) var(--ease-out-quint); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.metadata {
display: flex;
align-items: center;
flex-wrap: wrap;
padding: 0 var(--pad-x) 8px;
/* Under the title, past the mark. */
padding: 0 var(--pad-x) 8px calc(var(--pad-x) + 20px);
margin-top: -3px;
gap: 9px;
min-width: 0;
pointer-events: none;
Expand All @@ -184,13 +197,26 @@
/* The badge's softened red (PullRequestBadge.svelte): a closed pull request is read, never shouted. */
.pr.closed { color: color-mix(in oklch, var(--color-danger) 60%, var(--color-muted-foreground)); }
.pr:hover span, .pr:focus-visible span { text-decoration: underline; text-underline-offset: 3px; }
.actions { position: absolute; display: flex; align-items: center; top: 0; right: 0; opacity: 0; }
/* Centred on the title's line, at the row's end. They show under the pointer and take the time's place, which fades
where it stands, while the title's last letters melt away under them, as on a live row. */
.actions { position: absolute; display: flex; align-items: center; top: calc(var(--row) / 2 - var(--act) / 2); right: 3px; opacity: 0; transition: opacity var(--dur-2) var(--ease-out-quint); }
.done-thread:is(:hover, :focus-within) .actions { opacity: 1; }
.done-thread:is(:hover, :focus-within) time { opacity: 0; }
.done-thread:is(:hover, :focus-within) .headline { mask-image: linear-gradient(to left, transparent calc(var(--act-room) - var(--pad-x)), black calc(var(--act-room) - var(--pad-x) + 12px)); }
/* No pointer to wait for: the buttons always show, and the title's line, its time included, ends before them. */
@media (hover: none), (pointer: coarse) {
.actions { opacity: 1; }
.headline { margin-right: calc(var(--act-room) + 4px - var(--pad-x)); }
.done-thread:is(:hover, :focus-within) time { opacity: 1; }
.done-thread:is(:hover, :focus-within) .headline { mask-image: none; }
}
@media (max-width: 720px) {
.row { min-height: var(--touch-target); }
/* A phone's live rows (MobileThreadRow.svelte) sit further in: the same title edge there too. */
.done-thread { --pad-x: 16px; }
.actions { opacity: 1; }
.headline { margin-right: calc(var(--act-room) + 4px - var(--pad-x)); }
.done-thread:is(:hover, :focus-within) time { opacity: 1; }
.done-thread:is(:hover, :focus-within) .headline { mask-image: none; }
.actions :is(.restore, :global(.trigger)) { min-height: var(--touch-target); min-width: var(--touch-target); }
.title { font-size: var(--text-base); }
}
Expand Down
7 changes: 5 additions & 2 deletions packages/ui/src/components/GroupLabel.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@
font-weight: 500;
border-top: 1px solid var(--color-border);
}
.glyph { display: inline-flex; flex: none; }
/* On the rows' columns (ThreadCard.svelte's classic row): the glyph in the agent mark's 14 px slot, the name on the
titles' edge, the count where their times end. */
.glyph { display: inline-flex; flex: none; justify-content: center; width: 14px; margin: 0 4px 0 -3px; }
.working .glyph { color: var(--color-muted-foreground); }
.done .glyph { color: var(--color-success); }
.count { margin-left: auto; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .group-label { padding: 8px 12px; } }
/* A phone's rows (MobileThreadRow.svelte) start their titles 4 px further in. */
@media (max-width: 720px) { .group-label { padding: 8px 14px 8px 16px; } }
</style>
17 changes: 6 additions & 11 deletions packages/ui/src/components/MobileNavigation.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
let groups = $derived(projectView.sorted(machines.flatMap(machine => machine.store.projects.filter(project => !project.archived).map(project => ({ machine, project })))));
/** The thread list on screen, with projects to show: its header names its two views. */
let threadViews = $derived(headerList === 'threads' && store.page === 'chat' && !recover && groups.length > 0);
/** At work on top when working grouping is on, open, then set aside; idle projects go to their fold, as on the desktop. */
/** At work on top when working grouping is on, open, then paused; idle projects go to their fold, as on the desktop. */
let sections = $derived(projectSections(groups, recentPreferences.groupOtherProjects, recentPreferences.groupWorking));
let shelved = $derived(machines.flatMap(machine => machine.store.projects.filter(project => project.archived === true).map(project => ({ machine, project }))));
let selected = $derived(projectView.selected(groups));
Expand Down Expand Up @@ -307,7 +307,6 @@
const key = projectKey(entry);
return Object.values(sections).find(list => list.some(other => projectKey(other) === key)) ?? groups;
}
/** A set-aside project shows its archived conversations as its body, with no pill for them. */
</script>

{#snippet connection()}
Expand Down Expand Up @@ -407,12 +406,11 @@
onaction={action => rowAction(row.machine.store, row.thread, action, row.machine.id)} />
{/snippet}
{#if listScreen === 'threads' && workspace.view === 'projects'}
{#snippet projectRows(projects: ProjectEntry[], later = false)}
{#snippet projectRows(projects: ProjectEntry[])}
{#each projects as group (projectKey(group))}
{@const groupRows = rowsByProject.get(group.machine.id)?.get(group.project.id) ?? []}
{@const workingOpen = projectThreadView.isOpen(group, 'working')}
{@const doneOpen = archiveCount(group.project, 'done') > 0 && doneFilter.shown}
{@const archivedOpen = later && archiveCount(group.project, 'archived') > 0}
{@const doneOpen = archiveCount(group.project, 'done') > 0 && (doneFilter.shown || projectThreadView.isOpen(group, 'done'))}
{@const workingRows = groupRows.filter(row => workingThread(row.machine.store, row.thread))}
{@const needsHere = needsCount(group)}
{@const waitingHere = needsHere.count}
Expand All @@ -424,7 +422,7 @@
{@const drafts = group.machine.store.draftEntries.filter(entry => entry.projectId === group.project.id)}
{@const folded = !query && group.machine.store.isCollapsed(group.project.id)}
{@const rollup = folded && group.machine.store.connection === 'ready' ? projectRollup(group.machine.store.threadsOf(group.project.id), thread => rowAsks(group.machine.store, thread.id)) : null}
{#if !query || groupRows.length > 0 || doneOpen || archivedOpen}
{#if !query || groupRows.length > 0 || doneOpen}
<section class="project-group" class:inactive={!activeProject(group)} class:folded data-testid="mobile-project-group" data-project-id={group.project.id} data-machine-id={group.machine.id}>
<div class="project-heading" data-row-edge>
<!-- The tile and the name fold the project, as its header does on the desktop; the counters and menus beside them keep their own action.
Expand All @@ -440,7 +438,7 @@
{ id: 'down', label: strings.sidebar.moveProjectDown, disabled: projectKey(foldOf(group).at(-1)!) === projectKey(group) }
]} onpick={action => projectView.step(foldOf(group), projectKey(group), action === 'up' ? -1 : 1)} label={strings.sidebar.customOrder} placement="bottom" variant="ghost" testid="mobile-project-order"><ArrowUpDown size={18} /></Menu>
{/if}
<!-- The desktop header's menu: a new thread here, the path, archived threads and their switch (a set-aside group always shows them), managing the project. -->
<!-- The desktop header's menu: a new thread here, the path, archived threads, managing the project. -->
<button type="button" class="ghost icon project-actions" data-testid="mobile-project-menu" title={strings.sidebar.projectMenu} aria-label={strings.sidebar.projectMenu}
onclick={(event) => projectMenu(event, group.machine.store, group.project, undefined, () => show('chat'), { count: archiveCount(group.project, 'archived') })}><Ellipsis size={18} /></button>
</div>
Expand All @@ -466,9 +464,6 @@
{#if doneOpen}<GroupLabel kind="done" count={query ? undefined : archiveCount(group.project, 'done')} />{/if}
<RecentDone entries={[group]} {scrollRoot} {now} {query} open={doneOpen && !folded} header={false} cap={10} onopen={() => show('chat')} />
</div>
<div id="{controls}-archived" hidden={!archivedOpen} data-testid="project-archived">
<RecentDone kind="archived" entries={[group]} {scrollRoot} {now} {query} open={archivedOpen && !folded && (!later || projectThreadView.laterOpen)} header={false} cap={10} onopen={() => show('chat')} />
</div>
{#if groupRows.length === 0 && !group.project.archivedThreads && drafts.length === 0}<p class="empty">{strings.sidebar.noThreads}</p>{/if}
</div></div>
</section>
Expand All @@ -480,7 +475,7 @@
{#if sections.working.length > 0}<ProjectCardsSection kind="working" count={sections.working.length}>{@render projectRows(sections.working)}</ProjectCardsSection>{/if}
{@render projectRows(sections.open)}
{#if groups.length > 0 && sections.working.length + sections.open.length === 0}<p class="empty">{strings.sidebar.noActiveProjects}</p>{/if}
{#if sections.later.length > 0}<ProjectCardsSection kind="later" count={sections.later.length}>{@render projectRows(sections.later, true)}</ProjectCardsSection>{/if}
{#if sections.paused.length > 0}<ProjectCardsSection kind="paused" count={sections.paused.length}>{@render projectRows(sections.paused)}</ProjectCardsSection>{/if}
<ProjectShelf projects={sections.idle} multi={several} {now} {scrollRoot} onopen={() => show('chat')} />
<ProjectShelf kind="archived" projects={shelved} multi={several} {now} {scrollRoot} onopen={() => show('chat')} />
{@render contacts()}
Expand Down
Loading
Loading