Skip to content

Improve Teams integration and registration UX#49

Closed
somethingwentwell wants to merge 1 commit intodataelement:mainfrom
somethingwentwell:feat/teams-integration-new-agent
Closed

Improve Teams integration and registration UX#49
somethingwentwell wants to merge 1 commit intodataelement:mainfrom
somethingwentwell:feat/teams-integration-new-agent

Conversation

@somethingwentwell
Copy link
Contributor

Summary

This PR makes the Microsoft Teams Alembic migration idempotent to avoid duplicate-column failures, hides the company selector on first-time registration when there are no tenants, and surfaces Microsoft Teams as an available channel in the New Digital Employee wizard (with full configuration in the agent settings page).

Checklist

  • Tested locally
  • No unrelated changes included

wisdomqin added a commit that referenced this pull request Mar 14, 2026
…iendly error messages

- Register endpoint auto-creates default tenant if startup seed failed
- Each seed step in main.py has independent error handling
- Frontend hides empty company selector (from PR #49)
- Friendlier error messages for 5xx / network errors on login page
- Idempotent Alembic migration for thinking column (from PR #49)
@wisdomqin
Copy link
Contributor

Hi @somethingwentwell, thanks for the contribution!

What we adopted from this PR:

  1. Idempotent Alembic migration — We've adopted the ALTER TABLE ... ADD COLUMN IF NOT EXISTS approach for the thinking column. This is merged into main.
  2. Hiding the company selector when no tenants exist — We've incorporated the tenants.length > 0 && guard in Login.tsx. This is also merged into main.

What we addressed differently:

The root problem — users failing to register because the default tenant wasn't seeded — went deeper than just hiding the UI selector. In our codebase, all startup seed steps (tenant, tools, skills, agents) were wrapped in a single try/except block, meaning if any step failed, the default tenant might never get created.

We fixed this with two changes:

  • Lazy tenant initialization: The /register endpoint now auto-creates the default tenant on-the-fly if it's missing, rather than relying solely on startup seeding. This makes registration resilient even if the entire startup seed process fails.
  • Isolated seed steps: Each seed operation (tenant, tools, skills, agents) now has its own independent try/except in main.py, so one failure no longer cascades to block the others.

We also added friendlier frontend error messages for 5xx/network errors on the login page (e.g., "Service is starting up, please try again" instead of raw error text).

Regarding the Teams card in AgentCreate.tsx:

We didn't merge this part because the labels are hardcoded in English without going through our i18n system (useTranslation). If you'd like to resubmit that piece with i18n support, we'd be happy to review it.

Since the key improvements from this PR are already in main, I'm closing this PR. Thank you again for the thoughtful contribution!

@wisdomqin wisdomqin closed this Mar 14, 2026
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.

2 participants