Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: default commit toggle to off on app submodules page

Adam Eivyb8ed1e9cace8
diff --git a/client/src/components/apps/tabs/SubmodulesTab.jsx b/client/src/components/apps/tabs/SubmodulesTab.jsx
index 0f3c12bac4..0f37ce27bd 100644
--- a/client/src/components/apps/tabs/SubmodulesTab.jsx
+++ b/client/src/components/apps/tabs/SubmodulesTab.jsx
@@ -48,7 +48,7 @@ export default function SubmodulesTab({ repoPath }) {
const [loading, setLoading] = useState(true);
const [refreshing, setRefreshing] = useState(false);
const [updating, setUpdating] = useState(null);
- const [commitAfterUpdate, setCommitAfterUpdate] = useState(true);
+ const [commitAfterUpdate, setCommitAfterUpdate] = useState(false);
const batchUpdating = useRef(false);
const loadSubmodules = useCallback(async (showSpinner = true) => {
diff --git a/client/src/components/apps/tabs/SubmodulesTab.test.jsx b/client/src/components/apps/tabs/SubmodulesTab.test.jsx
index 34103472b9..0cd0399d57 100644
--- a/client/src/components/apps/tabs/SubmodulesTab.test.jsx
+++ b/client/src/components/apps/tabs/SubmodulesTab.test.jsx
@@ -34,23 +34,23 @@ describe('SubmodulesTab', () => {
expect(screen.getByText('trunk')).toBeInTheDocument();
});
- it('requests a commit with the update while the toggle is on', async () => {
+ it('updates without a commit by default while the toggle is off', async () => {
render(<SubmodulesTab repoPath={REPO} />);
fireEvent.click(await screen.findByRole('button', { name: 'Update' }));
await waitFor(() => expect(mockUpdateSubmodule).toHaveBeenCalled());
- expect(mockUpdateSubmodule).toHaveBeenCalledWith('lib/dep', { repoPath: REPO, commit: true, silent: true });
- await waitFor(() => expect(mockToast.success).toHaveBeenCalledWith(expect.stringContaining('committed on trunk')));
+ expect(mockUpdateSubmodule).toHaveBeenCalledWith('lib/dep', { repoPath: REPO, commit: false, silent: true });
});
- it('updates without a commit once the toggle is off', async () => {
+ it('requests a commit with the update once the toggle is turned on', async () => {
render(<SubmodulesTab repoPath={REPO} />);
await screen.findByText('dep');
fireEvent.click(screen.getByRole('switch'));
fireEvent.click(screen.getByRole('button', { name: 'Update' }));
await waitFor(() => expect(mockUpdateSubmodule).toHaveBeenCalled());
- expect(mockUpdateSubmodule).toHaveBeenCalledWith('lib/dep', { repoPath: REPO, commit: false, silent: true });
+ expect(mockUpdateSubmodule).toHaveBeenCalledWith('lib/dep', { repoPath: REPO, commit: true, silent: true });
+ await waitFor(() => expect(mockToast.success).toHaveBeenCalledWith(expect.stringContaining('committed on trunk')));
});
it('reports the server outcome, not the toggle, after an update', async () => {