Skip to content

fix: preserve Trello label colours during import - #579

Open
bionicman wants to merge 1 commit into
kanbn:mainfrom
habralab:fix/trello-label-import-fidelity
Open

fix: preserve Trello label colours during import#579
bionicman wants to merge 1 commit into
kanbn:mainfrom
habralab:fix/trello-label-import-fidelity

Conversation

@bionicman

Copy link
Copy Markdown
Contributor

Summary

  • preserve Trello label colours instead of assigning colours by array position
  • support all 30 named Trello colour variants, with explicit fallbacks for
    colourless and unknown values
  • request up to 1,000 labels per board instead of relying on Trello's default
    nested collection limit
  • cover the mapping and import request in unit and self-hosted E2E tests

Why

We are migrating an established Trello workspace rather than a small example
board. It currently has 422 label definitions; the two largest boards have 75
and 57. There are 77 dark/light colour definitions used by 336 card-label
assignments. The current importer both truncates large label collections and
loses those source colours.

The colour mapping stays inside the Trello import boundary. Kan's shared label
palette and creation UI are unchanged. Colourless labels retain the existing
grey fallback, and unknown future Trello values use a deterministic fallback.

This follows #577, which made imported custom HEX values safe to edit.

Testing

  • pnpm --filter @kan/api exec vitest run src/utils/trello.test.ts — 34 passed
  • API and E2E typechecks
  • package-scoped ESLint and Prettier checks
  • both self-hosted Trello import scenarios, including a red_dark label and a
    mock assertion for labels_limit=1000

@hjball hjball left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We don't currently support the full Trello colour range so it won't be possible to assign the imported colours via the Kan UI.

I don't think that's an issue but worth considering before we merge.

Otherwise lgtm

@bionicman
bionicman force-pushed the fix/trello-label-import-fidelity branch from 458838c to ce8a819 Compare September 4, 2026 17:50
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