Skip to content

fix: small bugs#368

Merged
webdevcody merged 3 commits intomainfrom
fix/small-bugs
Jan 6, 2026
Merged

fix: small bugs#368
webdevcody merged 3 commits intomainfrom
fix/small-bugs

Conversation

@Shironex
Copy link
Collaborator

@Shironex Shironex commented Jan 6, 2026

  • Fix double toast notifications in app spec generation
  • Fix themes not applying in the setup wizard when a current project already exists and has its own theme set, which was being overwritten
  • Fix an infinite loop caused by createLogger triggering the hook to re-render every time

Summary by CodeRabbit

  • Bug Fixes
    • Toast notifications during spec regeneration now display only when necessary, reducing notification clutter
    • Theme selections are now properly synchronized across project-level and global settings for consistency

✏️ Tip: You can customize this high-level summary in your review settings.

- Moved the logger initialization to the top of the file for better readability and to avoid re-initialization on each function call.
- This change enhances the performance and clarity of the code in the useCliStatus hook.
- fix infinite loop calling caused by rerender because of logger
- when user had set up theme on the project lvl i and went trought the setup wizard again and changed theme its was not updating because its was only updating global theme and app was reverting back to show current project theme
- Updated the useSpecRegeneration hook to conditionally display the success toast message only when the user is in the active project creation flow, preventing unnecessary notifications during regular spec regeneration.
@coderabbitai
Copy link

coderabbitai bot commented Jan 6, 2026

📝 Walkthrough

Walkthrough

Three files were modified to enhance theme configuration and spec regeneration handling. The theme step now synchronizes project-level theme settings with global theme changes, the spec regeneration handler conditionally displays toast notifications based on creation flow status, and logger initialization was moved from hook scope to module scope for reuse.

Changes

Cohort / File(s) Summary
Spec regeneration notifications
apps/ui/src/components/layout/sidebar/hooks/use-spec-regeneration.ts
Made toast notification conditional based on creatingSpecProjectPath status. Toast displays only when in creation flow; all other state resets remain unchanged.
Setup view logger optimization
apps/ui/src/components/views/setup-view/hooks/use-cli-status.ts
Moved logger initialization from hook scope to module-level constant. Changes from per-render to single shared instance while preserving all logging call sites and error handling.
Theme configuration enhancement
apps/ui/src/components/views/setup-view/steps/theme-step.tsx
Extended theme selection to sync project-level theme via setProjectTheme in addition to global theme. Conditionally updates current project's theme when available, aligning with getEffectiveTheme() priority.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 A rabbit hops through themes with glee,
Projects now match what users see,
Loggers settle, single and wise,
Toasts know when to materialize,
The setup dance flows clean and free! 🎨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title "fix: small bugs" is vague and generic, using non-descriptive language that fails to convey the actual changes made (logger initialization, theme application, and toast notifications). Use a more specific title that captures the main fixes, such as "fix: spec generation toast, theme application, and logger re-initialization issues" or focus on the primary change.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Shironex, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses several small but impactful bugs across the application's UI. It resolves issues with redundant toast notifications during app spec generation, ensures theme selections in the setup wizard are correctly applied even when an existing project has its own theme, and fixes an infinite re-render loop related to logger creation in a CLI status hook. These changes improve user experience and application stability.

Highlights

  • Toast Notifications: Resolved an issue where users would receive double toast notifications when an app specification was created, ensuring toasts are only shown during the initial creation flow.
  • Setup Wizard Themes: Fixed a bug where themes selected in the setup wizard were not correctly applied if a current project already existed and had its own theme set, which was being overwritten.
  • Infinite Loop: Addressed an infinite loop issue in the useCliStatus hook by moving the createLogger call outside the component, preventing unnecessary re-renders.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@Shironex Shironex changed the title Fix/small bugs fix: small bugs Jan 6, 2026
@Shironex Shironex self-assigned this Jan 6, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request introduces a conditional success toast for app specification creation, ensuring it only appears during an active creation flow rather than general regeneration. It also refactors the useCliStatus hook by moving the logger initialization outside the hook to prevent re-creation on every render. Furthermore, the theme selection logic in ThemeStep was updated to not only set the global theme but also apply the selected theme to the currentProject if one exists, prioritizing project-specific themes. A review comment highlights a type safety concern within this theme selection logic, specifically regarding the themeValue as typeof theme assertion, which is problematic because ThemeMode (used by theme) appears to be outdated and narrower than the Theme type that themeValue can represent, potentially causing runtime issues.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
apps/ui/src/components/layout/sidebar/hooks/use-spec-regeneration.ts (1)

