Skip to content

Add integration readiness status indicators (#4) - #5

Merged
99proteam merged 2 commits into
99proteam:mainfrom
Amanshrivastab:integration-readiness-status
Sep 16, 2026
Merged

99proteam merged 2 commits into
99proteam:mainfrom
Amanshrivastab:integration-readiness-status

Conversation

@Amanshrivastab

Copy link
Copy Markdown
Contributor

Closes #4

Changes

  • New GET /api/settings/status endpoint — returns configured/not-configured boolean per integration (proxy, smtp, twilio, zerobounce, ai). Never exposes actual secret values.
  • New "Integration Readiness" card on the Dashboard showing badges for each optional integration.
  • Each "Not configured" badge links directly to the relevant Settings tab.
  • Integrations remain fully optional — no blocking unless a selected campaign feature actually requires it.
  • Added defensive error handling in services/aiService.js so a malformed settings.json no longer crashes the server.

Tests

  • Added tests/integration-status.test.js (2 tests) — verifies the status route never echoes raw settings, and that the dashboard has the required container + render function.
  • All 13 existing + new tests pass: npm test

Manual verification

  1. Cleared all settings → all 5 badges show "Not configured".
  2. Filled SMTP fields (host, user, pass) via Settings page → Saved → Dashboard badge flips to "Configured".
  3. Checked Network tab on /api/settings/status response — confirmed no password/API key values present, only booleans.
  4. Clicked "Configure" link on a missing integration → correctly navigates to Settings and opens the right tab.

Screenshots

2026-09-13 2026-09-13 (2)

- Add GET /api/settings/status endpoint (booleans only, no secrets exposed)
- Add dashboard Integration Readiness card with configured/not-configured badges
- Link missing integrations to their settings tab
- Add defensive error handling in aiService.js for invalid settings.json
- Add tests/integration-status.test.js

@99proteam 99proteam left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution. The overall idea is useful, but please address these issues before merging:

  1. Revert all changes to data/settings.json. Example SMTP credentials must not be committed, and they currently make SMTP incorrectly appear configured.
  2. Move the Integration Readiness card inside #pageDashboard; currently it appears outside the dashboard section and may remain visible on every page.
  3. Fix the AI “Configure” link. It opens the API Keys tab, but that tab has no AI configuration field.
  4. Add CSS for integration-status-list and integration-badge instead of leaving the new component unstyled.
  5. Add functional tests for /api/settings/status and the Configure buttons. The current tests only search the source files and do not verify actual behavior.
  6. Please keep unrelated changes out of this pull request and format the modified code consistently.
    Once updated, please comment here and I will review it again.

…ashboard, fix AI configure link, add CSS, add functional tests
@Amanshrivastab

Copy link
Copy Markdown
Contributor Author

Thanks for the detailed review! I've addressed all the points:

  1. Reverted data/settings.json — removed committed SMTP test credentials.
  2. Moved the Integration Readiness card inside #pageDashboard.
  3. Fixed the AI Configure link — added a dedicated "AI" settings tab with
    Provider, API Key, Base URL, Model, and Gemini Model fields; backend now
    points settingsTab to 'ai' instead of 'apikeys'.
  4. Added CSS for .integration-status-list and .integration-badge.
  5. Added functional tests:
    • tests/settings-status-functional.test.js — hits /api/settings/status
      over real HTTP and verifies the response shape and that no secrets leak.
    • tests/configure-buttons.test.js — uses Puppeteer to click the AI
      Configure link and verify the correct settings tab opens.
  6. Reverted unrelated changes to services/aiService.js and package-lock.json,
    and cleaned up indentation/formatting in the modified files.

All tests pass locally (npm test). Please take another look when you get a chance.

@Amanshrivastab

Copy link
Copy Markdown
Contributor Author

"Hi @99proteam, just following up — I've addressed all the review comments and the workflow is awaiting your approval whenever you get a chance. Let me know if anything else needs changes!"

@99proteam
99proteam merged commit d4f44a9 into 99proteam:main Sep 16, 2026
2 checks passed
@99proteam

Copy link
Copy Markdown
Owner

Thanks for the contribution! Your changes have been reviewed, tested, and successfully merged. Appreciate your work on this improvement. 🚀

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve first-run integration readiness messages

2 participants