Skip to content
Draft
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/app/pr/screenshots/cloud-auth-route.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/app/pr/screenshots/cloud-live-dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 29 additions & 3 deletions apps/app/src/app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import StatusToast from "./components/status-toast";
import OnboardingView from "./pages/onboarding";
import DashboardView from "./pages/dashboard";
import SessionView from "./pages/session";
import CloudView from "./pages/cloud";
import ProtoWorkspacesView from "./pages/proto-workspaces";
import ProtoV1UxView from "./pages/proto-v1-ux";
import { createClient, unwrap, waitForHealthy, type OpencodeAuth } from "./lib/opencode";
Expand Down Expand Up @@ -288,6 +289,7 @@ type SettingsReturnTarget = {
view: View;
tab: DashboardTab;
sessionId: string | null;
cloudPath: string | null;
};

function normalizeSharedBundleImportIntent(value: string | null | undefined): SharedBundleImportIntent {
Expand Down Expand Up @@ -845,6 +847,7 @@ export default function App() {
const path = location.pathname.toLowerCase();
if (path.startsWith("/onboarding")) return "onboarding";
if (path.startsWith("/session")) return "session";
if (path.startsWith("/cloud")) return "cloud";
if (path.startsWith("/proto")) return "proto";
return "dashboard";
});
Expand Down Expand Up @@ -879,6 +882,10 @@ export default function App() {
navigate("/proto/workspaces");
return;
}
if (next === "cloud") {
navigate("/cloud");
return;
}
if (next === "onboarding") {
navigate("/onboarding");
return;
Expand Down Expand Up @@ -1352,6 +1359,7 @@ export default function App() {
view: "dashboard",
tab: "scheduled",
sessionId: null,
cloudPath: null,
});
const SESSION_BY_WORKSPACE_KEY = "openwork.workspace-last-session.v1";
const readSessionByWorkspace = () => {
Expand Down Expand Up @@ -1404,6 +1412,10 @@ export default function App() {
view,
tab: currentTab,
sessionId: selectedSessionId(),
cloudPath:
view === "cloud"
? `${location.pathname}${location.search}`
: null,
});
});

Expand All @@ -1425,6 +1437,10 @@ export default function App() {
navigate("/proto/workspaces");
return;
}
if (target.view === "cloud") {
navigate(target.cloudPath || "/cloud");
return;
}
goToDashboard(target.tab);
};

Expand Down Expand Up @@ -4326,9 +4342,8 @@ export default function App() {

setProcessingDenAuthDeepLink(true);
setPendingDenAuthDeepLink(null);
setView("dashboard");
setSettingsTab("den");
goToDashboard("settings");
setView("cloud");
navigate("/cloud", { replace: true });

void createDenClient({ baseUrl: pending.denBaseUrl })
.exchangeDesktopHandoff(pending.grant)
Expand Down Expand Up @@ -7203,6 +7218,10 @@ export default function App() {
return;
}

if (path.startsWith("/cloud")) {
return;
}

if (path.startsWith("/session")) {
const [, , sessionSegment] = rawPath.split("/");
const id = (sessionSegment ?? "").trim();
Expand Down Expand Up @@ -7284,6 +7303,13 @@ export default function App() {
<Match when={currentView() === "session"}>
<SessionView {...sessionProps()} />
</Match>
<Match when={currentView() === "cloud"}>
<CloudView
developerMode={developerMode()}
openCloudSettings={() => toggleSettingsView("den")}
connectRemoteWorkspace={workspaceStore.createRemoteWorkspaceFlow}
/>
</Match>
<Match when={true}>
<DashboardView {...dashboardProps()} />
</Match>
Expand Down
Loading
Loading