Skip to content

fix(environment): give DEV an identity color - #2747

Open
HandSonic wants to merge 1 commit into
OtterMind:mainfrom
HandSonic:fix/environment-dev-color
Open

fix(environment): give DEV an identity color#2747
HandSonic wants to merge 1 commit into
OtterMind:mainfrom
HandSonic:fix/environment-dev-color

Conversation

@HandSonic

Copy link
Copy Markdown
Contributor

Related issue

N/A — contract gap found by reviewing 14729e0 (identity colors); described below.

Summary

SysEnvironmentServiceImpl defines colors for TEST (GREEN) and RELEASE (RED) but DEV shipped with none: /api/common/environment/list_all returns color: null for DEV while the client types Environment.color as non-null and uses it directly for badge styling (current consumers happen to guard; any new consumer calling .color.toLocaleLowerCase() throws). DEV now carries BLUE, and a test pins that every environment defines a non-blank color.

Affected surfaces

  • Frontend / Web
  • Backend / API / Storage
  • Database plugin / Driver
  • JCEF / Desktop packaging
  • CI / Build / Release
  • Documentation only

Verification

Risk and compatibility

  • Public API or stored data: N/A (computed list, nothing persisted).
  • Database or driver compatibility: N/A.
  • Network, privacy, or security: N/A.
  • Community / Local / Pro boundary: N/A.
  • Backward compatibility: null → BLUE only adds information.

Reviewer map

  • Start here: SysEnvironmentServiceImpl DEV constant.
  • Failure condition: none.
  • Rollback or disable path: revert single commit.

Contributor declaration

  • I linked the Issue that defines this change.
  • I tested the affected behavior and reported the actual results above.
  • I did not include credentials, private data, or generated build output.
  • I disclosed substantial AI assistance below, or this PR contains no substantial AI-generated code.

AI assistance: substantial — fix and tests drafted with AI assistance, verified locally.

listAll shipped DEV without a color while TEST/RELEASE define GREEN/RED; the client types Environment.color as non-null and lowercases it for badge styling, so any new consumer would NPE on DEV.
@HandSonic
HandSonic requested review from a team and openai0229 as code owners August 23, 2026 18:55
@openai0229 openai0229 moved this to In Review in Chat2DB Community Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

2 participants