5-6: Organize imports before module-level declarations.

The const logger declaration is placed between import statements, which breaks conventional code organization. Move all imports to the top, then place module-level declarations.

🔎 Suggested fix
 import { useEffect } from 'react';
 import { createLogger } from '@automaker/utils/logger';
 import { toast } from 'sonner';
-
-const logger = createLogger('SpecRegeneration');
 import { getElectronAPI } from '@/lib/electron';
 import type { SpecRegenerationEvent } from '@/types/electron';
+
+const logger = createLogger('SpecRegeneration');
apps/ui/src/components/views/setup-view/hooks/use-cli-status.ts (1)

69-69: Remove logger from the dependency array.

Since logger is now a module-level constant with a stable reference, it doesn't need to be in the useCallback dependency array. Including it is unnecessary and could confuse readers into thinking it might change.

🔎 Suggested fix
-  }, [cliType, statusApi, setCliStatus, setAuthStatus, logger]);
+  }, [cliType, statusApi, setCliStatus, setAuthStatus]);
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5d67556 and a4968f7.

📒 Files selected for processing (3)
  • apps/ui/src/components/layout/sidebar/hooks/use-spec-regeneration.ts
  • apps/ui/src/components/views/setup-view/hooks/use-cli-status.ts
  • apps/ui/src/components/views/setup-view/steps/theme-step.tsx
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Always import from shared packages (@automaker/*), never from old relative paths

Files:

  • apps/ui/src/components/views/setup-view/steps/theme-step.tsx
  • apps/ui/src/components/layout/sidebar/hooks/use-spec-regeneration.ts
  • apps/ui/src/components/views/setup-view/hooks/use-cli-status.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Use resolveModelString() from @automaker/model-resolver to convert model aliases (haiku, sonnet, opus) to full model names

Files:

  • apps/ui/src/components/views/setup-view/steps/theme-step.tsx
  • apps/ui/src/components/layout/sidebar/hooks/use-spec-regeneration.ts
  • apps/ui/src/components/views/setup-view/hooks/use-cli-status.ts
🧠 Learnings (1)
📚 Learning: 2025-12-30T01:02:07.114Z
Learnt from: illia1f
Repo: AutoMaker-Org/automaker PR: 324
File: apps/ui/src/components/views/board-view/components/kanban-card/kanban-card.tsx:122-131
Timestamp: 2025-12-30T01:02:07.114Z
Learning: Tailwind CSS v4 uses postfix syntax for the important modifier: append ! at the end of the utility class (e.g., backdrop-blur-[0px]! or hover:bg-red-500!). The older v3 style used a prefix (!) at the start (e.g., !backdrop-blur-[0px]); prefer the postfix form for consistency across TSX files.

Applied to files:

  • apps/ui/src/components/views/setup-view/steps/theme-step.tsx
🧬 Code graph analysis (1)
apps/ui/src/components/views/setup-view/hooks/use-cli-status.ts (2)
libs/utils/src/logger.ts (1)
  • createLogger (127-219)
libs/utils/src/index.ts (1)
  • createLogger (44-44)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: e2e
🔇 Additional comments (3)
apps/ui/src/components/layout/sidebar/hooks/use-spec-regeneration.ts (1)

44-60: LGTM!

The conditional toast logic correctly distinguishes between creation flow and regular regeneration. The isCreationFlow check with the inline comment makes the intent clear, and this should effectively eliminate the duplicate toast notifications.

apps/ui/src/components/views/setup-view/hooks/use-cli-status.ts (1)

10-10: Good fix for the infinite loop.

Moving the logger to module scope ensures a stable reference across renders, correctly addressing the re-render loop issue.

apps/ui/src/components/views/setup-view/steps/theme-step.tsx (1)

25-33: LGTM!

The fix correctly addresses the theme synchronization issue. By updating both the global theme and the project-level theme when a selection is made, the selected theme will persist correctly since getEffectiveTheme() prioritizes the project theme. The conditional check for currentProject safely handles cases where no project exists.

@webdevcody webdevcody merged commit 2934d73 into main Jan 6, 2026
9 checks passed
@webdevcody webdevcody deleted the fix/small-bugs branch January 6, 2026 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants