Skip to content

Rework of the connect flow#122

Merged
torrmal merged 16 commits intomainfrom
feat/connect-flow-v2
Apr 25, 2026
Merged

Rework of the connect flow#122
torrmal merged 16 commits intomainfrom
feat/connect-flow-v2

Conversation

@tino097
Copy link
Copy Markdown
Contributor

@tino097 tino097 commented Apr 21, 2026

Rework of the datasource connection experience

  1. /connect becomes a single conversational prompt — no numbered menu, no "use existing / create new" branching, no LLM engine lookup
  2. Custom datasources have no required fields — users can save with just a name and description, flow never aborts on empty input
  3. When credentials arrive via chat (YOLO mode), the connect_new_datasource tool saves them to the vault directly before any scratchpad use

@tino097 tino097 changed the title Feat/connect flow v2 Rework of the connect flow Apr 21, 2026
@entelligence-ai-pr-reviews
Copy link
Copy Markdown

EntelligenceAI PR Summary

Simplifies datasource connection UX and enforces optional fields policy for all custom datasources.

  • connect.py: Single free-text prompt replaces numbered-menu flow; resolution order is saved slug → registry name → custom fallback
  • connect.py / datasources.py: Inline vault.save + restore_namespaced_env + register_secret_vars triples replaced by new save_connection() utility
  • custom.py: _force_all_fields_optional() added; required=False enforced at DatasourceField construction, LLM prompt instruction, and serialization; empty-input check changed from not user_answer.strip() to user_answer is None
  • datasource_registry.py: Post-construction step sets fields.required = False for all fields (including auth method fields) on custom engines
  • tests/test_datasource.py: New TestCustomDatasourceRequiredFieldsPolicy class; non-registry name routing test; cancellation test; fixture iterators updated to remove leading '0' index step
  • uv.lock: dill==0.3.8 added as pinned runtime dependency

Confidence Score: 4/5 - Mostly Safe

Safe to merge with minor caveats — the PR cleanly consolidates a scattered vault.save + restore_namespaced_env + register_secret_vars pattern into a single save_connection() utility and simplifies the connect flow UX, both of which are clear improvements. No automated review comments were generated and no unresolved pre-existing issues are flagged. The _force_all_fields_optional() addition in custom.py and the slug-resolution order change in connect.py are the two areas worth a human glance, but neither shows evidence of a logic defect from the analysis. Coverage of 4/6 changed files means two files weren't deeply reviewed, which is the only reason this falls short of a full 5.

Key Findings:

  • The new save_connection() utility correctly replaces three-step inline patterns (vault.save / restore_namespaced_env / register_secret_vars) across connect.py and datasources.py — centralizing this logic reduces future drift and is the right architectural move.
  • _force_all_fields_optional() in custom.py enforcing required=False at DatasourceField construction is a policy enforcement change; if any caller previously relied on required=True validation to gate bad input, that guard is now silently removed — worth confirming no upstream validation is lost.
  • The slug → registry name → custom fallback resolution order in connect.py is a behavioral change from a numbered-menu flow; regression risk is low but the happy-path and ambiguous-input paths should be manually verified since automated analysis did not exercise them.
  • Two of six changed files were not covered by the automated review, so there is a small blind spot; given the PR scope is a UX/utility refactor rather than a security or data-path change, this is acceptable but noted.
Files requiring special attention
  • custom.py
  • connect.py
  • datasources.py

@torrmal torrmal added this pull request to the merge queue Apr 25, 2026
Merged via the queue into main with commit 485b0d0 Apr 25, 2026
5 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants