Skip to content
Open
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
9 changes: 8 additions & 1 deletion packages/app/src/pages/session/use-session-commands.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { DialogSelectFile } from "@/components/dialog-select-file"
import { DialogSelectModel } from "@/components/dialog-select-model"
import { DialogSelectMcp } from "@/components/dialog-select-mcp"
import { DialogFork } from "@/components/dialog-fork"
import { PlatformProvider, usePlatform } from "@/context/platform"
import { showToast } from "@opencode-ai/ui/toast"
import { findLast } from "@opencode-ai/util/array"
import { createSessionTabs } from "@/pages/session/helpers"
Expand Down Expand Up @@ -49,6 +50,7 @@ export const useSessionCommands = (actions: SessionCommandContext) => {
const terminal = useTerminal()
const layout = useLayout()
const navigate = useNavigate()
const platform = usePlatform()
const { params, tabs, view } = useSessionLayout()

const info = () => {
Expand Down Expand Up @@ -487,7 +489,12 @@ export const useSessionCommands = (actions: SessionCommandContext) => {
description: language.t("command.session.fork.description"),
slash: "fork",
disabled: !params.id || visibleUserMessages().length === 0,
onSelect: () => dialog.show(() => <DialogFork />),
onSelect: () =>
dialog.show(() => (
<PlatformProvider value={platform}>
<DialogFork />
</PlatformProvider>
)),
Comment on lines +492 to +497
Copy link

Copilot AI Mar 19, 2026

Choose a reason for hiding this comment

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

There’s currently no e2e coverage for the session.fork slash command / fork dialog path (unlike undo/redo/share). Consider adding a Playwright spec that opens the slash palette, selects session.fork, and asserts the dialog renders (and ideally that selecting an item navigates to the forked session) to prevent regressions of this context-related crash.

Copilot uses AI. Check for mistakes.
}),
...share,
]
Expand Down
Loading