Skip to content

Conversation

@icecrasher321
Copy link
Collaborator

Summary

improvement(ui/ux): small styling improvements (#2293)
fix(billing): copilot should directly deduct credit balance (#2294)

emir-karabeg and others added 2 commits December 10, 2025 17:20
* improvement: action-bar duplicate, copilot header name truncating, dashboard table scrolling

* improvement: workflow block handle positioning

* improvement: copilot notification fix message

* improvement: dashboard layout, popover hovering

* fix: filtering table into row, workflow name truncating
@vercel
Copy link

vercel bot commented Dec 11, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Dec 11, 2025 2:27am

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 11, 2025

Greptile Overview

Greptile Summary

This PR combines a critical billing fix with several minor UI/UX improvements across the application.

Key Changes:

  • Billing Fix (Critical): Modified copilot cost tracking to record full cost directly instead of using credit overflow logic. Previously, deductFromCredits() was called and only the overflow amount was stored in cost metrics, which meant costs covered by credits weren't tracked in usage statistics. Now all copilot costs are properly tracked regardless of credit balance.
  • Error Messaging: Enhanced copilot error notifications to include block name context ("Error in [BlockName]. Please fix this."), while removing the redundant suffix from the notification click handler.
  • Text Truncation: Fixed long workflow names and chat titles from overflowing their containers by adding proper flex constraints (min-w-0, flex-1, truncate).
  • Layout Fixes: Added bottom padding to dashboard and proper flex-col directives to prevent content from being cut off.
  • Visual Polish: Adjusted workflow block connection handle positioning by 1px for better alignment, and added fast transitions (75ms) to popover items to prevent hover state "jumping" during rapid mouse movement.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • All changes are well-scoped and straightforward. The billing fix is a simple removal of credit deduction logic that was causing incomplete cost tracking. UI improvements are conservative CSS adjustments using established patterns. No breaking changes, no new dependencies, and changes align with the codebase conventions.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
apps/sim/app/api/billing/update-cost/route.ts 5/5 Removed credit deduction logic to bill full cost directly instead of using credit overflow
apps/sim/stores/notifications/utils.ts 5/5 Removed "Please fix this" suffix from copilot messages sent from notifications
apps/sim/stores/terminal/console/store.ts 5/5 Enhanced error notification message with block name context for copilot debugging
apps/sim/app/workspace/[workspaceId]/logs/components/log-details/log-details.tsx 5/5 Fixed workflow name truncation by adding proper flex constraints and text-ellipsis
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/copilot.tsx 5/5 Fixed chat title truncation in copilot header with proper flex constraints

Sequence Diagram

sequenceDiagram
    participant User
    participant Copilot
    participant Workflow
    participant Console
    participant Notification
    participant BillingAPI

    Note over User,BillingAPI: Copilot Billing Flow (Fix)
    
    User->>Copilot: Send message
    Copilot->>BillingAPI: POST /api/billing/update-cost
    Note over BillingAPI: Previously: deductFromCredits()<br/>then store overflow<br/><br/>Now: Store full cost directly
    BillingAPI->>BillingAPI: Update totalCopilotCost with full cost
    BillingAPI-->>Copilot: Success
    
    Note over User,BillingAPI: Error Notification Flow (Improvement)
    
    Workflow->>Workflow: Block execution error
    Workflow->>Console: addConsole(entry with error)
    Console->>Console: Check isErrorNotificationsEnabled
    Console->>Notification: addNotification with enhanced message
    Note over Notification: Message now includes:<br/>"Error in [BlockName].<br/>Please fix this."
    User->>Notification: Click "Ask Copilot"
    Notification->>Copilot: openCopilotWithMessage()
    Note over Copilot: Removed "Please fix this" suffix<br/>(already included in message)
    Copilot->>Copilot: Send enhanced error message
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

7 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@icecrasher321 icecrasher321 merged commit b5da613 into main Dec 11, 2025
20 checks passed
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.

3 participants