Improve queue listing and related tooling#303
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates SlackONOS queue listing to provide a compact default list view (current track + next tracks), adds listall / list all for the full queue, and improves AI mention routing to reduce false “admin-only” rejections for song-title-like messages. It also introduces a configurable queueThreadThreshold to thread long queue outputs, updating docs and tests accordingly.
Changes:
- Add
listQueuehandler and routelist→ compact view; addlistallfor the full queue with threaded overflow support. - Add
queueThreadThresholdconfig surfaced viasetconfig, admin API, and the web admin UI. - Refine AI routing for mentions to disambiguate ambiguous admin-looking parses and add regression/integration test coverage.
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/tools/integration-test-suite.mjs | Adds transcript-based regression cases and optional mention tests for add/admin-only false positives. |
| test/setconfig.test.mjs | Extends setconfig validation coverage for new queueThreadThreshold numeric config. |
| test/command-router.test.mjs | Adds tests for AI mention disambiguation between admin intents and track-add fallbacks. |
| test/command-registry.test.mjs | Updates registry expectations for list routing and new listall command. |
| test/command-handlers.test.mjs | Adds unit coverage for listQueue behavior and threaded overflow for queue listing. |
| test/admin-api.test.mjs | Verifies admin API can update queueThreadThreshold. |
| templates/help/helpTextAdmin.txt | Minor help text formatting adjustment. |
| templates/help/helpText.txt | Documents list (compact) and listall (full) behavior. |
| README.md | Updates command descriptions to match the new queue listing semantics. |
| public/setup/admin.js | Exposes queueThreadThreshold in the web admin configuration UI. |
| lib/command-router.js | Adds explicit-admin-intent detection and AI coercion logic for ambiguous unauthorized admin parses. |
| lib/command-registry.js | Routes list to listQueue and adds listall entry. |
| lib/command-handlers.js | Implements compact queue listing, queue window retrieval, and threaded overflow helpers. |
| lib/ai-handler.js | Allows and documents listall in AI command set and prompt rules. |
| lib/admin-api.js | Permits reading/updating queueThreadThreshold via the admin API and treats it as numeric. |
| index.js | Returns message send results (for thread TS usage) and wires queueThreadThreshold through config defaults and setconfig output. |
| docs/QUICK_START.md | Updates quick start command list for list/listall. |
| docs/AI_FEATURE.md | Adds listall to AI feature documentation examples. |
| config/config.json.example | Adds queueThreadThreshold example configuration. |
Comment on lines
+104
to
+116
| function formatTrackTime(position, duration) { | ||
| if (!duration || !position) { | ||
| return null; | ||
| } | ||
|
|
||
| const remaining = Math.max(0, duration - position); | ||
| const remainingMin = Math.floor(remaining / 60); | ||
| const remainingSec = Math.floor(remaining % 60); | ||
| const durationMin = Math.floor(duration / 60); | ||
| const durationSec = Math.floor(duration % 60); | ||
|
|
||
| return `${remainingMin}:${remainingSec.toString().padStart(2, '0')} remaining (${durationMin}:${durationSec.toString().padStart(2, '0')} total)`; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Notes