Skip to content

Commit 9d0eea4

Browse files
authored
Merge pull request #11 from CodeAnt-AI/feat/interactive-tty-hook
secrets UI
2 parents d6adff3 + 0d47e78 commit 9d0eea4

4 files changed

Lines changed: 41 additions & 4 deletions

File tree

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## [0.4.4] - 09/04/2026
4+
- Secrets location in hooks
5+
36
## [0.4.3] - 06/04/2026
47
- Interactive terminal for pre-push
58

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codeant-cli",
3-
"version": "0.4.3",
3+
"version": "0.4.4",
44
"description": "Code review CLI tool",
55
"type": "module",
66
"bin": {

src/components/SecretsUI.js

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,41 @@ function BypassPrompt({ secrets, onSelect }) {
381381
els.push(React.createElement(Text, { key: 'div-top', color: 'gray', dimColor: true }, DIVIDER));
382382
els.push(React.createElement(
383383
Text, { key: 'title', color: 'yellow', bold: true },
384-
`${allSecrets.length} secret(s) detected. Select an action:`,
384+
`${allSecrets.length} secret(s) detected:`,
385+
));
386+
els.push(React.createElement(Text, { key: 'sp-list' }, ''));
387+
388+
// Group by file and list each secret with line + type
389+
const grouped = {};
390+
allSecrets.forEach(s => {
391+
const file = s.file_path || 'Unknown';
392+
(grouped[file] ??= []).push(s);
393+
});
394+
const sortedFiles = Object.keys(grouped).sort();
395+
sortedFiles.forEach(f =>
396+
grouped[f].sort((a, b) => (a.line_number || 0) - (b.line_number || 0))
397+
);
398+
sortedFiles.forEach((file, fi) => {
399+
const fileSecrets = grouped[file];
400+
els.push(React.createElement(
401+
Text, { key: `bp-f-${fi}`, color: 'white', bold: true }, ` ${file}`,
402+
));
403+
fileSecrets.forEach((secret, si) => {
404+
const isLast = si === fileSecrets.length - 1;
405+
const branch = isLast ? '└─' : '├─';
406+
const lineStr = secret.line_number ? `L${secret.line_number}` : '';
407+
els.push(React.createElement(
408+
Box, { key: `bp-s-${fi}-${si}` },
409+
React.createElement(Text, { color: 'gray' }, ` ${branch} `),
410+
React.createElement(Text, { color: 'gray' }, padEnd(lineStr, 6)),
411+
React.createElement(Text, { color: 'white' }, secret.type || ''),
412+
));
413+
});
414+
});
415+
416+
els.push(React.createElement(Text, { key: 'sp-action' }, ''));
417+
els.push(React.createElement(
418+
Text, { key: 'action-label', color: 'yellow', bold: true }, 'Select an action:',
385419
));
386420
els.push(React.createElement(Text, { key: 'sp' }, ''));
387421

0 commit comments

Comments
 (0)