feat: Repo level management (#1828)
* move dev server scripts onto project repos * wip: move scripts onto Repo structs * wip: repo settings page * i18n and fixes * fix refresh * i18n * nits * clickable repo cards * view logs for all dev servers * updates to workspaces * Let's make some changes to the way applications are tested: (vibe-kanban 4592de6c) - When the user starts a dev server, we should automatically open the `PreviewPanel.tsx` - In the preview panel, if no dev server script is set for any of the repos in the workspace show a message along these lines: Vibe Kanban can run dev servers to help you test your changes. You can set this up in the repo settings area. You can learn more about testing applications here: https://www.vibekanban.com/docs/core-features/testing-your-application - We should also not show the `PreviewControlsContainer.tsx` if none of the repos have a dev server script `vibe-kanban/frontend/src/components/panels/PreviewPanel.tsx` `vibe-kanban/frontend/src/components/ui-new/actions/index.ts` `vibe-kanban/frontend/src/components/ui-new/containers/PreviewControlsContainer.tsx` --------- Co-authored-by: Louis Knight-Webb <louis@bloop.ai>
This commit is contained in:
committed by
GitHub
parent
4e20df9823
commit
c5554610a9
@@ -1,7 +1,7 @@
|
||||
import type { Icon } from '@phosphor-icons/react';
|
||||
import type { NavigateFunction } from 'react-router-dom';
|
||||
import type { QueryClient } from '@tanstack/react-query';
|
||||
import type { EditorType, Workspace } from 'shared/types';
|
||||
import type { EditorType, ExecutionProcess, Workspace } from 'shared/types';
|
||||
import type { DiffViewMode } from '@/stores/useDiffViewStore';
|
||||
import {
|
||||
CopyIcon,
|
||||
@@ -66,7 +66,7 @@ export interface ActionExecutorContext {
|
||||
activeWorkspaces: SidebarWorkspace[];
|
||||
currentWorkspaceId: string | null;
|
||||
containerRef: string | null;
|
||||
runningDevServerId: string | null;
|
||||
runningDevServers: ExecutionProcess[];
|
||||
startDevServer: () => void;
|
||||
stopDevServer: () => void;
|
||||
}
|
||||
@@ -94,7 +94,7 @@ export interface ActionVisibilityContext {
|
||||
// Dev server state
|
||||
editorType: EditorType | null;
|
||||
devServerState: DevServerState;
|
||||
runningDevServerId: string | null;
|
||||
runningDevServers: ExecutionProcess[];
|
||||
|
||||
// Git panel state
|
||||
hasGitRepos: boolean;
|
||||
@@ -586,10 +586,12 @@ export const Actions = {
|
||||
getLabel: (ctx) =>
|
||||
ctx.devServerState === 'running' ? 'Stop Dev Server' : 'Start Dev Server',
|
||||
execute: (ctx) => {
|
||||
if (ctx.runningDevServerId) {
|
||||
if (ctx.runningDevServers.length > 0) {
|
||||
ctx.stopDevServer();
|
||||
} else {
|
||||
ctx.startDevServer();
|
||||
// Auto-open preview mode when starting dev server
|
||||
useLayoutStore.getState().setPreviewMode(true);
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user