fix(desktop): satisfy slash metadata typecheck#39334
Merged
ethernet8023 merged 1 commit intoJun 4, 2026
Merged
Conversation
|
comfirm reproducible on windows 11 (desktop build failed due to this) |
This was referenced Jun 5, 2026
19 tasks
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.
What does this PR do?
Fixes the Desktop TypeScript build failure introduced by the slash command metadata change in #39289.
SlashItemMetadataextendsRecord<string, string>, butrawTextwas declared optional asstring | undefined, which makestsc -bfail with TS2411.The metadata object always sets
rawText: command, so this makes the interface match the actual runtime shape.Related Issue
Fixes #
Support thread evidence: Windows Desktop installer failed at
apps/desktop build failed (exit 1)on commit1eeb7da2e6e5with:src/app/chat/composer/hooks/use-slash-completions.ts(19,3): error TS2411: Property rawText of type string | undefined is not assignable to string index type string.Type of Change
Changes Made
apps/desktop/src/app/chat/composer/hooks/use-slash-completions.ts— ChangedSlashItemMetadata.rawTextfrom optional to required so it satisfies theRecord<string, string>index signature and matches the object literal that always suppliesrawText: command.How to Test
origin/mainat1eeb7da2e6e5, the Windows Desktop installer log showsnpm run packfailing duringtsc -bwith TS2411 inuse-slash-completions.ts.cd apps/desktop && npm run type-check.Result:
npm run type-checkpasses locally.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — N/Acli-config.yaml.exampleif I added/changed config keys — N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — N/AFor New Skills
N/A
Screenshots / Logs
Failing installer log excerpt from support thread:
src/app/chat/composer/hooks/use-slash-completions.ts(19,3): error TS2411: Property rawText of type string | undefined is not assignable to string index type string.Validation run:
cd apps/desktop && npm run type-checkPassed.