Skip to content

Conversation

@Shironex
Copy link
Collaborator

@Shironex Shironex commented Jan 25, 2026

Summary

  • Extract default values and constants from app-store.ts into a modular store/defaults/ directory
  • Add BackgroundSettings type to store/types/ui-types.ts
  • Maintain backward compatibility through re-exports from app-store.ts

Changes

New Files Created (apps/ui/src/store/defaults/)

File Contents Lines
constants.ts MAX_INIT_OUTPUT_LINES 2
background-settings.ts defaultBackgroundSettings 13
terminal-defaults.ts defaultTerminalState 19
index.ts Re-exports all defaults 3

Files Modified

File Changes
apps/ui/src/store/types/ui-types.ts Added BackgroundSettings interface
apps/ui/src/store/types/state-types.ts Updated boardBackgroundByProject to use BackgroundSettings type
apps/ui/src/store/app-store.ts Import defaults from ./defaults, remove inline definitions, update re-exports

Backward Compatibility

All existing imports from @/store/app-store continue to work:

// These still work
import { defaultBackgroundSettings, defaultTerminalState, MAX_INIT_OUTPUT_LINES } from '@/store/app-store';

New canonical import path:

import { defaultBackgroundSettings, defaultTerminalState, MAX_INIT_OUTPUT_LINES } from '@/store/defaults';

Test Plan

  • Build succeeds (npm run build)
  • Lint passes (npm run lint - 0 errors)
  • Package tests pass (npm run test:packages - 519 tests)
  • Server tests pass (npm run test:server - 1,415 tests)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Refactor
    • Reorganized default configuration management by consolidating terminal state, background settings, and initialization constants into a dedicated modular structure.
    • Maintained backward compatibility through strategic re-exports of configuration constants.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@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 refactors the application's store by extracting various default values and constants into a dedicated, modular store/defaults/ directory. This improves code organization and maintainability by centralizing default configurations. Additionally, a new BackgroundSettings type has been introduced to formalize the structure of background-related properties. The changes are implemented with backward compatibility in mind, ensuring that existing codebases importing these values from app-store.ts will continue to work without modification.

Highlights

  • Modularization of Default Values: Extracted MAX_INIT_OUTPUT_LINES, defaultBackgroundSettings, and defaultTerminalState from app-store.ts into a new store/defaults/ directory for better organization.
  • New Type Definition: Introduced the BackgroundSettings interface in ui-types.ts to formally define background configuration properties.
  • Backward Compatibility: Ensured existing imports from app-store.ts for the moved default values continue to function via re-exports, providing a smooth transition for consumers.

🧠 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.

@coderabbitai
Copy link

coderabbitai bot commented Jan 25, 2026

📝 Walkthrough

Walkthrough

The PR refactors default values and type definitions in the UI store by extracting inline defaults from app-store.ts into separate modular files, introducing a new BackgroundSettings type interface, and re-exporting these defaults for backward compatibility.

Changes

Cohort / File(s) Summary
Type definitions
apps/ui/src/store/types/ui-types.ts, apps/ui/src/store/types/state-types.ts
Added new BackgroundSettings interface to ui-types.ts with 9 properties (imagePath, imageVersion, cardOpacity, columnOpacity, columnBorderEnabled, cardGlassmorphism, cardBorderEnabled, cardBorderOpacity, hideScrollbar). Updated state-types.ts to import and replace inline boardBackgroundByProject type definition with Record<string, BackgroundSettings>.
Default values modules
apps/ui/src/store/defaults/background-settings.ts, apps/ui/src/store/defaults/constants.ts, apps/ui/src/store/defaults/terminal-defaults.ts
Created three new default modules: background-settings.ts exports defaultBackgroundSettings constant, constants.ts exports MAX_INIT_OUTPUT_LINES (500), and terminal-defaults.ts exports defaultTerminalState object with comprehensive terminal UI state initialization.
Defaults re-export
apps/ui/src/store/defaults/index.ts
Added three re-exports: defaultBackgroundSettings, defaultTerminalState, and MAX_INIT_OUTPUT_LINES for public API access.
Store refactoring
apps/ui/src/store/app-store.ts
Removed inline default values and hard-coded terminal state object. Now imports and uses modular defaults (defaultTerminalState, MAX_INIT_OUTPUT_LINES, defaultBackgroundSettings) from ./defaults. Re-exports BackgroundSettings type for backward compatibility.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

Refactor, cleanup

Poem

🐰 Defaults scattered, now they're neat,
In modules arranged so sweet,
Types extracted, code reorganized,
The store is cleaner, optimized! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: extracting default values from app-store.ts into a new modular store/defaults directory structure.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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.

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

This is a solid refactoring that improves code organization by extracting default values into a dedicated store/defaults/ directory. The changes are well-structured, enhance modularity, and correctly maintain backward compatibility through re-exports. I have a couple of suggestions to further improve the robustness of the newly created default configuration objects by making them immutable, which will prevent potential side effects from accidental mutations.

@Shironex Shironex self-assigned this Jan 25, 2026
@Shironex Shironex added Refactor A complete logic rewrite is requested or being performed for an issue. cleanup remove unused files in the codebase labels Jan 25, 2026
@Shironex Shironex merged commit c848306 into v0.14.0rc Jan 25, 2026
13 checks passed
@Shironex Shironex deleted the refactor/store-defaults branch January 25, 2026 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup remove unused files in the codebase Refactor A complete logic rewrite is requested or being performed for an issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants