mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
feat(web): replace machine tree level with filter chips in session list
Single-machine users no longer expand a redundant machine layer; with multiple machines a chip filter bar (persisted, with hover health popup) replaces the collapsible machine headers. Directory groups now render top-level with machine-name suffixes when unfiltered. Also removes the redundant session/project count header text.
This commit is contained in:
@@ -429,29 +429,25 @@ describe('getNextSessionVisibleCount', () => {
|
||||
})
|
||||
|
||||
describe('expandSelectedSessionCollapseOverrides', () => {
|
||||
it('expands collapsed project and machine, but preserves session preview folding', () => {
|
||||
it('expands the collapsed project group, but preserves session preview folding', () => {
|
||||
const overrides = new Map<string, boolean>([
|
||||
['machine-1::/work/hapi', true],
|
||||
['sessions::machine-1::/work/hapi', true],
|
||||
['machine::machine-1', true]
|
||||
['sessions::machine-1::/work/hapi', true]
|
||||
])
|
||||
|
||||
const result = expandSelectedSessionCollapseOverrides(overrides, {
|
||||
key: 'machine-1::/work/hapi',
|
||||
machineId: 'machine-1'
|
||||
key: 'machine-1::/work/hapi'
|
||||
})
|
||||
|
||||
expect(result.get('machine-1::/work/hapi')).toBe(false)
|
||||
expect(result.get('sessions::machine-1::/work/hapi')).toBe(true)
|
||||
expect(result.get('machine::machine-1')).toBe(false)
|
||||
})
|
||||
|
||||
it('leaves missing session preview override unset', () => {
|
||||
const overrides = new Map<string, boolean>()
|
||||
|
||||
const result = expandSelectedSessionCollapseOverrides(overrides, {
|
||||
key: 'machine-1::/work/hapi',
|
||||
machineId: 'machine-1'
|
||||
key: 'machine-1::/work/hapi'
|
||||
})
|
||||
|
||||
expect(result.has('sessions::machine-1::/work/hapi')).toBe(false)
|
||||
|
||||
Reference in New Issue
Block a user