Skip to content

Conversation

@AsPulse
Copy link
Contributor

@AsPulse AsPulse commented Jul 20, 2025

The branch name is fix-issue-172, but this does not fix issue #172.
(It is a confusing branch name because I tried to create a PR out first that fixes another issue found while working on this issue. Sorry!)

Changes

  • In live monitor, to avoid breaking borders when the terminal is narrow, do the following:

    • The progress bar is shortened.
    • Margins are reduced.
    • Token counts, etc. are shortened using k.
    • More information is displayed on two lines.
  • In live monitor, re-render the terminal when it is resized.

Screenshots

comparing

Summary by CodeRabbit

  • New Features

    • The display now adapts dynamically to available space, adjusting column layouts and formatting for improved readability.
    • Token counts and usage details automatically switch between full and short formats based on space constraints.
    • Session, usage, and projection sections intelligently reformat to fit content, using multi-line layouts when needed.
  • Improvements

    • Progress bars and text elements resize dynamically for better alignment and presentation.
    • The interface updates immediately upon terminal resize for a more responsive experience.

@coderabbitai
Copy link

coderabbitai bot commented Jul 20, 2025

Caution

Review failed

The pull request is closed.

## Walkthrough

The changes update the live dashboard rendering logic to use dynamic layout calculations and adaptive formatting based on available terminal width and content length. Progress bars, token counts, and session details now adjust their display format and line breaks responsively. The waiting logic after rendering an active block is also updated to react immediately to terminal resize events.

## Changes

| File(s)                      | Change Summary                                                                                          |
|-----------------------------|--------------------------------------------------------------------------------------------------------|
| src/_live-rendering.ts       | Refactored live dashboard rendering: replaced fixed widths with dynamic calculations, added conditional formatting for token counts, and adapted layouts to fit content responsively. |
| src/commands/_blocks.live.ts | Modified waiting logic to race between delay, abort signal, and terminal resize event, enabling immediate refresh on resize. |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant User
    participant Terminal
    participant Renderer as renderLiveDisplay
    participant BlockLoop

    User->>BlockLoop: Start monitoring
    loop Each refresh cycle
        BlockLoop->>Renderer: Render dashboard
        Renderer->>Terminal: Measure available width
        Renderer->>Renderer: Format tokens and layout adaptively
        Renderer->>Terminal: Output dashboard
        BlockLoop->>Terminal: Wait for (delay OR abort OR resize)
        alt Resize event
            Terminal->>BlockLoop: Trigger immediate refresh
        end
    end

Estimated code review effort

2 (~20 minutes)

Possibly related PRs

Poem

A dashboard hops, alive and spry,
Columns stretch as widths go by.
Tokens shrink or grow with flair,
Progress bars now fit with care.
Resize your screen, the rabbit sees—
The dashboard shifts with gentle ease!
🐇✨


<!-- walkthrough_end -->
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKNwSPbABsvkCiQBHbGlcSHFcLzpIACIAM3gADwAKL0kSMGZ8DHV8CgBKLgAxRMgvNFl8PAUfNG5ED3gsDGcKfAB3MMpmRrRfNvhaXFhoyDlIbHq+AEFEK2969Fpaf0R65DKKqqQHaRQsIY9UqUhM7II+WJJqbH9INtgyMIfOim7mvsbadpRkZopWtoaSBTLxDSpEWBPDwCKgYBiQ5psSAAA3iCTA22CYAAjAB2ABMyPs2CIpEQuGQ6kgaN2mI8Zjx+IANFDIEpEAwKPBuOIsowylz4rshtQnqhbGz8LsMPhQit8F5jiLQohuKJ4PEGD8dugMPQDqNYfDIIiGshuohImhaI0iBo3M94ZgyShmNxImwMDR6I0GF5sEpFkIJrhPRSwvgeP4pF7RrklHwYVcANZoUh7E0tb40V49D6DWAyeSIWC5GjZDBEVm8fBEFYyZws/y0bAMW0nZxERqIFmYegqJMSeDUdsEZOPJjYL3ICaj56RXA5mLJ6JAqZLdTwLK9LyyFmZW6NWK5ZgjvmoFrOqIENlId3lfj7NqR1LkZA3gQkReUalUg1MDBySoRoolVNAGBINcZQOPhx3keA3VaKQwx+Vkjg8U4cgoAByZAVHgVJcHkG9/DAfw9R/A0czeXpb1VDY2VkRF4AYHd5HuR4qK6PM7k+b5UBWeAAC86HtAwpnsTkSDIEtZVQmshyUfVIwI/0gOoDwDSHBxaIQhSSDDPC9VKcpKhVXB8MI+Q0FiJcDgWJ1K2kIF3GsOxtGYd9IzIWBMAg1kJ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ZMflh/FaKrrnUDuY1Ah+FO4k5oXwGmiT5PpI+gajaDSdVT1uqh7RAnLJz7WmpW6518boxbgDWGvK1T0bo5IMXF6O2r5iXMM10TnNxNA+eFJgUXn0bsP2+lZT2BVOWY0+ILTun9NLd2G0RzHZd3m42bZ3ANxdiB4U400znhw/qfCPAWk6XUAediPaBrCMpYyxRsZGheA2bY4wUVnmR3+YdecELeQfGqBi00BLemyMbrqGVgMRAytLckAT7QZWm10WIwMAzdAuJcQAAZV+4loAAFh36oAAHFvgAbAIWIq/D9oGxLENAh/V/SWxDZVfe+ACcq/Yj4loCfgArJLQwS/P/YgYCfzQGtHxCfz31oD30Pz3wYAAGZrQ10BAIJP9V80AYCBAn9D9YhPwBB8RV9cCSBsQf9F8h8V8t98RsQSAn9ACb8P9Ygt80BP9WIGA9811cRP8YCn8YCGB0CbJz88COCt8iDiCIBh9cBR9aBx9J9p9lZUYiCl9mAGBuBlYAI90xC59QgF9kQtCDAABvAwSAGIbsehWACkaILgAAbQAF0mR9CYg+sAVbREAzDIArCDAABfAwLQ5EGvE4RQ5QmdBVGQ4yfQIAA -->

