Skip to content
Closed
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
50 changes: 33 additions & 17 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,45 @@
### Issue for this PR
## Problem

Closes #
Briefly describe what this PR fixes. What was broken, confusing, or missing?

### Type of change
For simple fixes: one sentence is enough.
For complex features: explain the problem and why it matters.

- [ ] Bug fix
- [ ] New feature
- [ ] Refactor / code improvement
- [ ] Documentation
Closes #XXXX

### What does this PR do?
---

Please provide a description of the issue, the changes you made to fix it, and why they work. It is expected that you understand why your changes work and if you do not understand why at least say as much so a maintainer knows how much to value the PR.
## Changes

**If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!**
**For simple fixes**: 1-2 bullet points maximum

### How did you verify your code works?
- Fix specific issue in `ComponentName`
- Add missing feature to `ModuleName`

### Screenshots / recordings
**For complex features**: concise breakdown

_If this is a UI change, please include a screenshot or recording._
- `file.ext`: What changed
- `file.ext`: What changed
- Add tests for coverage

### Checklist
---

- [ ] I have tested my changes locally
- [ ] I have not included unrelated changes in this PR
## Testing

_If you do not follow this template your PR will be automatically rejected._
```bash
# Test commands to verify this PR
bun test path/to/test.test.ts
# If applicable: run examples, manual testing steps, etc.
```

---

### Additional Context (only if needed)

**Breaking changes**: What users need to know and migration steps

**Performance impact**: Before/after metrics if relevant

**Configuration**: New options or defaults

**Design decisions**: Why this approach over alternatives
4 changes: 4 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ jobs:

- uses: ./.github/actions/setup-bun

- uses: actions/setup-node@v4
with:
node-version: "24"

- name: Cache apt packages
if: contains(matrix.settings.host, 'ubuntu')
uses: actions/cache@v4
Expand Down
18 changes: 18 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"packageManager": "bun@1.3.10",
"scripts": {
"dev": "bun run --cwd packages/opencode --conditions=browser src/index.ts",
"dev:desktop": "bun --cwd packages/desktop tauri dev",
"dev:desktop": "bun run --cwd packages/desktop predev && bun --cwd packages/desktop tauri dev",
"dev:web": "bun --cwd packages/app dev",
"dev:storybook": "bun --cwd packages/storybook storybook",
"typecheck": "bun turbo typecheck",
Expand Down
14 changes: 14 additions & 0 deletions packages/app/e2e/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
listItemKeyStartsWithSelector,
workspaceItemSelector,
workspaceMenuTriggerSelector,
workspacePinToggleSelector,
} from "./selectors"

export async function defocus(page: Page) {
Expand Down Expand Up @@ -711,3 +712,16 @@ export async function openWorkspaceMenu(page: Page, workspaceSlug: string) {
await expect(menu).toBeVisible()
return menu
}

export async function setWorkspacePinned(page: Page, workspaceSlug: string, enabled: boolean) {
const menu = await openWorkspaceMenu(page, workspaceSlug)
const toggle = menu.locator(workspacePinToggleSelector(workspaceSlug)).first()
await expect(toggle).toBeVisible()
const name = await toggle.textContent()
const pinned = (name ?? "").toLowerCase().includes("unpin")
if (pinned === enabled) {
await page.keyboard.press("Escape")
return
}
await toggle.click({ force: true })
}
17 changes: 3 additions & 14 deletions packages/app/e2e/projects/projects-switch.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { base64Decode } from "@opencode-ai/util/encode"
import type { Page } from "@playwright/test"
import { test, expect } from "../fixtures"
import { defocus, createTestProject, cleanupTestProject, openSidebar, sessionIDFromUrl, waitSlug } from "../actions"
import { projectSwitchSelector, promptSelector, workspaceItemSelector, workspaceNewSessionSelector } from "../selectors"
import { projectSwitchSelector, promptSelector } from "../selectors"
import { dirSlug, resolveDirectory } from "../utils"

async function workspaces(page: Page, directory: string, enabled: boolean) {
Expand Down Expand Up @@ -90,19 +90,8 @@ test("switching back to a project opens the latest workspace session", async ({
const space = await resolveDirectory(dir)
const next = dirSlug(space)
trackDirectory(space)
await openSidebar(page)

const item = page.locator(`${workspaceItemSelector(next)}, ${workspaceItemSelector(raw)}`).first()
await expect(item).toBeVisible()
await item.hover()

const btn = page.locator(`${workspaceNewSessionSelector(next)}, ${workspaceNewSessionSelector(raw)}`).first()
await expect(btn).toBeVisible()
await btn.click({ force: true })

// A new workspace can be discovered via a transient slug before the route and sidebar
// settle to the canonical workspace path on Windows, so interact with either and assert
// against the resolved workspace slug.
// A new workspace can be discovered via a transient slug before the route settles to
// the canonical workspace path on Windows.
await waitSlug(page)
await expect(page).toHaveURL(new RegExp(`/${next}/session(?:[/?#]|$)`))

Expand Down
Loading
Loading