Skip to content

HOTFIX: progress + template selector merge #1093

Merged
duckduckhero merged 3 commits intomainfrom
hotfix-progress-template-selector
Jul 6, 2025
Merged

HOTFIX: progress + template selector merge #1093
duckduckhero merged 3 commits intomainfrom
hotfix-progress-template-selector

Conversation

@duckduckhero
Copy link
Contributor

No description provided.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 6, 2025

📝 Walkthrough

Walkthrough

The changes make progress tracking and display conditional on whether the connected LLM is local (HyprLocal). The progress prop is made optional in the FloatingButton component, and the logic for progress reporting in the useEnhanceMutation hook is gated by the LLM connection type.

Changes

File(s) Change Summary
apps/desktop/src/components/editor-area/floating-button.tsx Made progress prop optional in FloatingButtonProps, set default to 0, and updated progress logic.
apps/desktop/src/components/editor-area/index.tsx Added LLM connection query, passed isLocalLlm to useEnhanceMutation, and gated progress logic on it.

Sequence Diagram(s)

sequenceDiagram
    participant EditorArea
    participant useEnhanceMutation
    participant FloatingButton
    participant LLM (HyprLocal/Remote)

    EditorArea->>LLM: Query connection type
    EditorArea->>useEnhanceMutation: Call with isLocalLlm flag
    useEnhanceMutation->>LLM: Stream text (with/without progress options based on isLocalLlm)
    useEnhanceMutation->>FloatingButton: Pass progress (only if isLocalLlm)
    FloatingButton->>FloatingButton: Show progress if isLocalLlm and progress is valid
Loading

Possibly related PRs

Warning

Review ran into problems

🔥 Problems

GitHub checks timed out after 90 seconds. Some checks were still in progress when the timeout was reached. Consider increasing the GitHub Checks - Timeout Ms value in your CodeRabbit configuration to allow more time for checks to complete.


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f8d2ac4 and a774fb7.

📒 Files selected for processing (2)
  • apps/desktop/src/components/editor-area/floating-button.tsx (3 hunks)
  • apps/desktop/src/components/editor-area/index.tsx (7 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.{js,ts,tsx,rs}`: 1. No error handling. 2. No unused imports, variables, or functions. 3. For comments, keep it minimal. It should be about "Why", not "What".

**/*.{js,ts,tsx,rs}: 1. No error handling.
2. No unused imports, variables, or functions.
3. For comments, keep it minimal. It should be about "Why", not "What".

⚙️ Source: CodeRabbit Configuration File

List of files the instruction was applied to:

  • apps/desktop/src/components/editor-area/floating-button.tsx
  • apps/desktop/src/components/editor-area/index.tsx
🧬 Code Graph Analysis (1)
apps/desktop/src/components/editor-area/index.tsx (1)
packages/utils/src/ai.ts (2)
  • tool (7-7)
  • localProviderName (18-18)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: ci (macos, macos-latest)
  • GitHub Check: ci (windows, windows-latest)
🔇 Additional comments (13)
apps/desktop/src/components/editor-area/floating-button.tsx (3)

49-49: LGTM: Progress prop correctly made optional

The optional progress prop aligns with the conditional progress tracking based on LLM connection type.


59-59: LGTM: Appropriate default value for optional progress

The default value of 0 provides a safe fallback when progress is not provided, which works well with the conditional display logic.


183-184: LGTM: Progress display logic correctly handles optional progress

The logic properly checks for progress !== undefined in addition to the existing conditions, ensuring progress is only shown when it's actually provided and valid.

apps/desktop/src/components/editor-area/index.tsx (10)

100-103: LGTM: LLM connection query properly implemented

The query correctly fetches the LLM connection type, which is essential for determining whether to enable progress tracking.


109-109: LGTM: isLocalLlm flag correctly calculated and passed

The boolean flag is properly derived from the connection type using optional chaining, safely handling cases where data might be undefined.


284-290: LGTM: Function signature correctly updated

The isLocalLlm parameter is properly added to the function signature with appropriate TypeScript typing.


319-321: LGTM: Progress reset properly gated

Progress is only reset to 0 when using local LLM, which is consistent with the conditional progress tracking approach.


415-419: LGTM: Tools conditionally added for local LLM

The update_progress tool is only included when using local LLM, which aligns with the progress tracking requirements. The conditional spreading pattern is clean and readable.


428-441: LGTM: Provider options conditionally configured

The provider options with custom grammar settings are only applied for local LLM connections, maintaining the separation of concerns between local and remote LLM behavior.


449-452: LGTM: Progress updates properly gated

Tool-call progress updates are only processed when using local LLM, preventing unnecessary progress state changes for remote connections.


472-474: LGTM: Success progress reset properly gated

Consistent with the other progress operations, the success callback only resets progress for local LLM connections.


477-479: LGTM: Error progress reset properly gated

Error handling correctly resets progress only for local LLM connections, maintaining consistency with the conditional progress tracking pattern.


488-488: LGTM: Conditional progress return aligns with component requirements

The return statement correctly provides progress only when using local LLM, returning undefined otherwise, which works perfectly with the optional progress prop in the FloatingButton component.

✨ 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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

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

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@duckduckhero duckduckhero merged commit 3b19a8e into main Jul 6, 2025
5 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Jul 26, 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.

1 participant