8000 fix(settings): restore chat credential fields by adeelahmad · Pull Request #721 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

fix(settings): restore chat credential fields - #721

Draft
adeelahmad wants to merge 2 commits into
mainfrom
fix/chat-settings-credentials
Draft

adeelahmad wants to merge 2 commits into
mainfrom
fix/chat-settings-credentials

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Summary

Fixes the crash when opening Telegram settings. The custom credential control requests telegram.token, but the shared form's field registry omitted it, so the renderer dereferenced an undefined field (Cannot read properties of undefined (reading 'section')).

The same omission affected Slack's two tokens and the Assistant email password. Register all four as secret fields, preserving the existing write-only create/replace/clear flow. No transport, permissions, defaults, stored credentials, or schema changes.

Validation

  • Reproduced the undefined-field exception for all four credentials against the main branch model.
  • Passed direct Node 24 checks against the actual TypeScript model: unique registered fields, secret masking, exact new-value and clear patches, and all literal custom field references.
  • Added 16 Jest regression cases covering field registration, opening each section, saving, Cancel/Undo, and explicit clear without resubmitting masked values.
  • Independent source review found no blocking defects.
  • Not run locally: Jest, ESLint, full TypeScript/build, strict MkDocs. No connected coding environment was available; the fallback snapshot has no frontend dependencies (jest: not found).
  • ci/local-ci.sh cannot start because the fallback snapshot is not a Git checkout. GitHub CI remains required.
  • No live bot credentials were used and no deployed instance was changed.

Done questions

  1. Goal: Crash reproduced and fix proposed. Draft and unmerged pending full CI.
  2. Agents: Existing settings API remains unchanged.
  3. Zero setup: Yes, no new prerequisite.
  4. Fewest clicks: Existing one-click Save and Replace/Clear/Undo controls.
  5. Configurable: Yes, restores existing credential controls.
  6. Light: Yes, no dependency changes.
  7. Private and secure: Existing secret masking and encrypted backend storage reused; no new surface.
  8. Cost: No new calls or charges.
  9. User decides: Existing enable/save choices unchanged.
  10. Upgrades: N/a, no stored-data change.
  11. Honest: Validation limits explicit; no live integration claim.
  12. Tested/documented: Regression tests, setup docs and changelog included; full CI pending.
  13. Open: No dependency or protocol changes.
  14. Reported: PR and validation limits returned to requester.
  15. Reuse: Existing field registry, form and secret control reused.

This branch has not been deployed

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

Labels

None yet
< 4780 /form>

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0