@senad-d/branchme 0.1.7 → 0.1.9
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.
- package/CHANGELOG.md +10 -5
- package/README.md +116 -18
- package/SECURITY.md +34 -6
- package/docs/PROJECT_DEFINITION_BRIEF.md +129 -77
- package/docs/SMOKE_TEST.md +24 -12
- package/docs/STRUCTURE.md +30 -20
- package/docs/TUI_CAPTURE.md +109 -28
- package/package.json +9 -5
- package/src/commands/branchme-command.ts +16 -2
- package/src/constants.ts +19 -0
- package/src/git-context.ts +81 -16
- package/src/git-integration.ts +673 -0
- package/src/git.ts +1175 -2
- package/src/tools/branchme-tools.ts +296 -4
- package/src/types.ts +226 -0
- package/src/ui/branchme-panel.ts +27 -3
package/src/ui/branchme-panel.ts
CHANGED
|
@@ -24,14 +24,14 @@ type PanelCell =
|
|
|
24
24
|
preserveLeading?: boolean;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
export type BranchMePanelSection = "status" | "workflow";
|
|
27
|
+
export type BranchMePanelSection = "status" | "workflow" | "integration" | "worktrees";
|
|
28
28
|
|
|
29
29
|
const NARROW_MIN_WIDTH = 24;
|
|
30
30
|
const WIDE_MIN_WIDTH = 72;
|
|
31
31
|
const MAX_PANEL_WIDTH = 96;
|
|
32
32
|
const MAX_PANEL_HEIGHT = 16;
|
|
33
33
|
const BODY_HEIGHT = 9;
|
|
34
|
-
const PANEL_SECTIONS: BranchMePanelSection[] = ["status", "workflow"];
|
|
34
|
+
const PANEL_SECTIONS: BranchMePanelSection[] = ["status", "workflow", "integration", "worktrees"];
|
|
35
35
|
const ANSI_RESET = "\u001b[0m";
|
|
36
36
|
|
|
37
37
|
function truncateVisible(value: string, width: number, ellipsis = "…", pad = false): string {
|
|
@@ -144,7 +144,7 @@ function statusDetailRow(label: string, value: string): PanelCell {
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
function workflowDetailRow(tool: string, description: string): PanelCell {
|
|
147
|
-
return layoutCell(` ${tool.padEnd(
|
|
147
|
+
return layoutCell(` ${tool.padEnd(17, " ")}-> ${sanitize(description)}`);
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
function sectionTitle(section: BranchMePanelSection): string {
|
|
@@ -153,6 +153,10 @@ function sectionTitle(section: BranchMePanelSection): string {
|
|
|
153
153
|
return "STATUS";
|
|
154
154
|
case "workflow":
|
|
155
155
|
return "WORKFLOW";
|
|
156
|
+
case "integration":
|
|
157
|
+
return "INTEGRATION";
|
|
158
|
+
case "worktrees":
|
|
159
|
+
return "WORKTREES";
|
|
156
160
|
}
|
|
157
161
|
}
|
|
158
162
|
|
|
@@ -178,6 +182,10 @@ function sectionFooter(section: BranchMePanelSection, data: BranchMePanelData):
|
|
|
178
182
|
return "status • current repository only • tools perform actions";
|
|
179
183
|
case "workflow":
|
|
180
184
|
return "workflow • inspect → change → fetch/pull/rebase → create → push → PR";
|
|
185
|
+
case "integration":
|
|
186
|
+
return "integration • local refs • clean target • conflicts auto-abort";
|
|
187
|
+
case "worktrees":
|
|
188
|
+
return "worktrees • create → handoff cwd → next session • remove retains branch";
|
|
181
189
|
}
|
|
182
190
|
}
|
|
183
191
|
|
|
@@ -204,6 +212,22 @@ function sectionRows(section: BranchMePanelSection, data: BranchMePanelData): Pa
|
|
|
204
212
|
workflowDetailRow("push_branch", "current branch"),
|
|
205
213
|
workflowDetailRow("pull_request", "after push"),
|
|
206
214
|
];
|
|
215
|
+
case "integration":
|
|
216
|
+
return [
|
|
217
|
+
heading("INTEGRATION"),
|
|
218
|
+
workflowDetailRow("integrate_branch", "exact local source -> target"),
|
|
219
|
+
workflowDetailRow("control target", "checked out + clean"),
|
|
220
|
+
workflowDetailRow("remote effects", "never fetch or push"),
|
|
221
|
+
workflowDetailRow("conflict", "automatic verified abort"),
|
|
222
|
+
workflowDetailRow("semantic intent", "separate developer workflow"),
|
|
223
|
+
];
|
|
224
|
+
case "worktrees":
|
|
225
|
+
return [
|
|
226
|
+
heading("WORKTREES"),
|
|
227
|
+
workflowDetailRow("list_worktrees", "inspect inventory"),
|
|
228
|
+
workflowDetailRow("create_worktree", "ready handoff.cwd"),
|
|
229
|
+
workflowDetailRow("remove_worktree", "clean linked; branch retained"),
|
|
230
|
+
];
|
|
207
231
|
}
|
|
208
232
|
}
|
|
209
233
|
|