Skip to content

fix: setup page UX improvements and broken links#1841

Merged
mdesmet merged 10 commits intomasterfrom
fix/setup-page-fixes
Mar 24, 2026
Merged

fix: setup page UX improvements and broken links#1841
mdesmet merged 10 commits intomasterfrom
fix/setup-page-fixes

Conversation

@ralphstodomingo
Copy link
Copy Markdown
Contributor

@ralphstodomingo ralphstodomingo commented Mar 16, 2026

Summary

Setup page UX improvements and bug fixes based on QA feedback.

Setup wizard UX

  • Make wizard steps clickable so users can navigate back and forth
  • Remove fixed sidebar width (280px) — sidebar now sizes to content
  • Responsive layout: steps switch from vertical sidebar to horizontal top bar on narrow screens (≤700px)
  • Add "Tutorials" button on the landing page to jump directly to the tutorials step
  • Fresh install now shows the "Supercharge" landing page first instead of jumping straight to prerequisites
  • Click-to-expand overlay on tutorial images for full-size viewing

dbt installation flow

  • Pre-select the correct integration type in the "Install dbt" step based on the already-chosen type
  • Verify dbt is actually detected after install attempt — show actionable error if not
  • Handle install cancellation gracefully (e.g. dismissing version/adapter quick pick) — don't report as failed installation
  • Fix Fusion CLI detection (companion altimate-dbt-integration PR flow editor that enables non tech savvy users to work with DBT #35)

Python environment tracking

  • Refresh cached pythonVersion in checkAllInstalled() after dbt detection completes — the Python extension API has settled by that point
  • Onboarding panel listens to onDBTInstallationVerification (not the raw interpreter change event) so dbtInstalled, pythonPath, and pythonVersion are all current before the webview refreshes
  • Silent diagnostics refresh on interpreter change to avoid UI flicker

Other fixes

  • Point all setup page doc links to https://docs.myaltimate.com/setup/reqdConfig/
  • Load .env variables per workspace folder in multi-root workspaces
  • Add Clear Run History command
  • Fix exposure details panel infinite spinner from unique_id key mismatch

Test plan

  • F5 extension, open setup page — verify steps are clickable and navigate correctly
  • Resize panel narrow (<700px) — steps should switch to horizontal layout
  • Click doc links — should open https://docs.myaltimate.com/setup/reqdConfig/ (not 404)
  • Click Tutorials on landing page — should jump to tutorials step
  • Click tutorial GIFs — should open full-screen overlay, click to dismiss
  • Select dbt Core, click Install, cancel version picker — should not show installation failed
  • Select dbt Fusion, Install — should detect Fusion CLI (requires dbt-integration PR flow editor that enables non tech savvy users to work with DBT #35)
  • Install dbt when not present — should show actionable error with Output panel reference
  • Change Python interpreter — version and path should update without flicker or reload
  • Switch to interpreter without dbt — dbt check should flip to failed

Summary by CodeRabbit

  • New Features

    • Added "Tutorials" button and clickable, expandable tutorial images in onboarding
    • Setup wizard steps are now clickable for direct navigation and adapt layout by screen size
  • Bug Fixes

    • More reliable Python environment detection and stabilization during setup
    • Onboarding now updates status only after dbt installation verification completes
  • Documentation

    • Updated setup documentation links across onboarding flows
  • Minor

    • Walkthrough help now opens the onboarding flow

- Make wizard steps clickable for back/forth navigation
- Remove fixed sidebar width (280px), size to content
- Responsive layout: vertical sidebar → horizontal top bar on narrow screens
- Add "Tutorials" button on landing page
- Fix broken doc URLs (404) → point to `https://docs.myaltimate.com/`
- Fresh install shows "Supercharge" landing page instead of jumping to prerequisites

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ralphstodomingo ralphstodomingo self-assigned this Mar 16, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 16, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Replaces the onboarding help command, adds a PythonEnvironment refresh method and awaits it during DBT checks, switches the onboarding panel listener to DBT installation verification events, and includes multiple onboarding UI updates (responsive wizard, docs URL changes, tutorials/images expansion, and minor props/state adjustments).

Changes

Cohort / File(s) Summary
Core DBT client & Python env
src/dbt_client/dbtProjectContainer.ts, src/dbt_client/pythonEnvironment.ts, src/dbt_client/index.ts
Added PythonEnvironment.refreshPythonEnvironment(); awaited refresh inside DBTClient.checkAllInstalled(); changed help command from dbtPowerUser.openSetupWalkthrough to dbtPowerUser.openOnboarding.
Onboarding provider listener
src/webview_provider/onboardingPanel.ts
Replaced subscription to Python environment change events with subscription to onDBTInstallationVerification; only notifies webview after verification completes (ignores in-progress).
Onboarding webview modules — docs & props
webview_panels/src/modules/onboarding/DbtIntegrationSetup.tsx, .../InstallDbtStep.tsx, .../PrerequisitesStep.tsx
Updated documentation links to /setup/reqdConfig/; added optional initialIntegrationType prop to InstallDbtStep; runDiagnostics() gained silent flag to skip UI state toggles.
Onboarding main & wizard
webview_panels/src/modules/onboarding/Onboarding.tsx, .../SetupWizard.tsx
Added "Tutorials" button/handler; SetupWizard now uses responsive step orientation (horizontal ≤700px), an onChange handler for step navigation, explicit disabled: false on steps, and updated docs URL.
Tutorials UX & styles
webview_panels/src/modules/onboarding/TutorialsStep.tsx, .../onboarding.module.scss
Added click-to-expand tutorial images with overlay/modal and related styles; adjusted responsive layout (wizard content, sidebar, steps) and step interactivity for small screens.

Sequence Diagram

sequenceDiagram
    participant Client as VSCode Command
    participant DBT as DBTClient
    participant PyEnv as PythonEnvironment
    participant Panel as OnboardingPanel
    participant Webview as Webview

    Client->>DBT: checkAllInstalled()
    DBT->>DBT: detectDBT()
    DBT->>PyEnv: refreshPythonEnvironment()
    PyEnv->>PyEnv: ensure Python extension active
    PyEnv->>PyEnv: query environment details
    PyEnv->>DBT: return updated python version/isPython3
    DBT->>Panel: emit DBTInstallationVerificationEvent (inProgress true/false)
    Panel->>Panel: ignore events with inProgress === true
    Panel->>Webview: send { command: "pythonEnvironmentChanged" } after verification complete
    Webview->>Webview: runDiagnostics(silent) / update UI
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • mdesmet
  • saravmajestic
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main changes: UX improvements to the setup page and fixes for broken documentation links.
Description check ✅ Passed The PR description is comprehensive and well-structured. It includes a clear summary, detailed explanation of changes across multiple areas (setup wizard UX, dbt installation flow, Python environment tracking, and other fixes), and provides a thorough test plan. It exceeds the repository template requirements by providing extensive context and actionable testing steps.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/setup-page-fixes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

Migrating from UI to YAML configuration.

Use the @coderabbitai configuration command in a PR comment to get a dump of all your UI settings in YAML format. You can then edit this YAML file and upload it to the root of your repository to configure CodeRabbit programmatically.

ralphstodomingo and others added 4 commits March 17, 2026 00:38
- Tutorial GIFs now open in full-screen overlay on click
- Added hint text: "Click any image to expand it"
- Zoom-in cursor on images, zoom-out cursor on overlay

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Pass current `dbtIntegrationType` from `PrerequisitesStep` to `InstallDbtStep`
- Install step now defaults to the already-chosen integration type instead of always "core"

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Check `dbtProjectContainer.dbtInstalled` after install completes
- Show actionable error message pointing to Output panel if detection fails
- Prevents misleading "Installation successful" flash when install silently fails

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add `refreshPythonVersion()` to `PythonEnvironment` to re-fetch version
  from the Python extension API
- Call it in `getDiagnosticsStatus` before returning Python info
- Previously `pythonVersion` was set once at init and never updated

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment thread .github/meta/pr-fixes.md Outdated
- Pre-select the correct integration type in the "Install dbt" step based on the already-chosen type
- Fix false "Installation successful" for dbt Fusion/Cloud — verify dbt is actually detected after install, show actionable error if not
- Fix Fusion CLI detection (in `altimate-dbt-integration` PR #35) — was finding dbt Core in Python venv instead of Fusion binary at `~/.local/bin/dbt`
- Fix Python version not updating in setup UI after changing interpreter — refresh version from Python extension API on each diagnostics check
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

remove this file

Comment thread src/webview_provider/onboardingPanel.ts Outdated

// Refresh Python version in case interpreter changed since last check
await pythonEnvironment.refreshPythonVersion();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

pythonEnvironment should always have the right version.

Need help choosing?{" "}
<a
href="https://docs.myaltimate.com/setup/integrations/"
href="https://docs.myaltimate.com/"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@mdesmet mdesmet marked this pull request as ready for review March 19, 2026 07:12
Comment thread src/webview_provider/onboardingPanel.ts Outdated
Comment on lines +326 to +331
if (!this.dbtProjectContainer.dbtInstalled) {
throw new Error(
`dbt ${integrationType} could not be detected after installation. ` +
`Check the Output panel (View → Output → "dbt") for details.`,
);
}

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (3)
webview_panels/src/modules/onboarding/TutorialsStep.tsx (1)

311-323: Add keyboard-accessible overlay dismissal.

The image overlay is mouse-dismiss only right now. Please add dialog semantics and Escape-to-close to improve accessibility.

Suggested patch
+  const handleOverlayKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {
+    if (e.key === "Escape") {
+      setExpandedImage(null);
+    }
+  };
+
   {expandedImage && (
     <div
-      role="presentation"
+      role="dialog"
+      aria-modal="true"
+      tabIndex={-1}
       className={classes.imageOverlay}
       onClick={() => setExpandedImage(null)}
+      onKeyDown={handleOverlayKeyDown}
     >
       <img
         src={expandedImage.src}
         alt={expandedImage.alt}
         className={classes.imageOverlayImg}
       />
     </div>
   )}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@webview_panels/src/modules/onboarding/TutorialsStep.tsx` around lines 311 -
323, The overlay currently only supports mouse closing; make it
keyboard-accessible by giving the overlay div dialog semantics (add
role="dialog" and aria-modal="true"), make it focusable (tabIndex={0}), add an
onKeyDown handler that calls setExpandedImage(null) when Escape is pressed, and
ensure it receives focus when opened by focusing an overlayRef (use a ref and a
useEffect tied to expandedImage). Update references in TutorialsStep.tsx: the
overlay div using classes.imageOverlay, the image using classes.imageOverlayImg,
and the setter setExpandedImage so Escape and keyboard focus close the overlay.
src/dbt_client/pythonEnvironment.ts (1)

82-84: Don’t swallow Python version refresh failures silently.

If refresh fails, diagnostics can look stale with no trace. Please emit a debug/error log in the catch block.

Suggested patch
   } catch {
-      // Keep existing version if refresh fails
+      this.dbtTerminal.debug(
+        "pythonEnvironment:refreshPythonVersion",
+        "Failed to refresh Python version; keeping previous values",
+      );
   }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/dbt_client/pythonEnvironment.ts` around lines 82 - 84, The catch block
that currently swallows exceptions during the Python version refresh must log
the failure instead of being silent; update the catch in the refresh routine
(the try/catch around the Python version refresh call in pythonEnvironment.ts)
to call the module's logger (e.g., processLogger.error or the existing logger
used elsewhere in this module) and include a clear message plus the caught
error/stack (e.g., "Failed to refresh Python version" + error). Ensure you
preserve the existing behavior of keeping the existing version but do not
swallow the error — log at debug/error level with the error object for
diagnostics.
webview_panels/src/modules/onboarding/SetupWizard.tsx (1)

102-108: getSnapshot creates a new MediaQueryList on every call.

useSyncExternalStore may call getSnapshot frequently (on every render and during hydration checks). Creating a new matchMedia object each time is inefficient.

Consider caching the MediaQueryList instance:

♻️ Proposed fix to cache MediaQueryList
 const NARROW_QUERY = "(max-width: 700px)";
+const narrowMql = typeof window !== "undefined" ? window.matchMedia(NARROW_QUERY) : null;
+
 const subscribe = (cb: () => void) => {
-  const mql = window.matchMedia(NARROW_QUERY);
-  mql.addEventListener("change", cb);
-  return () => mql.removeEventListener("change", cb);
+  narrowMql?.addEventListener("change", cb);
+  return () => narrowMql?.removeEventListener("change", cb);
 };
-const getSnapshot = () => window.matchMedia(NARROW_QUERY).matches;
+const getSnapshot = () => narrowMql?.matches ?? false;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@webview_panels/src/modules/onboarding/SetupWizard.tsx` around lines 102 -
108, getSnapshot currently calls window.matchMedia(NARROW_QUERY) every time
which allocates a new MediaQueryList on each render; instead create and reuse a
single cached MediaQueryList (e.g. const mql = typeof window !== "undefined" ?
window.matchMedia(NARROW_QUERY) : null) at module or hook initialization and use
that same mql inside subscribe and getSnapshot so
addEventListener/removeEventListener and .matches operate on the same object;
also guard for SSR by handling mql === null in both subscribe and getSnapshot to
avoid accessing window on the server.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/dbt_client/pythonEnvironment.ts`:
- Around line 82-84: The catch block that currently swallows exceptions during
the Python version refresh must log the failure instead of being silent; update
the catch in the refresh routine (the try/catch around the Python version
refresh call in pythonEnvironment.ts) to call the module's logger (e.g.,
processLogger.error or the existing logger used elsewhere in this module) and
include a clear message plus the caught error/stack (e.g., "Failed to refresh
Python version" + error). Ensure you preserve the existing behavior of keeping
the existing version but do not swallow the error — log at debug/error level
with the error object for diagnostics.

In `@webview_panels/src/modules/onboarding/SetupWizard.tsx`:
- Around line 102-108: getSnapshot currently calls
window.matchMedia(NARROW_QUERY) every time which allocates a new MediaQueryList
on each render; instead create and reuse a single cached MediaQueryList (e.g.
const mql = typeof window !== "undefined" ? window.matchMedia(NARROW_QUERY) :
null) at module or hook initialization and use that same mql inside subscribe
and getSnapshot so addEventListener/removeEventListener and .matches operate on
the same object; also guard for SSR by handling mql === null in both subscribe
and getSnapshot to avoid accessing window on the server.

In `@webview_panels/src/modules/onboarding/TutorialsStep.tsx`:
- Around line 311-323: The overlay currently only supports mouse closing; make
it keyboard-accessible by giving the overlay div dialog semantics (add
role="dialog" and aria-modal="true"), make it focusable (tabIndex={0}), add an
onKeyDown handler that calls setExpandedImage(null) when Escape is pressed, and
ensure it receives focus when opened by focusing an overlayRef (use a ref and a
useEffect tied to expandedImage). Update references in TutorialsStep.tsx: the
overlay div using classes.imageOverlay, the image using classes.imageOverlayImg,
and the setter setExpandedImage so Escape and keyboard focus close the overlay.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7366597b-dd6c-4af5-af8f-3e753bd5879b

📥 Commits

Reviewing files that changed from the base of the PR and between c1532d7 and 6a17b51.

📒 Files selected for processing (11)
  • .github/meta/pr-fixes.md
  • src/dbt_client/dbtProjectContainer.ts
  • src/dbt_client/pythonEnvironment.ts
  • src/webview_provider/onboardingPanel.ts
  • webview_panels/src/modules/onboarding/DbtIntegrationSetup.tsx
  • webview_panels/src/modules/onboarding/InstallDbtStep.tsx
  • webview_panels/src/modules/onboarding/Onboarding.tsx
  • webview_panels/src/modules/onboarding/PrerequisitesStep.tsx
  • webview_panels/src/modules/onboarding/SetupWizard.tsx
  • webview_panels/src/modules/onboarding/TutorialsStep.tsx
  • webview_panels/src/modules/onboarding/onboarding.module.scss

…fully

- Update all onboarding `docs.myaltimate.com` links to `/setup/reqdConfig/`
- Return `boolean` from `installDbt()` to distinguish cancellation from failure
- Skip post-install verification when user cancels version/adapter quick pick
- Remove `pr-fixes.md` scratch file

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment thread src/dbt_client/pythonEnvironment.ts Outdated
Comment on lines +80 to +81
this._pythonVersion = envDetails?.version?.join(".");
this.isPython3 = envDetails?.version[0] === "3";

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/commands/walkthroughCommands.ts (1)

363-371: ⚠️ Potential issue | 🟠 Major

Avoid firing async retry commands without awaiting them across all install paths.

The race condition is not limited to line 368. All three install functions (installDbtFusion, installDbtCloud, installDbtCore) fire commands.executeCommand("dbtPowerUser.installDbt") without awaiting:

  • Line 220 (installDbtFusion)
  • Line 270 (installDbtCloud)
  • Line 368 (installDbtCore)

This allows each function to complete and return to the caller while the retry command is still in flight, potentially racing downstream post-install verification. The issue is most acute in installDbtCore (line 368) where an explicit return true at line 371 gives the caller a false completion signal, but all three paths have the same underlying problem.

Add await before each commands.executeCommand("dbtPowerUser.installDbt") call (lines 220, 270, 368), and for installDbtCore, return false after the await to indicate the installation is still pending (lines 368-369).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/commands/walkthroughCommands.ts` around lines 363 - 371, The three
installer functions installDbtFusion, installDbtCloud, and installDbtCore
currently call commands.executeCommand("dbtPowerUser.installDbt") without
awaiting, causing a race; update each function to await
commands.executeCommand("dbtPowerUser.installDbt") instead of firing it
unawaited, and in installDbtCore specifically, after awaiting the retry command
return false (not true) so the caller knows installation is still pending;
locate the calls inside the installDbtFusion, installDbtCloud, and
installDbtCore functions and add the await and adjusted return for
installDbtCore.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/commands/walkthroughCommands.ts`:
- Around line 145-157: installDbt currently dispatches to
installDbtCore/installDbtFusion/installDbtCloud without passing the selected
workspace context, so environment resolution can pick the wrong interpreter in
multi-root workspaces; change installDbt to read the selected project from
workspace state key "dbtPowerUser.projectSelected", derive the WorkspaceFolder
via workspace.getWorkspaceFolder(pickedProject.uri), and pass that
workspaceFolder into the downstream installers (installDbtCore,
installDbtFusion, installDbtCloud) so they call
pythonEnvironment.getEnvironmentVariables(workspaceFolder) instead of relying on
a default or global workspace.

---

Outside diff comments:
In `@src/commands/walkthroughCommands.ts`:
- Around line 363-371: The three installer functions installDbtFusion,
installDbtCloud, and installDbtCore currently call
commands.executeCommand("dbtPowerUser.installDbt") without awaiting, causing a
race; update each function to await
commands.executeCommand("dbtPowerUser.installDbt") instead of firing it
unawaited, and in installDbtCore specifically, after awaiting the retry command
return false (not true) so the caller knows installation is still pending;
locate the calls inside the installDbtFusion, installDbtCloud, and
installDbtCore functions and add the await and adjusted return for
installDbtCore.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2d742718-4040-47e3-a639-45ae47f8f35e

📥 Commits

Reviewing files that changed from the base of the PR and between 6a17b51 and 0fceb0c.

📒 Files selected for processing (6)
  • src/commands/walkthroughCommands.ts
  • src/webview_provider/onboardingPanel.ts
  • webview_panels/src/modules/onboarding/DbtIntegrationSetup.tsx
  • webview_panels/src/modules/onboarding/InstallDbtStep.tsx
  • webview_panels/src/modules/onboarding/Onboarding.tsx
  • webview_panels/src/modules/onboarding/SetupWizard.tsx
✅ Files skipped from review due to trivial changes (2)
  • webview_panels/src/modules/onboarding/Onboarding.tsx
  • webview_panels/src/modules/onboarding/DbtIntegrationSetup.tsx
🚧 Files skipped from review as they are similar to previous changes (3)
  • webview_panels/src/modules/onboarding/InstallDbtStep.tsx
  • src/webview_provider/onboardingPanel.ts
  • webview_panels/src/modules/onboarding/SetupWizard.tsx

Comment thread src/commands/walkthroughCommands.ts Outdated
Comment on lines +145 to +157
async installDbt(): Promise<boolean> {
const dbtIntegration = workspace
.getConfiguration("dbt")
.get<string>("dbtIntegration", "core");
switch (dbtIntegration) {
case "core":
return this.installDbtCore();
case "fusion":
return this.installDbtFusion();
await this.installDbtFusion();
return true;
case "cloud":
return this.installDbtCloud();
await this.installDbtCloud();
return true;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Pass selected project/workspace context through installDbt() dispatch.

installDbt() currently routes to install handlers without project/workspace context, so env resolution can still target the wrong interpreter in multi-root workspaces.

Based on learnings, in src/commands/walkthroughCommands.ts, the walkthrough install commands should resolve the active workspace folder from workspace state key "dbtPowerUser.projectSelected" using workspace.getWorkspaceFolder(pickedProject.uri) and pass it to pythonEnvironment.getEnvironmentVariables(workspaceFolder) instead of hardcoding/defaulting workspace selection.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/commands/walkthroughCommands.ts` around lines 145 - 157, installDbt
currently dispatches to installDbtCore/installDbtFusion/installDbtCloud without
passing the selected workspace context, so environment resolution can pick the
wrong interpreter in multi-root workspaces; change installDbt to read the
selected project from workspace state key "dbtPowerUser.projectSelected", derive
the WorkspaceFolder via workspace.getWorkspaceFolder(pickedProject.uri), and
pass that workspaceFolder into the downstream installers (installDbtCore,
installDbtFusion, installDbtCloud) so they call
pythonEnvironment.getEnvironmentVariables(workspaceFolder) instead of relying on
a default or global workspace.

Refresh `pythonEnvironment` cache in `checkAllInstalled()` after dbt
detection completes — at that point the Python extension API has settled.

Listen to `onDBTInstallationVerification` instead of the raw interpreter
change event so the setup page reads fresh `dbtInstalled`, `pythonPath`,
and `pythonVersion`. Silent refresh avoids UI flicker.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment on lines 223 to 231
prev.map((check) => ({ ...check, status: "error" as CheckStatus })),
);
} finally {
setChecking(false);
if (!silent) {
setChecking(false);
}
}
};

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
src/dbt_client/index.ts (1)

63-65: ⚠️ Potential issue | 🟠 Major

Don't treat a swallowed refresh as fresh interpreter state.

src/dbt_client/pythonEnvironment.ts:70-84 catches refresh failures and leaves the previous pythonVersion / isPython3 values intact. If that happens after an interpreter switch, this path still completes verification as if the cache was refreshed, so the onboarding panel can render the old interpreter as current. Please have refreshPythonVersion() clear stale fields or report failure back to this caller.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/dbt_client/index.ts` around lines 63 - 65, The refreshPythonVersion path
currently swallows errors and leaves stale pythonVersion/isPython3 values;
update pythonEnvironment.refreshPythonVersion so that on failure it clears those
fields (set pythonVersion = undefined and isPython3 = undefined) and/or
returns/throws a failure indicator, and then update the caller (the await
this.pythonEnvironment.refreshPythonVersion() in dbt client) to check the
returned boolean or catch the thrown error and treat the refresh as failed (so
the onboarding UI won't assume a refreshed interpreter).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/webview_provider/onboardingPanel.ts`:
- Around line 324-344: The code trusts this.dbtProjectContainer.dbtInstalled
after calling walkthroughCommands.installDbt(), but installDbt can return true
even when installation fails; update walkthroughCommands.installDbt to return
the actual post-install detection boolean (i.e., run a fresh detection after the
install attempt and return that result) or, alternatively, after the await
this.walkthroughCommands.installDbt() call explicitly trigger a fresh detection
on the project container (e.g., call a detect/refresh method on
dbtProjectContainer) and use that fresh result instead of the cached
this.dbtProjectContainer.dbtInstalled before sending success via
sendResponseToWebview.

---

Duplicate comments:
In `@src/dbt_client/index.ts`:
- Around line 63-65: The refreshPythonVersion path currently swallows errors and
leaves stale pythonVersion/isPython3 values; update
pythonEnvironment.refreshPythonVersion so that on failure it clears those fields
(set pythonVersion = undefined and isPython3 = undefined) and/or returns/throws
a failure indicator, and then update the caller (the await
this.pythonEnvironment.refreshPythonVersion() in dbt client) to check the
returned boolean or catch the thrown error and treat the refresh as failed (so
the onboarding UI won't assume a refreshed interpreter).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: eb35a00b-1236-4da9-ac62-44978f4dc5a8

📥 Commits

Reviewing files that changed from the base of the PR and between 0fceb0c and d84281b.

📒 Files selected for processing (4)
  • src/dbt_client/index.ts
  • src/dbt_client/pythonEnvironment.ts
  • src/webview_provider/onboardingPanel.ts
  • webview_panels/src/modules/onboarding/PrerequisitesStep.tsx
✅ Files skipped from review due to trivial changes (1)
  • webview_panels/src/modules/onboarding/PrerequisitesStep.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/dbt_client/pythonEnvironment.ts

Comment thread src/webview_provider/onboardingPanel.ts Outdated
Comment on lines +324 to +344
// Call the installDbt command (swallows errors internally).
// Returns false if the user cancelled (e.g. dismissed quick pick).
const attempted = await this.walkthroughCommands.installDbt();

if (!attempted) {
// User cancelled — don't report as failure
this.sendResponseToWebview({
command: "response",
syncRequestId,
data: { success: false, cancelled: true },
});
break;
}

// Verify installation actually succeeded
if (!this.dbtProjectContainer.dbtInstalled) {
throw new Error(
`dbt ${integrationType} could not be detected after installation. ` +
`Check the Output panel (View → Output → "dbt") for details.`,
);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Don't trust cached dbtInstalled after a truthy install result.

At least the Core path in src/commands/walkthroughCommands.ts:275-372 catches install errors and still returns true, so this branch can end up reading whatever this.dbtProjectContainer.dbtInstalled was before the attempt. If Core was already detected and the reinstall fails, the webview still gets { success: true }. Please have installDbt() return the post-install detection result, or force a fresh detection before deciding success.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/webview_provider/onboardingPanel.ts` around lines 324 - 344, The code
trusts this.dbtProjectContainer.dbtInstalled after calling
walkthroughCommands.installDbt(), but installDbt can return true even when
installation fails; update walkthroughCommands.installDbt to return the actual
post-install detection boolean (i.e., run a fresh detection after the install
attempt and return that result) or, alternatively, after the await
this.walkthroughCommands.installDbt() call explicitly trigger a fresh detection
on the project container (e.g., call a detect/refresh method on
dbtProjectContainer) and use that fresh result instead of the cached
this.dbtProjectContainer.dbtInstalled before sending success via
sendResponseToWebview.

ralphstodomingo and others added 2 commits March 22, 2026 23:08
Refresh `pythonEnvironment` cache in `checkAllInstalled()` after dbt
detection completes. Onboarding panel listens to `onDBTInstallationVerification`
instead of the raw interpreter change event so all state is fresh.

Reverts install flow changes (cancellation handling, boolean returns) to
keep scope minimal. Fixes `?.version[0]` optional chaining bug.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move `refreshPythonEnvironment()` (renamed from `refreshPythonVersion`)
to run before `detectDBT()` with a brief delay, so `pythonPath` reflects
the new interpreter when detection runs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/dbt_client/pythonEnvironment.ts`:
- Around line 88-91: The current assignment unconditionally writes
this._pythonVersion and this.isPython3 from envDetails even when envDetails or
envDetails.version is missing; update the logic in pythonEnvironment.ts (around
the api.environment.getEnvironmentDetails call and the envDetails handling) to
only update this._pythonVersion when envDetails?.version is defined (e.g., set
this._pythonVersion = envDetails.version.join(".") only if envDetails?.version
exists) and only set this.isPython3 when envDetails?.version?.[0] is defined,
otherwise preserve the previous cached values; ensure no assignments write
undefined or false when the API returned an incomplete response.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 06ae1b40-3a3c-4de7-9181-0af4dd29d45e

📥 Commits

Reviewing files that changed from the base of the PR and between ac9d8e5 and 188df8c.

📒 Files selected for processing (2)
  • src/dbt_client/index.ts
  • src/dbt_client/pythonEnvironment.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/dbt_client/index.ts

Comment on lines +88 to +91
const envDetails =
await api.environment.getEnvironmentDetails(pythonPath);
this._pythonVersion = envDetails?.version?.join(".");
this.isPython3 = envDetails?.version?.[0] === "3";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Partial API response may overwrite valid cached values.

If envDetails or envDetails.version is undefined/null, lines 90-91 will overwrite _pythonVersion with undefined and isPython3 with false, contradicting the catch block's intent to "keep previous values." This could incorrectly signal Python 2 when the version simply couldn't be determined.

🛡️ Proposed fix to preserve previous values on incomplete response
       const envDetails =
         await api.environment.getEnvironmentDetails(pythonPath);
-      this._pythonVersion = envDetails?.version?.join(".");
-      this.isPython3 = envDetails?.version?.[0] === "3";
+      if (envDetails?.version) {
+        this._pythonVersion = envDetails.version.join(".");
+        this.isPython3 = envDetails.version[0] === "3";
+      }
     } catch (e) {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/dbt_client/pythonEnvironment.ts` around lines 88 - 91, The current
assignment unconditionally writes this._pythonVersion and this.isPython3 from
envDetails even when envDetails or envDetails.version is missing; update the
logic in pythonEnvironment.ts (around the api.environment.getEnvironmentDetails
call and the envDetails handling) to only update this._pythonVersion when
envDetails?.version is defined (e.g., set this._pythonVersion =
envDetails.version.join(".") only if envDetails?.version exists) and only set
this.isPython3 when envDetails?.version?.[0] is defined, otherwise preserve the
previous cached values; ensure no assignments write undefined or false when the
API returned an incomplete response.

@mdesmet mdesmet merged commit efbee85 into master Mar 24, 2026
17 checks passed
@mdesmet mdesmet deleted the fix/setup-page-fixes branch March 24, 2026 03:42
ralphstodomingo added a commit that referenced this pull request Mar 24, 2026
Incorporates master fixes (PR #1841 setup page UX improvements) while
preserving branch's Altimate setup step, MCP gating, substeps, and
wizard navigation enhancements.

Key integrations from master:
- Responsive sidebar layout (`isNarrow` / `useSyncExternalStore`)
- Clickable sidebar steps and contextual button labels
- Image zoom/expand on tutorials page
- Silent diagnostics refresh (no loading flicker)
- `initialIntegrationType` prop pass-through
- URL fixes, typo fix, optional chaining safety
- `refreshPythonVersion()` utility method
- Improved Python env listener (`onDBTInstallationVerification`)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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