-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Modify git commit modal [INS-1994] [INS-1475] #9607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
✅ Circular References ReportGenerated at: 2026-01-27T13:47:28.597Z Summary
Click to view all circular references in PR (85)Click to view all circular references in base branch (85)Analysis✅ No Change: This PR does not introduce or remove any circular references. This report was generated automatically by comparing against the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request modifies the Git commit modal to add a header line to the diff viewer with workspace scope information. The changes include refactoring scope-related constants to a common location and enhancing the UI to display file metadata.
Changes:
- Refactored scope-related constants (
scopeToLabelMap,scopeToIconMap,scopeToBgColorMap,scopeToTextColorMap, andProjectScopeKeys) from the route file to a common utility module (get-workspace-label.ts) - Enhanced the diff viewer header in the Git staging modal to display workspace scope icon, name, filepath, and a stage/unstage button
- Updated
git-service.tsto extract and return scope information for diff items
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/insomnia/src/common/get-workspace-label.ts | Added scope-related constants and types previously defined in route files |
| packages/insomnia/src/main/git-service.ts | Enhanced getPreviewItemNameAndScope to extract scope from diff items and updated GitDiffResult type to include filepath, scope, and staged status |
| packages/insomnia/src/ui/components/modals/git-project-staging-modal.tsx | Added enhanced diff viewer header with scope badge, filepath display, and stage/unstage button; refactored stageChanges/unstageChanges functions to component level |
| packages/insomnia/src/ui/components/dropdowns/git-project-sync-dropdown.tsx | Modified Git staging modal initial state (appears to be debugging leftover) |
| packages/insomnia/src/ui/components/modals/git-project-migration-modal.tsx | Updated import to use common get-workspace-label module |
| packages/insomnia/src/ui/components/modals/workspace-duplicate-modal.tsx | Updated import to use common get-workspace-label module |
| packages/insomnia/src/ui/components/project/git-repo-scan-result.tsx | Updated import to use common get-workspace-label module |
| packages/insomnia/src/ui/components/command-palette.tsx | Updated import to use common get-workspace-label module |
| packages/insomnia/src/routes/organization.$organizationId.project.$projectId._index.tsx | Removed scope-related constants (moved to common module) |
| packages/insomnia/src/routes/organization.$organizationId.project.$projectId.list-workspaces.tsx | Updated import to use common get-workspace-label module |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const [isGitBranchesModalOpen, setIsGitBranchesModalOpen] = useState(false); | ||
| const [isGitLogModalOpen, setIsGitLogModalOpen] = useState(false); | ||
| const [isGitStagingModalOpen, setIsGitStagingModalOpen] = useState(false); | ||
| const [isGitStagingModalOpen, setIsGitStagingModalOpen] = useState(true); |
Copilot
AI
Jan 27, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Git staging modal is incorrectly set to open by default. This should be false to prevent the modal from appearing automatically when the component mounts. This appears to be a debugging leftover that should be reverted before merging.
| const [isGitStagingModalOpen, setIsGitStagingModalOpen] = useState(true); | |
| const [isGitStagingModalOpen, setIsGitStagingModalOpen] = useState(false); |
Uh oh!
There was an error while loading. Please reload this page.