<!-- internal state end -->

---

<details>
<summary>📜 Recent review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**


<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 77421e9c960dbf4a5cac8ba75393cb9af6a02394 and 2cdbc1e676e2b9ba4ba476bf20b1ec83ea349764.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `src/commands/_blocks.live.ts` (1 hunks)

</details>

</details>
<!-- finishing_touch_checkbox_start -->

<details>
<summary>✨ Finishing Touches</summary>

- [ ] <!-- {"checkboxId": "7962f53c-55bc-4827-bfbf-6a18da830691"} --> 📝 Generate Docstrings

</details>

<!-- finishing_touch_checkbox_end -->
<!-- tips_start -->

---

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.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=ryoppippi/ccusage&utm_content=328):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Explain this complex logic.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai explain this code block.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and explain its main purpose.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

### Support

Need help? Create a ticket on our [support page](https://www.coderabbit.ai/contact-us/support) for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->

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.

Summary of Changes

Hello @AsPulse, 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 significantly enhances the live token usage monitor's responsiveness and readability, especially in narrow terminal environments. It introduces dynamic layout adjustments to prevent display issues and ensures the monitor re-renders automatically when the terminal window is resized.

Highlights

  • Dynamic Layout Adjustments: The live monitor now intelligently adapts its display for narrow terminal widths by shortening progress bars, reducing margins, and abbreviating token counts (e.g., using 'k' for thousands) to prevent layout collapse.
  • Multi-line Information Display: When terminal space is constrained, detailed information within the session, usage, and projection sections will now be displayed across two lines to maintain readability, rather than being truncated or breaking the display borders.
  • Terminal Resize Responsiveness: The live monitor will automatically detect and re-render its display when the terminal window is resized, ensuring the layout always fits the current terminal dimensions without requiring a manual refresh.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 is currently in preview and 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 to provide feedback.

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.

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 pull request does a great job of fixing the layout collapse in the live monitor for narrow terminals by making the UI responsive. The introduction of dynamic width calculations and handling for terminal resizing are excellent improvements. My review focuses on a few areas to enhance code clarity, maintainability, and robustness. I've identified one high-severity issue regarding a potential event listener leak that should be addressed, and a couple of medium-severity suggestions to improve code readability. Overall, these changes significantly improve the user experience.

AsPulse and others added 2 commits July 20, 2025 20:57
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
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: 2

🧹 Nitpick comments (1)
src/_live-rendering.ts (1)

264-347: Complex but functional adaptive layout logic.

The two-line layout fallback mechanism works correctly, though the implementation is quite complex with multiple conditional branches. The logic handles both token limit and no-limit scenarios appropriately.

Consider extracting the layout decision logic into a helper function to improve readability:

const determineUsageLayout = (totalWidth: number, availableWidth: number) => {
    return totalWidth > availableWidth;
};

However, I understand from previous feedback that you prefer to avoid refactoring unrelated to the PR's core objectives.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 51c9aad and 77421e9.

📒 Files selected for processing (1)
  • src/_live-rendering.ts (6 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{js,jsx,ts,tsx}

Instructions used from:

Sources:
📄 CodeRabbit Inference Engine

  • CLAUDE.md
**/*.{ts,tsx}

Instructions used from:

Sources:
📄 CodeRabbit Inference Engine

  • CLAUDE.md
**/*.ts

Instructions used from:

Sources:
📄 CodeRabbit Inference Engine

  • CLAUDE.md
**/_*.ts

Instructions used from:

Sources:
📄 CodeRabbit Inference Engine

  • CLAUDE.md
🪛 ESLint
src/_live-rendering.ts

[error] 158-158: Unsafe argument of type error typed assigned to a parameter of type number.

(ts/no-unsafe-argument)


[error] 158-158: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 159-159: Unsafe argument of type error typed assigned to a parameter of type number.

(ts/no-unsafe-argument)


[error] 159-159: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 160-160: Unsafe argument of type error typed assigned to a parameter of type number.

(ts/no-unsafe-argument)


[error] 160-160: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 200-200: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 204-204: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 204-204: Unsafe member access .gray on an error typed value.

(ts/no-unsafe-member-access)


[error] 205-205: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 205-205: Unsafe member access .gray on an error typed value.

(ts/no-unsafe-member-access)


[error] 205-205: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 206-206: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 206-206: Unsafe member access .gray on an error typed value.

(ts/no-unsafe-member-access)


[error] 206-206: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 211-211: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 211-211: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 211-211: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 211-211: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 218-218: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 268-268: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 268-268: Unsafe member access .bold on an error typed value.

(ts/no-unsafe-member-access)


[error] 272-272: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 272-272: Unsafe member access .bold on an error typed value.

(ts/no-unsafe-member-access)


[error] 276-276: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 276-276: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 276-276: Unsafe member access .bold on an error typed value.

(ts/no-unsafe-member-access)


[error] 277-277: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 277-277: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 285-285: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 285-285: Unsafe member access .gray on an error typed value.

(ts/no-unsafe-member-access)


[error] 287-287: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 287-287: Unsafe member access .gray on an error typed value.

(ts/no-unsafe-member-access)


[error] 289-289: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 289-289: Unsafe member access .gray on an error typed value.

(ts/no-unsafe-member-access)


[error] 292-292: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 292-292: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 294-294: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 296-296: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 304-304: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 304-304: Unsafe member access .gray on an error typed value.

(ts/no-unsafe-member-access)


[error] 306-306: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 306-306: Unsafe member access .gray on an error typed value.

(ts/no-unsafe-member-access)


[error] 311-311: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 318-318: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 330-330: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 345-345: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 394-394: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 399-399: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 399-399: Unsafe member access .gray on an error typed value.

(ts/no-unsafe-member-access)


[error] 400-400: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 400-400: Unsafe member access .gray on an error typed value.

(ts/no-unsafe-member-access)


[error] 401-401: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 401-401: Unsafe member access .gray on an error typed value.

(ts/no-unsafe-member-access)


[error] 404-404: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 404-404: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 404-404: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 404-404: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 411-411: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 411-411: Unsafe member access .gray on an error typed value.

(ts/no-unsafe-member-access)


[error] 418-418: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 422-422: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)

🔇 Additional comments (3)
src/_live-rendering.ts (3)

113-116: Well-designed helper function for adaptive token formatting.

The formatTokenDisplay function provides a clean abstraction for choosing between short and full token formatting based on space constraints. This approach improves code readability and reduces duplication.


204-217: Well-implemented adaptive layout for session details.

The fallback logic that omits the "Elapsed" column when space is constrained is a smart approach to maintain readability in narrow terminals while preserving the most essential information.


392-430: Consistent adaptive layout implementation for projections.

The projection section follows the same adaptive layout pattern as the usage section, providing consistency in the user experience. The two-line fallback logic correctly prioritizes the most important information when space is constrained.

@ryoppippi
Copy link
Owner

This is lit

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jul 22, 2025

Open in StackBlitz

npm i https://pkg.pr.new/ryoppippi/ccusage@328

commit: 2cdbc1e

Copy link
Owner

@ryoppippi ryoppippi left a comment

Choose a reason for hiding this comment

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

LGTM
thanks!

@ryoppippi ryoppippi merged commit 1bae444 into ryoppippi:main Jul 22, 2025
6 of 7 checks passed
@AsPulse AsPulse deleted the fix-issue-172 branch July 23, 2025 02:33
@coderabbitai coderabbitai bot mentioned this pull request Jul 29, 2025
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