Skip to content

Bring back lock icons for assigned changes#12256

Merged
mtsgrd merged 1 commit intomasterfrom
mg-branch-35
Feb 6, 2026
Merged

Bring back lock icons for assigned changes#12256
mtsgrd merged 1 commit intomasterfrom
mg-branch-35

Conversation

@mtsgrd
Copy link
Contributor

@mtsgrd mtsgrd commented Feb 6, 2026

They were turned off by mistake, and they're useful for knowing what commits files depend on.

Copilot AI review requested due to automatic review settings February 6, 2026 15:47
@vercel
Copy link

vercel bot commented Feb 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
gitbutler-web Skipped Skipped Feb 6, 2026 3:58pm

Request Review

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to restore the “locked” indicators in the desktop app’s worktree change lists so users can see file dependencies for assigned changes.

Changes:

  • Always enables showLockedIndicator for FileList rendering in WorktreeChanges.
  • Refactors Playwright e2e setup to use numeric Butler ports and adds more forceful teardown logic.
  • Adds a Cargo alias for workspace clippy linting.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
e2e/playwright/src/setup.ts Changes Butler port typing/usage and adds more aggressive process shutdown/port cleanup.
apps/desktop/src/components/WorktreeChanges.svelte Enables lock indicator display by always passing showLockedIndicator to FileList.
.cargo/config.toml Adds a cargo lint alias that runs clippy with warnings denied.

Comment on lines 15 to 20
export function getButlerPort(): number {
// Zero based parallel counter
const id = parseInt(process.env.TEST_PARALLEL_INDEX ?? '0', 10);
// Start from default + 1 to avoid interfering with dev server
return `${parseInt(BUT_SERVER_PORT, 10) + id + 1}`;
const port = parseInt(BUT_SERVER_PORT, 10) + id + 1;
return port;
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

getButlerPort() now returns a number, but this function is also used to populate environment variables (e.g. BUTLER_PORT in serverEnv). child_process.spawn expects env values to be strings, so this change will either break TypeScript (Record<string, string>) or pass a non-string env value at runtime. Consider keeping the return type as string, or converting to string at each env/cookie call site (and adjusting types accordingly).

Copilot uses AI. Check for mistakes.
Comment on lines 121 to 125
// Also kill any processes that might still be holding the port
const port = getButlerPort();
try {
execSync(`lsof -ti :${port} | xargs kill -9 2>/dev/null || true`, { stdio: 'ignore' });
} catch {
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

execSync is used here but isn’t imported in this file. This will fail at runtime/compile-time; import it from node:child_process (or avoid it if not needed).

Copilot uses AI. Check for mistakes.
Comment on lines 123 to 125
try {
execSync(`lsof -ti :${port} | xargs kill -9 2>/dev/null || true`, { stdio: 'ignore' });
} catch {
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

The lsof | xargs kill -9 cleanup command is POSIX-specific (and also assumes lsof is installed). If this e2e harness is expected to run on non-Linux environments, please guard this by platform/availability or use a cross-platform approach to free the port; otherwise failures here will be silently swallowed and ports may remain occupied.

Copilot uses AI. Check for mistakes.
Comment on lines 5 to 6
[alias]
lint = "clippy --workspace --all-targets -- -D warnings"
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

This PR is described as only bringing back lock icons for assigned changes, but it also adds a Cargo alias and changes Playwright e2e server lifecycle/port handling. If these are required for the UI change, please explain the linkage in the PR description; otherwise consider splitting these unrelated changes into separate PRs to keep review/rollback scoped.

Copilot uses AI. Check for mistakes.
They were turned off by mistake.
@mtsgrd mtsgrd merged commit e1917d8 into master Feb 6, 2026
24 checks passed
@mtsgrd mtsgrd deleted the mg-branch-35 branch February 6, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant