Skip to content

Credit amount input forcibly changes values below minimum '5' during typing - Website Issue #425

@LakshmanS27

Description

@LakshmanS27

Summary

The credit amount input in the “Add Credits” module automatically replaces any value below the minimum (5) while the user is still typing.

This creates a frustrating typing experience and makes it difficult to naturally enter multi-digit values such as 10, 20, etc.

url path: https://commandcode.ai/username/settings/billing

Expected Behavior

The input should allow temporary values below the minimum while the user is actively typing.

Minimum-value validation should happen only:

on submit,
on blur,
or after input completion,

instead of mutating the value during input entry.

Actual Behavior

The input immediately auto-corrects the entered value to 5.

Example:

User wants to enter 10
User types 1
Input instantly changes to 5
User must then manually put 10 next to 5 then come back to 5 and delete the value again to make it 5.

Steps to reproduce the issue

  1. Open the Add Credits modal

  2. Focus the Credits Amount input field

  3. Type any value below 5:

    [ 1, 2, 3, 4]

Command Code Version

0.28.1

Operating System

Windows

Terminal/IDE

No response

Shell

No response

Additional context

This behavior interrupts normal typing flow and creates unnecessary friction for users attempting to enter valid multi-digit amounts.

Current workaround:

Type something like 510
Then manually delete the extra 5

This feels unintuitive from a UX perspective.

Suggested Fix:

Instead of force-setting the value to 5 during typing:

Allow unrestricted typing inside the field
Validate the minimum amount after editing is complete

Optionally display a validation message such as:

"Minimum purchase amount is 5 credits"

Initial State:

Image

When typed 1, 5 comes:

Image

typed 510:

Image

cursor in between 5 and 10:

Image

Finally 10 after manually removing 5,

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions