* feat: Add workspace diff viewer and deployment UI for forked workspaces - Add backend endpoint for comparing two workspaces - Implement comparison logic for scripts, flows, apps, resources, variables - Create ForkWorkspaceBanner component to detect and display fork status - Build WorkspaceComparisonDrawer for detailed diff viewing and deployment - Add DiffViewer component for line-by-line comparisons - Support bidirectional deployment (fork to parent or parent to fork) - Add conflict detection for items that are both ahead and behind - Include delete fork option when no changes remain Note: Backend implementation requires sqlx prepare to be run for full functionality Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com> * Fix banner and use wworkspace_diff table * satisfactory UI WIP * UI complete * Deploy button * Comaprison and reset tally * compare all types of items * Show summaries * Disable buttons during deployment * Auto select all on entering page * Change migration to have 'exists_in' cols * Show new and deleted items * frontend fixes * Block delpoyment if changes don't match (new chagnes detected) * Message to block whe changes are behind * Skip workspaces pre-migration * Remove unused code * Fix apps comparison * Only return changes where user has visibility * No deploy button if no access to all changes * Prepare sqlx * Remove redundant message * CI: update ee repo ref * eereporef bis * Small tweaks * Remove unused struct * Remove unused refactor component * Fix npm run check * Remove unused component * chore: update ee-repo-ref to bbf406edc222199ca2e6076da12c376fb4ff28c5 This commit updates the EE repository reference after PR #359 was merged in windmill-ee-private. Previous ee-repo-ref: 6aae845c5629ae32da43dbfbdc4566e5bf90fb1e New ee-repo-ref: bbf406edc222199ca2e6076da12c376fb4ff28c5 Automated by sync-ee-ref workflow. --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com> Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
25 lines
938 B
SQL
25 lines
938 B
SQL
-- Add up migration script here
|
|
CREATE TABLE workspace_diff (
|
|
source_workspace_id VARCHAR(50) NOT NULL,
|
|
fork_workspace_id VARCHAR(50) NOT NULL,
|
|
path VARCHAR(255) NOT NULL,
|
|
kind VARCHAR(50) NOT NULL,
|
|
ahead INTEGER NOT NULL DEFAULT 0,
|
|
behind INTEGER NOT NULL DEFAULT 0,
|
|
has_changes BOOLEAN DEFAULT NULL,
|
|
exists_in_source BOOLEAN DEFAULT NULL,
|
|
exists_in_fork BOOLEAN DEFAULT NULL,
|
|
PRIMARY KEY (source_workspace_id, fork_workspace_id, path, kind)
|
|
);
|
|
|
|
-- Create table to track workspaces that should be excluded from diff tallying
|
|
-- Old workspaces that are linked but have already diverged need to be skipped
|
|
CREATE TABLE skip_workspace_diff_tally (
|
|
workspace_id VARCHAR(50) PRIMARY KEY,
|
|
added_at TIMESTAMP NOT NULL DEFAULT NOW()
|
|
);
|
|
|
|
-- Populate with all existing workspaces to exclude them from new tallying logic
|
|
INSERT INTO skip_workspace_diff_tally (workspace_id)
|
|
SELECT id FROM workspace;
|