fix(connectors): preserve bot token drafts - #754
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 changed
configuredSecretspresence markerWhy
Connector password inputs were hard-coded to
value="". Every keystroke therefore triggered a render that immediately emptied the field; the next key started from an empty input and overwrote the previous character. A human-entered bot token could silently save as only its final character.The Settings API already never returns stored tokens. Rendering
adapter.settings[field.key]is safe because that value exists only as the current local draft and disappears when the sealed save response arrives.User impact
Discord and Telegram bot tokens now accumulate normally behind password bullets and save in full. After saving, the field is blank again and only shows the configured placeholder, so stored secrets are still never revealed.
Validation
pnpm vitest run ui/src/pages/Connectors.demo.spec.tsx(3 passed)pnpm -F @traderalice/connector-service typecheckpnpm test:connector-replay(3 files, 11 tests passed)pnpm -F @traderalice/connector-service build && pnpm test:connector-servicegit diff --checknpx tsc --noEmitcd ui && npx tsc -bpnpm test(357 passed, 1 skipped files; 3389 passed, 9 skipped tests)pnpm -F open-alice-ui build:demoa, thenab; after auto-save the value cleared and the placeholder changed toConfigured — enter a new value to replaceExternal Discord/Telegram DM delivery was skipped because this input-only fix does not require or authorize user-owned platform credentials.