Skip to content

Conversation

@karenrasmussen
Copy link
Contributor

Description

This PR increases the maximum allowed length for the thumbnail description input in image annotations.


Solution

Increased the maximum length for the thumbnail description input used in image annotations.

@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.50%. Comparing base (376dda8) to head (9a57ec2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7500   +/-   ##
=======================================
  Coverage   99.50%   99.50%           
=======================================
  Files         271      271           
  Lines       11084    11084           
  Branches     2667     2667           
=======================================
  Hits        11029    11029           
  Misses         55       55           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR increases the maximum allowed length for thumbnail description input in image annotations from 250 to 5000 characters.

Changes:

  • Updated the maxlength attribute of the thumbnail description input field from 250 to 5000 characters

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

onInput={e => onEdit((e.target as HTMLInputElement).value)}
// Maximum length for `target.description` field supported by the API.
maxlength={250}
maxlength={5000}
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

Consider adding a test to verify that the maxlength attribute is set to 5000. This would document the expected behavior and prevent accidental changes to this limit. For example, you could add a test like:

it('sets maxlength attribute to 5000', () => {
  const wrapper = mount(
    <ThumbnailDescriptionInput description="" />,
    { connected: true }
  );
  assert.equal(wrapper.find('input').prop('maxlength'), 5000);
});

This is especially important given that the comment indicates this value must match the API's constraint.

Copilot uses AI. Check for mistakes.
Comment on lines 32 to +33
// Maximum length for `target.description` field supported by the API.
maxlength={250}
maxlength={5000}
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

The comment states this is the "Maximum length for target.description field supported by the API," but the PR doesn't provide evidence that the backend API actually supports 5000 characters. If the API still enforces a 250-character limit (or a different limit), users will be able to enter up to 5000 characters in the UI, but their annotations will fail to save or be truncated when submitted to the API.

Before merging this change, verify that:

  1. The backend API has been updated to accept 5000 characters for the target.description field
  2. The database schema can accommodate this increased length
  3. Any backend validation has been updated accordingly

If the API limit has indeed been increased to 5000, consider linking to the corresponding backend PR or documentation. If the API limit is different from 5000, update the maxlength attribute to match the actual API constraint.

Copilot uses AI. Check for mistakes.
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