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): add an independent Side bar mode by joe-ieta · Pull Request #60867 · anomalyco/opencode

feat(app): add an independent Side bar mode #60867

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
joe-ieta wants to merge 18 commits into anomalyco:dev from joe-ieta:sidebar-mode

Uh oh!

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

Closed

feat(app): add an independent Side bar mode #60867

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
a18285f
feat(app): add independent Side bar mode
joe-ieta Oct 31, 2026
a64180f
Merge branch 'dev' into sidebar-mode
joe-ieta Nov 1, 2026
af04a8b
chore(app): sync Side bar contribution with dev
joe-ieta Nov 2, 2026
b88b94a
fix(app): preserve Side bar project and descendant activity state
joe-ieta Nov 2, 2026
6d53576
chore(app): sync Side bar contribution with upstream dev
joe-ieta Nov 3, 2026
703db47
fix(app): stabilize Side bar projects and background Shell activity
joe-ieta Nov 3, 2026
9776be7
chore(app): merge Side bar contribution with upstream dev
joe-ieta Nov 5, 2026
01e4361
feat(app): keep active and completed sessions visible in Side bar
joe-ieta Nov 5, 2026
fa28727
chore(app): bring Side bar contribution up to date with upstream dev
joe-ieta Nov 5, 2026
839a681
fix(app): preserve Side bar close actions with upstream tabs
joe-ieta Nov 5, 2026
9e0207d
test(app): retain one busy field in session fixtures
joe-ieta Nov 5, 2026
50555d9
chore(app): merge latest upstream dev into Side bar candidate
joe-ieta Nov 5, 2026
7315a1d
fix(app): keep Side bar activity prefetch out of Inbox startup
joe-ieta Nov 5, 2026
f8d1660
fix(app): wait for initial session activity in Inbox
joe-ieta Nov 5, 2026
ad6923e
Merge branch 'dev' into sidebar-mode
joe-ieta Nov 5, 2026
2de04af
fix(app): preserve Inbox activity readiness on upstream dev
joe-ieta Nov 5, 2026
ac3d33d
chore(app): sync Side bar with upstream dev
joe-ieta Nov 9, 2026
98a9638
feat(app): integrate Home project actions into Side bar
joe-ieta Nov 8, 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
Prev Previous commit
Next Next commit
chore(app): sync Side bar with upstream dev
  • Loading branch information

Uh oh!

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

@joe-ieta
joe-ieta committed Nov 9, 2026
commit ac3d33db0bfd2cbab85d78337b515c8d3712e232

There are no files selected for viewing

15 changes: 8 additions & 7 deletions 15 packages/app/e2e/regression/tabs.spec.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -714,13 +714,13 @@ test("recent sessions caps each project at five and can reveal a selected overfl
await expect(titles).toHaveText(names([...large.slice(0, 5), ...small]))
await expect(group.getByRole("img", { name: "Unread sessions", exact: true })).toBeVisible()
await expect(group.getByText("10/10", { exact: true })).toBeVisible()
await expect(group).toHaveAttribute("title", /5 shown · 10 recent · 10 sessions in project history/)
await expect(group).toHaveAttribute("title", /5 shown · 10 recent · 10 sessions loaded/)
const more = sidebar.getByRole("button", { name: "Show 5 more sessions in Large project", exact: true })
await expect(more).toHaveText("More (5)")
await expect(more).toHaveAttribute("aria-expanded", "false")
await more.click()
await expect(titles).toHaveText(names([...large, ...small]))
await expect(group).toHaveAttribute("title", /10 shown · 10 recent · 10 sessions in project history/)
await expect(group).toHaveAttribute("title", /10 shown · 10 recent · 10 sessions loaded/)
const less = sidebar.getByRole("button", { name: "Collapse sessions in Large project", exact: true })
await expect(less).toHaveAttribute("aria-expanded", "true")
await less.click()
Expand Down Expand Up @@ -3318,20 +3318,21 @@ test("the inbox waits for initial requests and orders attention by waiting age r
})

const pending = await holdRoute(page, /\/api\/session\/ses_waiting_old\/permission(?:\?|$)/)
const activity = await holdRoute(page, "**/api/session/active")
// Running sessions join Working only once this snapshot loads, which can be after the inbox shows; runs it reveals
// had already started, so they are not announced.
const running = await holdRoute(page, /\/api\/session\/active(?:\?|$)/)

await page.goto("/")
const [permission] = await Promise.all([pending.arrived, activity.arrived])
await Promise.all([pending.arrived, running.arrived])

const inbox = page.locator('[data-slot="sidebar-inbox"]')

await expect(inbox).toHaveAttribute("aria-busy", "true")
await expect(inbox.getByText("Sessions you work on will appear here", { exact: true })).toHaveCount(0)
const checked = page.waitForResponse(/\/api\/session\/ses_waiting_old\/permission(?:\?|$)/)
pending.release()
await (await permission.response())?.finished()
await expect(inbox).toHaveAttribute("aria-busy", "true")
activity.release()
await checked
running.release()

const needs = inbox
.getByRole("group", { name: "Needs attention", exact: true })
Expand Down
15 changes: 7 additions & 8 deletions 15 packages/app/src/home/sessions/index.test.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
HOME_SESSION_LIMIT,
HOME_SESSION_PAGE_LIMIT,
loadHomeSessionIndex,
loadHomeSessionInventory,
mergeHomeSessionIndex,
parseHomeSessionIndex,
retainHomeSessions,
Expand Down Expand Up @@ -45,7 +44,7 @@ describe("Home session index", () => {
const all = history("/repo", HOME_SESSION_PAGE_LIMIT + 1)
const calls: Array<{ limit: number; order: "desc"; cursor?: string; parentID: null }> = []

const result = await loadHomeSessionInventory(async (input) => {
const result = await loadHomeSessionIndex(async (input) => {
calls.push(input)

return { data: all.slice(0, input.limit), cursor: { next: "next" } }
Expand All @@ -54,7 +53,7 @@ describe("Home session index", () => {
expect(calls).toEqual([{ limit: HOME_SESSION_PAGE_LIMIT, order: "desc", parentID: null }])
// Newest rows in server order, plus the recent window beyond the limit.
expect(ids(result.sessions)).toEqual(ids(all.slice(0, HOME_SESSION_INDEX_LIMIT + SESSION_RECENT_LIMIT)))
expect(result.inventory).toHaveLength(all.length)
expect(result.inventory.map((session) => session.id)).toEqual(ids(all.slice(0, HOME_SESSION_PAGE_LIMIT)))
})

test("keeps each directory's newest sessions within the page", async () => {
Expand All @@ -70,8 +69,8 @@ describe("Home session index", () => {
cursor: { next: "next" },
}))

expect(ids(result.filter((item) => item.location.directory === "/quiet"))).toEqual(ids(quiet))
expect(ids(result.filter((item) => item.location.directory === "/busy"))).toEqual(
expect(ids(result.sessions.filter((item) => item.location.directory === "/quiet"))).toEqual(ids(quiet))
expect(ids(result.sessions.filter((item) => item.location.directory === "/busy"))).toEqual(
ids(busy.slice(0, HOME_SESSION_INDEX_LIMIT + SESSION_RECENT_LIMIT)),
)
})
Expand All @@ -86,7 +85,7 @@ describe("Home session index", () => {
}))

const result = await loadHomeSessionIndex(async () => ({ data: [...archived, ...live], cursor: {} }))
expect(ids(result)).toEqual(ids(live))
expect(ids(result.sessions)).toEqual(ids(live))
})

test("keeps only visible roots", () => {
Expand Down Expand Up @@ -115,7 +114,7 @@ describe("Home session index parity with the complete index", () => {
),
).toSorted()

const loaded = () => loadHomeSessionIndex(async () => ({ data: complete, cursor: {} }))
const loaded = async () => (await loadHomeSessionIndex(async () => ({ data: complete, cursor: {} }))).sessions

test("without local changes", async () => {
const result = view(await loaded(), [])
Expand Down Expand Up @@ -153,7 +152,7 @@ describe("Home session index parity with the complete index", () => {
}))

expect(hot.every((item) => item.time.updated > now - SESSION_RECENT_WINDOW)).toBe(true)
const index = await loadHomeSessionIndex(async () => ({ data: hot, cursor: {} }))
const index = (await loadHomeSessionIndex(async () => ({ data: hot, cursor: {} }))).sessions
expect(index).toHaveLength(HOME_SESSION_INDEX_LIMIT + SESSION_RECENT_LIMIT)
expect(view(index, [])).toEqual(view(hot, []))
})
Expand Down
63 changes: 19 additions & 44 deletions 63 packages/app/src/home/sessions/index.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -15,53 +15,28 @@ export const HOME_SESSION_LIMIT = 64
// query cache and every per-update re-merge stay bounded by directory count.
export const HOME_SESSION_INDEX_LIMIT = HOME_SESSION_LIMIT + SESSION_RECENT_LIMIT

type SessionList = (
input: {
limit: number
order: "desc"
parentID: null
cursor?: string
},
options: { signal?: AbortSignal },
) => Promise<SessionsResponse>

export async function loadHomeSessionIndex(list: SessionList, signal?: AbortSignal) {
return (await loadHomeSessionInventory(list, signal)).sessions
}

export async function loadHomeSessionInventory(list: SessionList, signal?: AbortSignal) {
const now = Date.now()
const inventory = new Map<string, Pick<SessionInfo, "id" | "projectID" | "location">>()
let retained: SessionInfo[] = []
let cursor: string | undefined

for (;;) {
const response = await list(
{
limit: HOME_V2_SESSION_PAGE_LIMIT,
order: "desc",
parentID: null,
...(cursor ? { cursor } : {}),
},
{ signal },
)

// Fold each page in as it arrives: pages are newest first, so later pages
// can only fill directories that still have room. Peak allocation is one
// page plus the retained subset, not the whole history.
const visible = parseHomeSessionIndex(response.data)
visible.forEach((session) =>
inventory.set(session.id, { id: session.id, projectID: session.projectID, location: session.location }),
)
retained = retainHomeSessions([...retained, ...visible], HOME_SESSION_INDEX_LIMIT, now)

if (response.data.length < HOME_V2_SESSION_PAGE_LIMIT || !response.cursor.next)
return { sessions: retained, inventory: [...inventory.values()] }
cursor = response.cursor.next
export async function loadHomeSessionIndex(
list: (
input: {
limit: number
order: "desc"
parentID: null
cursor?: string
},
options: { signal?: AbortSignal },
) => Promise<SessionsResponse>,
signal?: AbortSignal,
) {
const response = await list({ limit: HOME_SESSION_PAGE_LIMIT, order: "desc", parentID: null }, { signal })

const sessions = parseHomeSessionIndex(response.data)
return {
sessions: retainHomeSessions(sessions, HOME_SESSION_INDEX_LIMIT, Date.now()),
inventory: sessions.map((session) => ({ id: session.id, projectID: session.projectID, location: session.location })),
}
}

export type HomeSessionInventory = Awaited<ReturnType<typeof loadHomeSessionInventory>>["inventory"]
export type HomeSessionInventory = Awaited<ReturnType<typeof loadHomeSessionIndex>>["inventory"]

// Keep this filter for locally known sessions merged into the fetched index.
export function parseHomeSessionIndex(sessions: SessionInfo[]) {
Expand Down
4 changes: 2 additions & 2 deletions 4 packages/app/src/home/sessions/queries.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { ServerConnection } from "@/runtime/server/registry"
import type { ServerCtx } from "@/runtime/server/runtime"
import {
HOME_SESSION_LIMIT,
loadHomeSessionInventory,
loadHomeSessionIndex,
mergeHomeSessionIndex,
retainHomeSessions,
type HomeSessionInventory,
Expand All @@ -23,7 +23,7 @@ export function homeSessionsQuery(
queryKey: ["home-sessions", conn] as const,
queryFn: ctx
? async ({ signal }) => {
const result = await loadHomeSessionInventory(
const result = await loadHomeSessionIndex(
(input, options) => ctx.sdk.api.session.list(input, options),
signal,
)
Expand Down
4 changes: 2 additions & 2 deletions 4 packages/app/src/runtime/i18n/en.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -809,8 +809,8 @@ export const dict = {
"sidebar.recent.expand.other": "Show {{count}} more sessions in {{project}}",
"sidebar.recent.less": "Show less",
"sidebar.recent.collapse": "Collapse sessions in {{project}}",
"sidebar.recent.count.one": "{{shown}} shown · {{recent}} recent · {{count}} session in project history",
"sidebar.recent.count.other": "{{shown}} shown · {{recent}} recent · {{count}} sessions in project history",
"sidebar.recent.count.one": "{{shown}} shown · {{recent}} recent · {{count}} session loaded",
"sidebar.recent.count.other": "{{shown}} shown · {{recent}} recent · {{count}} sessions loaded",
"sidebar.session.lastRun": "Last run ended: {{time}}",
"sidebar.running.title": "Running sessions",
"sidebar.running.empty": "No running sessions",
Expand Down
2 changes: 1 addition & 1 deletion 2 packages/app/src/shell/titlebar/inbox-model.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ export function createSessionInbox(options: { archived?: boolean } = {}) {
serversSettled: connections().every((item, index) => {
if (!canUseServer(global.servers.health[ServerConnection.key(item.conn)])) return true

return item.ctx.data.session.activeReady() && (!!queries[index]?.isSuccess || !!queries[index]?.isError)
return !!queries[index]?.isSuccess || !!queries[index]?.isError
}),
workingKeys: entries().flatMap((entry) =>
entry.status === "working" || workingSince(entry.session) !== undefined ? [entry.key] : [],
Expand Down
4 changes: 2 additions & 2 deletions 4 packages/app/src/shell/titlebar/inbox-settle-machine.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export type InboxRequestCheck = "checking" | "checked"
type Checks = Readonly<Record<string, InboxRequestCheck>>

/**
* The inbox's first load. It waits for each usable server's index and activity snapshot and each working root's
* requests, or for the reveal timer to fire. A session starting after it settles never blanks the inbox.
* The inbox's first load. It settles once every usable server answered the index and every working root's requests
* loaded, or when the reveal timer fires; once settled it stays settled, so a session starting later never blanks it.
* Request checks keep running after it settles.
*/
export type InboxSettleState =
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.
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.