GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(app): unslop sessions tab with view modes, collapsible groups, and running indicator by tomlin7 · Pull Request #60374 · anomalyco/opencode

feat(app): unslop sessions tab with view modes, collapsible groups, and running indicator #60374

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tomlin7 wants to merge 2 commits into anomalyco:dev from tomlin7:sessions-tab-unslop

Uh oh!

There was an error while loading. Please reload this page.

Closed

feat(app): unslop sessions tab with view modes, collapsible groups, and running indicator #60374

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2 commits
Select commit Hold shift + click to select a range
941806f
feat(app): add prompt navigation rail to the session timeline
tomlin7 Oct 21, 2026
9551198
feat(app): unslop sessions tab with view modes, collapsible groups, a…
tomlin7 Oct 29, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view

There are no files selected for viewing

27 changes: 27 additions & 0 deletions 27 packages/app/e2e/regression/timeline-geometry.spec.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,33 @@ for (const failed of [false, true]) {
})
}

test("parks a jumped-to prompt below the header from the prompt rail", async ({ page }) => {
await setupTimeline(page, { seedHistory: true })
const rail = page.locator('[data-slot="session-prompt-rail"]')
const bars = rail.getByRole("button")
await expect(rail).toBeVisible()
await expect(rail).toHaveRole("navigation")
await expect(rail).toHaveAccessibleName("Prompt navigation")
// One bar per user prompt: eighteen seeded history prompts and the newest one.
await expect(bars).toHaveCount(19)
await expect(rail.locator('[aria-current="location"]')).toHaveCount(1)
await expect(bars.last()).toHaveAttribute("aria-current", "location")

// The clicked prompt keeps the highlight even though the next prompt starts just below it.
await bars.nth(2).click()
await expect(bars.nth(2)).toHaveAttribute("aria-current", "location")
await expect(
page.locator('[data-timeline-row="UserMessage"][data-message-id="msg_00002_history_a_user"]'),
).toBeInViewport()
await expect(page.getByRole("button", { name: "Jump to latest" })).toBeVisible()
const scroller = page.locator(".scroll-view__viewport", { has: page.locator("[data-timeline-row]") })
expect(await scroller.evaluate((element) => element.scrollTop)).toBeGreaterThan(0)

// The rail sits in the gutter beside the transcript; a narrow panel hides it instead of covering text.
await page.setViewportSize({ width: 700, height: 900 })
await expect(rail).toBeHidden()
})

