mintree 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -988,14 +988,19 @@ export default function Dashboard() {
|
|
|
988
988
|
// Surface the spinner BEFORE the heavy sync work. runCreate /
|
|
989
989
|
// runCreateDetached both block the event loop (execSync: git fetch +
|
|
990
990
|
// worktree add + optional .mintree/init.sh — easily several seconds on
|
|
991
|
-
// slow remotes or a repo with a real init script). Without
|
|
992
|
-
//
|
|
993
|
-
//
|
|
991
|
+
// slow remotes or a repo with a real init script). Without yielding
|
|
992
|
+
// here, Ink wouldn't get to paint the spinner before execSync blocks
|
|
993
|
+
// the event loop, leaving the user staring at a frozen overlay.
|
|
994
|
+
//
|
|
995
|
+
// A single setImmediate isn't enough: React 19 commits the state on
|
|
996
|
+
// the next microtask, then Ink schedules its stdout write on a later
|
|
997
|
+
// macrotask. A ~32ms setTimeout (two frames at 60fps) covers both
|
|
998
|
+
// phases reliably without being perceptible.
|
|
994
999
|
setState({
|
|
995
1000
|
...state,
|
|
996
1001
|
overlay: { ...overlay, error: null, pending: "Creating worktree..." },
|
|
997
1002
|
});
|
|
998
|
-
await new Promise((resolve) =>
|
|
1003
|
+
await new Promise((resolve) => setTimeout(resolve, 32));
|
|
999
1004
|
const prompt = overlay.prompt.trim();
|
|
1000
1005
|
const issueId = overlay.issue.issue.id;
|
|
1001
1006
|
let result;
|
|
@@ -278,6 +278,10 @@ const BOOTSTRAP_QUERY = /* GraphQL */ `
|
|
|
278
278
|
key
|
|
279
279
|
name
|
|
280
280
|
}
|
|
281
|
+
project {
|
|
282
|
+
id
|
|
283
|
+
name
|
|
284
|
+
}
|
|
281
285
|
state {
|
|
282
286
|
id
|
|
283
287
|
name
|
|
@@ -433,9 +437,18 @@ export class LinearProvider {
|
|
|
433
437
|
const orderedStates = teamEntry?.states ?? [];
|
|
434
438
|
const statusOrder = wi.state?.id ? orderedStates.findIndex((s) => s.id === wi.state?.id) : -1;
|
|
435
439
|
const teamName = teamEntry?.team.name ?? wi.team?.name ?? teamKey;
|
|
440
|
+
// Issues may or may not be assigned to a Linear project. When they
|
|
441
|
+
// are, suffix the group header so issues from the same team but
|
|
442
|
+
// different projects render as separate sections — keeps things
|
|
443
|
+
// scannable when one team contributes to many projects.
|
|
444
|
+
const projectName = wi.project?.name;
|
|
445
|
+
const projectTitle = projectName ? `${teamName} — ${projectName}` : teamName;
|
|
446
|
+
// Keep the URL pointed at the team page rather than the project
|
|
447
|
+
// page — the team view is the consistent landing spot regardless
|
|
448
|
+
// of whether an issue happens to be on a project.
|
|
436
449
|
const projectUrl = `https://linear.app/${cfg.workspaceSlug}/team/${teamKey}`;
|
|
437
450
|
result.set(wi.identifier, {
|
|
438
|
-
projectTitle
|
|
451
|
+
projectTitle,
|
|
439
452
|
projectUrl,
|
|
440
453
|
projectNumber: 0,
|
|
441
454
|
status: wi.state?.name ?? null,
|
package/package.json
CHANGED