Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function ThumbnailDescriptionInput({
value={description}
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
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.
classes="flex-1"
/>
<IconButton
Expand Down
Loading