merge-steward 0.16.0 → 0.16.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.
|
@@ -18,6 +18,8 @@ export async function handleDashboard(parsed) {
|
|
|
18
18
|
process.stderr.write("Use `merge-steward queue status --repo <id>` or run the dashboard from a terminal.\n");
|
|
19
19
|
return 1;
|
|
20
20
|
}
|
|
21
|
+
if (!process.env.NODE_ENV)
|
|
22
|
+
process.env.NODE_ENV = "production";
|
|
21
23
|
const { startDashboard } = await import("../../watch/index.js");
|
|
22
24
|
await startDashboard(options);
|
|
23
25
|
return 0;
|
|
@@ -30,14 +30,14 @@ export function ProjectDetailView({ model, selectedRepoId }) {
|
|
|
30
30
|
for (const entry of entries) {
|
|
31
31
|
if (used >= afterRepoRow)
|
|
32
32
|
break;
|
|
33
|
-
|
|
34
|
-
if (used + phraseLine > afterRepoRow)
|
|
33
|
+
if (used + 1 > afterRepoRow)
|
|
35
34
|
break;
|
|
36
|
-
planned.push({ entry, includeSummary: false
|
|
37
|
-
used +=
|
|
35
|
+
planned.push({ entry, includeSummary: false });
|
|
36
|
+
used += 1;
|
|
38
37
|
}
|
|
39
38
|
if (afterRepoRow - used >= 2) {
|
|
40
|
-
for (
|
|
39
|
+
for (let i = 0; i < planned.length; i += 1) {
|
|
40
|
+
const item = planned[i];
|
|
41
41
|
if (!item.entry.summary)
|
|
42
42
|
continue;
|
|
43
43
|
const summaryText = clipSummary(item.entry.summary, {
|
|
@@ -47,12 +47,16 @@ export function ProjectDetailView({ model, selectedRepoId }) {
|
|
|
47
47
|
if (!summaryText)
|
|
48
48
|
continue;
|
|
49
49
|
const summaryLines = summaryText.split("\n").length;
|
|
50
|
-
|
|
50
|
+
const isLast = i === planned.length - 1;
|
|
51
|
+
const extra = summaryLines + (isLast ? 0 : 1);
|
|
52
|
+
if (used + extra > afterRepoRow)
|
|
51
53
|
break;
|
|
52
54
|
item.includeSummary = true;
|
|
53
|
-
|
|
54
|
-
used += summaryLines;
|
|
55
|
+
used += extra;
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
|
-
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(RepoRow, { repo: repo, selected: false, showCursor: false, width: width - 2 }), planned.length > 0 ? _jsx(Box, { children: _jsx(Text, { children: " " }) }) : null, planned.map(({ entry, includeSummary }) =>
|
|
58
|
+
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(RepoRow, { repo: repo, selected: false, showCursor: false, width: width - 2 }), planned.length > 0 ? _jsx(Box, { children: _jsx(Text, { children: " " }) }) : null, planned.map(({ entry, includeSummary }, index) => {
|
|
59
|
+
const isLast = index === planned.length - 1;
|
|
60
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(PrEntryRow, { entry: entry, width: width, includeSummary: includeSummary }), includeSummary && !isLast ? _jsx(Box, { children: _jsx(Text, { children: " " }) }) : null] }, entry.prNumber));
|
|
61
|
+
})] }));
|
|
58
62
|
}
|