Harden git commit flags and simplify agent/runtime plumbing#1215
Harden git commit flags and simplify agent/runtime plumbing#1215juliusmarminge wants to merge 6 commits intomainfrom
Conversation
- Move extra commit args after message flags to avoid swallowing `-m` - Drop non-flag tokens when tokenizing user-supplied commit flags - Add tests and clarify the settings helper text
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
| ); | ||
| const { settings } = useAppSettings(); | ||
| const queryClient = useQueryClient(); |
There was a problem hiding this comment.
🔴 Critical components/GitActionsControl.tsx:163
const { settings } = useAppSettings(); is declared twice at the top of GitActionsControl (lines 159 and 164). This causes a SyntaxError: Identifier 'settings' has already been declared at runtime, preventing the component from loading. Remove the duplicate declaration.
- const { settings } = useAppSettings();
const queryClient = useQueryClient();🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file apps/web/src/components/GitActionsControl.tsx around lines 163-165:
`const { settings } = useAppSettings();` is declared twice at the top of `GitActionsControl` (lines 159 and 164). This causes a `SyntaxError: Identifier 'settings' has already been declared` at runtime, preventing the component from loading. Remove the duplicate declaration.
Evidence trail:
apps/web/src/components/GitActionsControl.tsx lines 159 and 164 at REVIEWED_COMMIT - both lines contain `const { settings } = useAppSettings();` within the same `GitActionsControl` function scope, confirming the duplicate declaration.
Summary
git commitflags in app-run commits, with tokenization that drops non-flag tokens before invoking git.Testing
bun fmtbun lintbun typecheckbun run testapps/server/src/git/Layers/GitCore.test.tsNote
Add user-configurable extra git commit flags to the stacked action pipeline
gitCommitFlagsto the app settings schema and exposes a new "Git" section in the settings UI for users to enter extra flags (e.g.--no-verify).GitRunStackedActionInputcontract,runCommitStep, andGitCore.committo accept and forward sanitized commit flags; flags are appended after-margs to prevent argument-consuming flags from swallowing message values.tokenizeCommitFlagsin GitManager.ts to strip non-flag tokens (anything not starting with-) from user input before passing to git.const { settings }declaration in the same scope, which will cause a TypeScript compile error.📊 Macroscope summarized 243e8a4. 6 files reviewed, 1 issue evaluated, 0 issues filtered, 1 comment posted
🗂️ Filtered Issues