Skip to content

fix(studio): model optional queue status entries - #4477

Open
ranxi2001 wants to merge 1 commit into
volcengine:mainfrom
ranxi2001:fix/studio-queue-status-typing
Open

fix(studio): model optional queue status entries#4477
ranxi2001 wants to merge 1 commit into
volcengine:mainfrom
ranxi2001:fix/studio-queue-status-typing

Conversation

@ranxi2001

@ranxi2001 ranxi2001 commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Description

Model queue_status keys as optional so Studio lint agrees with the API's partial runtime payloads without removing the guards on Semantic and Embedding.

Human Involvement

  • A human participated in the implementation or review loop
  • This PR was generated entirely by AI agents without human participation in the loop

Related Issue

Part of #4471 (problem 2 of 2).

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

  • make arbitrary queue_status entries explicitly optional in the local type;
  • retain the runtime guards for absent Semantic and Embedding queues; and
  • cover a partial payload with only the Semantic entry present.

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux
    • macOS
    • Windows

Before:

npm run lint: 52 problems (2 errors, 50 warnings)
task-pipeline.ts:87:31  Unnecessary optional chain
task-pipeline.ts:92:32  Unnecessary optional chain

After:

npm run lint: 50 problems (0 errors, 50 warnings)
npm test: 57 files passed; 215 tests passed
npm run build: passed (3955 modules transformed)

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Screenshots (if applicable)

Not applicable. This changes a data type and regression test without changing rendered UI output.

Additional Notes

The backend builds some queue-status payloads from the entries actually present and uses .get() for named queues in its own consumers. This is why the fix changes the type rather than deleting the optional chains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant