Skip to content
Merged
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ list, which the interactive UI opens as a full screen with `esc`:
"days": 7,
"repo": "cwd",
"statuses": "all",
"sources": ["cli", "manual"]
"sources": ["cli", "web"]
}
}
```
Expand All @@ -182,7 +182,7 @@ hides sessions that have not moved in that long; `0` means no age cutoff. `repo`
list only sessions on the repository your shell is in, or `"any"` for all of
them. `statuses` is `"unfinished"` to leave out the sessions that finished,
errored, or were stopped, or `"all"` to keep them. `sources` lists only sessions
started those ways (`react`, `manual`, `api`, `cli`, `mention`, `cron`); leave it
started those ways (`react`, `web`, `api`, `cli`, `mention`, `cron`); leave it
out for all of them.

Every field is optional and the defaults above are what you get with no
Expand Down
2 changes: 1 addition & 1 deletion src/commands/session.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ export function registerSession(program: Command): void {
'ls',
).addHelpText(
'after',
'\nSources: react, manual, api, cli, mention, cron. ' +
'\nSources: react, web, api, cli, mention, cron. ' +
'--since/--until accept ISO 8601 or "today", "yesterday", "N days ago".',
),
'GET /v1/sessions',
Expand Down
2 changes: 1 addition & 1 deletion src/lib/args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function toNumber(value: string): number {
// fails fast with the full list instead of a server-side 422.
export const SESSION_SOURCES = [
'react',
'manual',
'web',
'api',
'cli',
'mention',
Expand Down
6 changes: 3 additions & 3 deletions src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export interface SessionBarConfig {
// "unfinished" drops the sessions that completed, errored, or were stopped,
// leaving the conversations still going. "all" keeps them.
statuses?: 'all' | 'unfinished'
// Only sessions started these ways, e.g. ["cli", "manual"]. An empty list
// Only sessions started these ways, e.g. ["cli", "web"]. An empty list
// means every source. Laptop sessions never appear whatever this says: there
// is nothing in the cloud to open.
sources?: string[]
Expand Down Expand Up @@ -243,12 +243,12 @@ export const SESSION_BAR_DEFAULTS: Required<Omit<SessionBarConfig, 'sources'>> &
days: 7,
repo: 'cwd',
statuses: 'all',
sources: ['manual', 'cli', 'mention'],
sources: ['web', 'cli', 'mention'],
}

export type ResolvedSessionBar = typeof SESSION_BAR_DEFAULTS

const SESSION_SOURCES = ['react', 'manual', 'api', 'cli', 'mention', 'cron']
const SESSION_SOURCES = ['react', 'web', 'api', 'cli', 'mention', 'cron']

// The session bar's settings, defaults filled in — set them under
// `"sessionBar"` in ~/.ellipsis/config.json. A value of the wrong type or
Expand Down
2 changes: 1 addition & 1 deletion src/lib/sessions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export const SESSION_BAR_FETCH = 50

// The picker header's description of the bar's active filters — the answer to
// "where are the rest of my sessions?". Mirrors sessionBarQuery, with one
// exception: the default sources are not named, since "manual/cli/mention" is
// exception: the default sources are not named, since "web/cli/mention" is
// what everyone sees and answers no question. null when there is nothing to say.
export function sessionBarFilterLabel(
bar: {
Expand Down
2 changes: 1 addition & 1 deletion test/args.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ describe('collectSource / collectStatus', () => {
})

it('reject unknown values listing the valid ones', () => {
expect(() => collectSource('slack', [])).toThrow(/source must be one of: react, manual/)
expect(() => collectSource('slack', [])).toThrow(/source must be one of: react, web/)
expect(() => collectStatus('done', [])).toThrow(/status must be one of: scheduled/)
})
})
Expand Down
6 changes: 3 additions & 3 deletions test/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,15 @@ describe('sessionBar', () => {
days: 30,
repo: 'any',
statuses: 'unfinished',
sources: ['cli', 'manual'],
sources: ['cli', 'web'],
},
})
expect(sessionBar()).toEqual({
hidden: true,
days: 30,
repo: 'any',
statuses: 'unfinished',
sources: ['cli', 'manual'],
sources: ['cli', 'web'],
})
})

Expand Down Expand Up @@ -262,7 +262,7 @@ describe('sessionBar', () => {

it('defaults to the human-started sources when the key is absent', () => {
writeConfig({ version: 2, hosts: {}, sessionBar: { days: 3 } })
expect(sessionBar().sources).toEqual(['manual', 'cli', 'mention'])
expect(sessionBar().sources).toEqual(['web', 'cli', 'mention'])
})

it('takes days 0 as "no age cutoff", not as a missing value', () => {
Expand Down