ui: list only human-started sessions by default - #132
Conversation
The startup session list showed every source, so automatic PR reviews and cron runs buried the sessions you were actually working in. Default to manual/cli/mention; an explicit empty list in config still asks for all.
There was a problem hiding this comment.
Caution
Changes requested ❌ — 3 issues
Reviewed 2dfd5ab in 5 minutes, 14 seconds.
- Reviewed
1commit with77lines of code in3files - Ran
1review agent producing3comments where3were posted - This pipeline runs no gatekeeper, so findings are posted as written.
- View full details on ellipsis.dev
This review was created by . You can tag
@ellipsis in this pull request.
| repo: 'cwd', | ||
| statuses: 'all', | ||
| sources: undefined, | ||
| sources: ['manual', 'cli', 'mention'], |
There was a problem hiding this comment.
The new default silently drops api sessions too, not just react/cron; add api to the list.
SESSION_SOURCES (config.ts:251) has six values and the default keeps three, so api is filtered out as well — neither the comment at 237-238 nor the PR description mentions it. The CLI is documented to run against an ELLIPSIS_API_TOKEN credential (config.ts:288, and test/sessions.test.ts:246 covers the API-key path), and the server derives a session's source from the credential (constants.ts:17), so sessions this CLI starts under an API key come back as api. With this default the poll (SessionsApp.tsx:164) sends source=manual,cli,mention and never returns them — a user authenticated by env token sees an empty session list containing none of their own sessions.
| sources: ['manual', 'cli', 'mention'], | |
| sources: ['manual', 'cli', 'mention', 'api'], |
| const sources = Array.isArray(raw.sources) | ||
| ? raw.sources.filter((s) => SESSION_SOURCES.includes(s)) | ||
| : undefined | ||
| : null |
There was a problem hiding this comment.
A sources list whose entries are all unknown still resolves to "every source", so a typo now widens the list instead of narrowing it — fall back to the default instead.
With {"sessionBar": {"sources": ["mannual"]}} the filter at 261 yields [], line 277 maps that to undefined, and sessionBarQuery omits the source filter — the user asked for one source and gets react and cron as well. Before this change undefined and "key absent" were the same thing, so the typo was harmless; now it is the widest possible setting. (test/config.test.ts:259 pins the old behavior and would need updating.)
| const sources = Array.isArray(raw.sources) | |
| ? raw.sources.filter((s) => SESSION_SOURCES.includes(s)) | |
| : undefined | |
| : null | |
| const known = Array.isArray(raw.sources) | |
| ? raw.sources.filter((s) => SESSION_SOURCES.includes(s)) | |
| : null | |
| // An all-unknown list is a typo, not the [] "every source" escape hatch. | |
| const sources = | |
| known && known.length === 0 && Array.isArray(raw.sources) && raw.sources.length > 0 | |
| ? null | |
| : known |
| // Only sessions started these ways, e.g. ["cli", "manual"]. An empty list | ||
| // means every source. Laptop sessions never appear whatever this says: there | ||
| // is nothing in the cloud to open. |
There was a problem hiding this comment.
README's sessionBar docs now contradict this behavior and need the same edit.
README:188-190 says sources "lists only sessions started those ways ...; leave it out for all of them", and README:192 says the sample block's values "are what you get with no sessionBar at all". After this change omitting the key hides react/cron and [] is the only way to get them back — nothing in the README mentions either, and sessionBarFilterLabel (the one place that would have explained it in the UI) has no callers, so a user whose automated sessions vanished has no documented path back.
Summary
manual,cli,mentionsources;reactandcronno longer appear."sources": []in~/.ellipsis/config.jsonstill means every source.Test plan
npm run typechecknpx vitest runImportant
Session bar defaults to human-started sources only, hiding automated session sources.
manual,cli, andmentionsources by default;reactandcronautomated sessions no longer appear."sources": []in~/.ellipsis/config.jsonrestores all sources including automated ones.This description was created by
for 2dfd5ab. It will automatically update as commits are pushed.