async function captureCardEdges(page: Page, card: Locator) {
const box = await card.boundingBox()

Expand Down
53 changes: 51 additions & 2 deletions 53 packages/app/src/home/sessions/controller.tsx
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ export type HomeSessionGroup = {
sessions: HomeSessionRecord[]
}

export type HomeSessionProjectGroup = {
id: string
projectWorktree: string
projectName: string
sessions: HomeSessionRecord[]
}

export type HomeSessionViewMode = "date" | "project"

export type OpenSessionOptions = { background?: boolean }

export function createHomeSessionsController(home: HomeController) {
Expand All @@ -49,6 +58,9 @@ export function createHomeSessionsController(home: HomeController) {
const platform = usePlatform()
const queryClient = useQueryClient()

const [viewMode, setViewMode] = createStore<{ mode: HomeSessionViewMode }>({ mode: "date" })
Comment thread

@opencodejr opencodejr Bot Oct 29, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

createStore isn't imported (only solid-js is), and neither is displayName at line 461. Type-checking fails, and this throws at runtime as soon as Home builds the sessions controller. record.projectName already holds the resolved display name, so you could use that instead of displayName.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
const [collapsedGroups, setCollapsedGroups] = createStore<Record<string, boolean>>({})

const projectDirectories = createMemo(() => {
const selected = home.selection.value().directory

Expand Down Expand Up @@ -101,7 +113,9 @@ export function createHomeSessionsController(home: HomeController) {
)

const records = createMemo(() => allRecords().slice(0, HOME_SESSION_LIMIT))
const groups = createMemo(() => groupSessions(records(), language))
const groups = createMemo(() =>
viewMode.mode === "project" ? groupSessionsByProject(records()) : groupSessions(records(), language),
)
const prefetched = new Set<string>()

const location = (record: HomeSessionRecord) => {
Expand Down Expand Up @@ -306,6 +320,11 @@ export function createHomeSessionsController(home: HomeController) {
groups,
loading: () => sessionLoad.isPending,
searchRecords: allRecords,
viewMode: () => viewMode.mode,
setViewMode: (mode: HomeSessionViewMode) => setViewMode({ mode }),
isGroupCollapsed: (id: string) => collapsedGroups[id] ?? false,
toggleGroupCollapse: (id: string) =>
setCollapsedGroups((prev) => ({ ...prev, [id]: !prev[id] })),
},
platform: {
desktop: platform.platform === "desktop",
Expand Down Expand Up @@ -425,13 +444,42 @@ function groupSessions(records: HomeSessionRecord[], language: ReturnType<typeof
].filter((group) => group.sessions.length > 0)
}

function groupSessionsByProject(records: HomeSessionRecord[]): HomeSessionProjectGroup[] {
Comment thread

@opencodejr opencodejr Bot Oct 29, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

groups can now return HomeSessionProjectGroup[], but createHomeScrollController in home/scroll.ts (used from route.tsx) is typed and keyed on the today/yesterday/older ids for its header offsets and title fades. Widening the view's prop types to string doesn't change that, so region.tsx fails type-checking. Giving project groups the same { id, title, sessions } shape as date groups would let the scroll code and the view handle both without casts.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
const groups = new Map<string, HomeSessionRecord[]>()

for (const record of records) {
const key = record.project.worktree
const existing = groups.get(key) ?? []
existing.push(record)
groups.set(key, existing)
}

return Array.from(groups.entries())
.map(([worktree, sessions]) => ({
id: worktree,
projectWorktree: worktree,
projectName: displayName({ worktree }),
sessions,
}))
.sort((a, b) => {
const aTime = Math.max(...a.sessions.map((s) => s.session.time.updated ?? s.session.time.created))
const bTime = Math.max(...b.sessions.map((s) => s.session.time.updated ?? s.session.time.created))
return bTime - aTime
})
}

export type HomeSessionsController = ReturnType<typeof createHomeSessionsController>

export function HomeSessionStatusController(props: {
server: ServerConnection.Key
record: HomeSessionRecord
isOpenTab: (record: HomeSessionRecord) => boolean
render: (state: { unread: Accessor<boolean>; loading: Accessor<boolean>; open: Accessor<boolean> }) => JSX.Element
render: (state: {
unread: Accessor<boolean>
loading: Accessor<boolean>
open: Accessor<boolean>
running: Accessor<boolean>
}) => JSX.Element
}) {
const avatar = useSessionTabAvatarState(
() => props.server,
Expand All @@ -445,5 +493,6 @@ export function HomeSessionStatusController(props: {
unread: avatar.unread,
loading: avatar.loading,
open: () => props.isOpenTab(props.record),
running: () => avatar.loading() && !avatar.unread(),
Comment thread

@opencodejr opencodejr Bot Oct 29, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

avatar.loading() is already false whenever the session needs attention (which is what makes unread true), so running is effectively the same as loading, which the avatar already shows as busy. The dot repeats an existing indicator rather than adding information.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
})
}
4 changes: 4 additions & 0 deletions 4 packages/app/src/home/sessions/region.tsx
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ export function HomeSessions(props: {
showProjectName={props.sessions.session.showProjectName()}
server={server()}
canCreateSession={props.sessions.session.canCreate()}
viewMode={props.sessions.data.viewMode()}
setViewMode={props.sessions.data.setViewMode}
isGroupCollapsed={props.sessions.data.isGroupCollapsed}
toggleGroupCollapse={props.sessions.data.toggleGroupCollapse}
searchValue={props.search.query.value()}
searchPlaceholder={props.search.query.placeholder()}
searchOpen={props.search.query.open()}
Expand Down
22 changes: 22 additions & 0 deletions 22 packages/app/src/home/sessions/view.css
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,25 @@
line-height: var(--line-height-compact);
}
}

.home-session-running-indicator {
animation: home-session-pulse 2s ease-in-out infinite;
}

@keyframes home-session-pulse {
0%,
100% {
opacity: 1;
transform: scale(1);
}
50% {
opacity: 0.5;
transform: scale(0.8);
}
}

@media (prefers-reduced-motion: reduce) {
.home-session-running-indicator {
animation: none;
}
}
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.