LearnNewsExamplesServices
Frontmatter
id8512
titleRefactor Ticket Badges to use Dynamic Label Store
stateClosed
labels
enhancementairefactoringbuild
assigneestobiu
createdAtJan 10, 2026, 6:52 PM
updatedAtJan 10, 2026, 7:06 PM
githubUrlhttps://github.com/neomjs/neo/issues/8512
authortobiu
commentsCount3
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 10, 2026, 7:06 PM

Refactor Ticket Badges to use Dynamic Label Store

Closed v11.20.0 enhancementairefactoringbuild
tobiu
tobiu commented on Jan 10, 2026, 6:52 PM

Replace hardcoded SCSS label colors with a dynamic system driven by GitHub data. This ensures perfect consistency between GitHub and the Portal, automated updates for new labels, and optimal text contrast ratios.

Objectives

  1. Enhance AI SDK: Expose LabelService in ai/services.mjs to allow build scripts to fetch label data programmatically.
  2. Build Infrastructure: Create buildScripts/createLabelIndex.mjs to fetch labels via the SDK, calculate YIQ contrast for text colors, and generate apps/portal/resources/data/labels.json.
  3. Data Layer: Implement Portal.model.Label and Portal.store.Labels to consume the generated JSON.
  4. UI Integration: Update Portal.view.news.tickets.Component to bind to the store and apply colors via CSS variables, removing the hardcoded SCSS map.

Tasks

  • Export GH_LabelService in ai/services.mjs
  • Create buildScripts/createLabelIndex.mjs
  • Create Portal.model.Label
  • Create Portal.store.Labels
  • Update Portal.view.news.tickets.Component.mjs logic
  • Remove color map from apps/portal/resources/scss/src/apps/portal/news/tickets/Component.scss
tobiu added the enhancement label on Jan 10, 2026, 6:52 PM
tobiu added the ai label on Jan 10, 2026, 6:52 PM
tobiu added the refactoring label on Jan 10, 2026, 6:52 PM
tobiu added the build label on Jan 10, 2026, 6:52 PM
tobiu
tobiu Jan 10, 2026, 6:52 PM

Input from Gemini 3 Pro:

✦ Starting work on exposing GH_LabelService in the AI SDK.

tobiu
tobiu Jan 10, 2026, 6:53 PM

Input from Gemini 3 Pro:

✦ Implemented GH_LabelService export in ai/services.mjs. Now creating the build script buildScripts/createLabelIndex.mjs.

tobiu referenced in commit cb695c6 - "feat: Refactor Ticket Badges to use Dynamic Label Store (#8512)" on Jan 10, 2026, 7:05 PM
tobiu
tobiu Jan 10, 2026, 7:05 PM

Input from Gemini 3 Pro:

✦ Completed refactoring:

  1. Exposed GH_LabelService in SDK.
  2. Created buildScripts/createLabelIndex.mjs to fetch and calculate label colors.
  3. Implemented Portal.model.TicketLabel and Portal.store.TicketLabels.
  4. Updated Portal.view.news.tickets.Component to use the store and CSS variables.
  5. Added the store to MainContainerStateProvider with autoLoad.
  6. Cleaned up SCSS.

Ready to close.

tobiu assigned to @tobiu on Jan 10, 2026, 7:06 PM
tobiu closed this issue on Jan 10, 2026, 7:06 PM