diff --git a/docs/conversations.md b/docs/conversations.md index 806f0d974..0e4b8d1c2 100644 --- a/docs/conversations.md +++ b/docs/conversations.md @@ -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. @@ -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. diff --git a/docs/internals/development.md b/docs/internals/development.md index 0c6187255..3a89efc1c 100644 --- a/docs/internals/development.md +++ b/docs/internals/development.md @@ -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 diff --git a/packages/ui/src/app/boot.test.ts b/packages/ui/src/app/boot.test.ts index 83fdf5994..8ca119147 100644 --- a/packages/ui/src/app/boot.test.ts +++ b/packages/ui/src/app/boot.test.ts @@ -41,7 +41,7 @@ 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(`${row} [data-testid$=-toggle]`).click(); @@ -49,7 +49,7 @@ test('Alt+digit reaches the history unfolded under an idle project, after the li 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 = []; } diff --git a/packages/ui/src/components/DoneThread.svelte b/packages/ui/src/components/DoneThread.svelte index 28a008497..4e5a344ff 100644 --- a/packages/ui/src/components/DoneThread.svelte +++ b/packages/ui/src/components/DoneThread.svelte @@ -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. */ @@ -76,10 +78,11 @@ -
m.store === owner)?.id} +
m.store === owner)?.id} oncontextmenu={(event) => contextMenu.open(event, items, pick)} use:longPress={(target) => !!target.closest('.row')}>
@@ -466,9 +464,6 @@ {#if doneOpen}{/if} show('chat')} />
- {#if groupRows.length === 0 && !group.project.archivedThreads && drafts.length === 0}

{strings.sidebar.noThreads}

{/if} @@ -480,7 +475,7 @@ {#if sections.working.length > 0}{@render projectRows(sections.working)}{/if} {@render projectRows(sections.open)} {#if groups.length > 0 && sections.working.length + sections.open.length === 0}

{strings.sidebar.noActiveProjects}

{/if} - {#if sections.later.length > 0}{@render projectRows(sections.later, true)}{/if} + {#if sections.paused.length > 0}{@render projectRows(sections.paused)}{/if} show('chat')} /> show('chat')} /> {@render contacts()} diff --git a/packages/ui/src/components/ProjectCardsSection.svelte b/packages/ui/src/components/ProjectCardsSection.svelte index d98c5214b..bc329ee12 100644 --- a/packages/ui/src/components/ProjectCardsSection.svelte +++ b/packages/ui/src/components/ProjectCardsSection.svelte @@ -1,39 +1,36 @@
- - {#snippet icon()}{#if kind === 'working'}{/snippet} + projectThreadView.toggleFold(kind)}> + {#snippet icon()}{#if kind === 'working'}{/snippet}
{@render children()}
diff --git a/packages/ui/src/components/ProjectShelf.svelte b/packages/ui/src/components/ProjectShelf.svelte index 5b31375fe..de370ded0 100644 --- a/packages/ui/src/components/ProjectShelf.svelte +++ b/packages/ui/src/components/ProjectShelf.svelte @@ -1,5 +1,5 @@ -{#each groups as { machine, rows } (machine.id)} - {#if multi} -
- - {machine.label} -
- {/if} -
    - {#each rows as project (project.id)} +
      + {#each rows as entry (key(entry.machine, entry.project))} + {@const { machine, project } = entry} {@const here = key(machine, project)} - {@const entry = { machine, project }} {@const kept = kind === 'idle' ? history.filter(list => archiveCount(project, list) > 0) : []} {@const controls = `${uid}-${encodeURIComponent(here)}`} @@ -142,11 +130,12 @@ type="button" class="ghost main" data-testid="{kind}-project-open" - title={`${rowTitle(project)}\n${project.path}`} + title={`${rowTitle(machine, project)}\n${project.path}`} disabled={busy !== null} onclick={(event) => start(event, machine, project)} > - + + {#if multi}{/if} {projectName(project)} {#if project.missing === true}{/if} @@ -194,23 +183,9 @@ {/each} {/each} -
    -{/each} +