Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • fixed text clipping on subscription panel

Type of Change

  • Bug fix

Testing

Tested manually.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Dec 4, 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 4, 2025 11:12pm

@waleedlatif1 waleedlatif1 merged commit ca3eb5b into staging Dec 4, 2025
5 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/settings branch December 4, 2025 23:12
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 4, 2025

Greptile Overview

Greptile Summary

Fixed text clipping in the usage limit input field by calculating width with an additional 1ch padding. This prevents the last character from being cut off during editing.

Changes:

  • Extracted width calculation (inputValue.length + 1) to a separate constant for clarity and reusability
  • Added 1ch extra width to the input field to ensure all characters are visible without clipping

Confidence Score: 5/5

  • This PR is safe to merge with no risks
  • Simple, focused bug fix that adds minimal code change. The fix properly addresses text clipping by adding 1ch of padding to the dynamic input width calculation. The change is well-scoped, follows existing patterns, and includes proper variable extraction for clarity
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/subscription/components/usage-limit/usage-limit.tsx 5/5 Fixed text clipping in input field by adding 1ch extra width to accommodate text properly

Sequence Diagram

sequenceDiagram
    participant User
    participant UsageLimit
    participant Input
    participant DOM

    User->>UsageLimit: Start editing
    UsageLimit->>UsageLimit: Calculate inputWidthCh = inputValue.length + 1
    UsageLimit->>Input: Set width style to {inputWidthCh}ch
    Input->>DOM: Render input with proper width
    Note over Input,DOM: Text no longer clips due to +1ch padding
    User->>Input: Type characters
    Input->>UsageLimit: Update inputValue
    UsageLimit->>UsageLimit: Recalculate inputWidthCh
    UsageLimit->>Input: Update width dynamically
    Input->>DOM: Re-render with adjusted width
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.

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

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