Skip to content

Commit ce0a1b7

Browse files
authored
Merge pull request #14 from zenml-io/fix/multiple-fixes-dashboard-url-window-hijack
Fix Extension Hijacking and Dashboard URLs
2 parents 8479df1 + 64eedfa commit ce0a1b7

23 files changed

+2415
-1156
lines changed

.claude/settings.local.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM python:3.11.9-slim-bookworm
22

33
# Set custom bash prompt
4-
RUN echo "PS1='ZenML Codespace Tutorial$ '" >> /root/.bashrc
4+
RUN echo "PS1='ZenML Tutorial$ '" >> /root/.bashrc
55

66
# Install git (dev only)
77
RUN apt-get -y update

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"workbench.startupEditor": "none"
1111
},
1212
"extensions": [
13-
"zenml-io.zenml-codespace-tutorial"
13+
"zenml-io.zenml-tutorial"
1414
]
1515
}
1616
},
Binary file not shown.

.github/workflows/build-extensions.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: Build theme extension
4242
run: |
4343
echo "Building theme extension..."
44-
cd themes && npx @vscode/vsce package --out ./zenml-color-theme-0.0.2.vsix
44+
cd themes && npx @vscode/vsce package --out ./zenml-color-theme-0.1.6.vsix
4545
4646
- name: Verify extensions were builts
4747
run: |
@@ -54,25 +54,25 @@ jobs:
5454
exit 1
5555
fi
5656
57-
if [ -f "themes/zenml-color-theme-0.0.2.vsix" ]; then
57+
if [ -f "themes/zenml-color-theme-0.1.6.vsix" ]; then
5858
echo "Theme extension built successfully:"
59-
ls -la themes/zenml-color-theme-0.0.2.vsix
59+
ls -la themes/zenml-color-theme-0.1.6.vsix
6060
else
61-
echo "ERROR: zenml-color-theme-0.0.2.vsix not found"
61+
echo "ERROR: zenml-color-theme-0.1.6.vsix not found"
6262
exit 1
6363
fi
6464
6565
- name: Upload tutorial extension artifact
6666
uses: actions/upload-artifact@v4
6767
with:
6868
name: tutorial-extension
69-
path: .devcontainer/extensions/zenml-codespace-tutorial-*.vsix
69+
path: .devcontainer/extensions/zenml-tutorial-*.vsix
7070

7171
- name: Upload theme extension artifact
7272
uses: actions/upload-artifact@v4
7373
with:
7474
name: theme-extension
75-
path: themes/zenml-color-theme-0.0.2.vsix
75+
path: themes/zenml-color-theme-0.1.6.vsix
7676

7777
- name: Commit and push built extensions
7878
# Only commit on push to main/develop branches, not on PRs
@@ -82,8 +82,8 @@ jobs:
8282
git config --local user.name "GitHub Action"
8383
8484
# Add the built extensions to git
85-
git add .devcontainer/extensions/zenml-codespace-tutorial-*.vsix
86-
git add themes/zenml-color-theme-0.0.2.vsix
85+
git add .devcontainer/extensions/zenml-tutorial-*.vsix
86+
git add themes/zenml-color-theme-0.1.6.vsix
8787
8888
# Check if there are any changes to commit
8989
if git diff --staged --quiet; then

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,7 @@ venv.bak/
6060
.mypy_cache/
6161
.dmypy.json
6262
dmypy.json
63+
64+
65+
# claude
66+
.claude/

.vscodeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ vsc-extension-quickstart.md
1010
**/*.ts
1111
**/.vscode-test.*
1212
pipelinesBackup/
13+
.mypy_cache/

README.md

Lines changed: 102 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ This VS Code extension provides an interactive, hands-on learning experience for
77
</div>
88

99

10-
11-
1210
## ✨ What You'll Learn
1311

1412
- **Pipeline Fundamentals** - Create your first ZenML pipeline
@@ -37,7 +35,42 @@ The fastest way to get started - no local setup required.
3735
2. Wait ~2 min for setup (container, dependencies, extension)
3836
3. The extension will launch automatically
3937

40-
### 💻 Alternative: Local Setup
38+
### Local Setup with Extension from Marketplace
39+
40+
**Prerequisites:**
41+
- Python 3.8 or higher
42+
- VS Code
43+
44+
**Steps:**
45+
46+
1. **Set up Python virtual environment:**
47+
```bash
48+
python -m venv zenml-tutorial-env
49+
source zenml-tutorial-env/bin/activate # On Windows: zenml-tutorial-env\Scripts\activate
50+
```
51+
52+
2. **Install ZenML:**
53+
```bash
54+
pip install zenml
55+
```
56+
57+
4. **Initialize ZenML:**
58+
```bash
59+
zenml init
60+
```
61+
62+
5. **Start the ZenML server locally:**
63+
```bash
64+
zenml login --local
65+
```
66+
67+
6. **Install the extension:**
68+
- Install from the [Marketplace](https://marketplace.visualstudio.com/items?itemName=zenml-io.zenml-tutorial) or search for "ZenML Tutorial" in the Extensions Marketplace
69+
70+
7. **Launch the tutorial:**
71+
- Open VS Code and the extension will launch automatically
72+
73+
### 💻 Alternative: Local Setup with Dev Containers
4174

4275
**Requirements:**
4376

@@ -73,6 +106,72 @@ The fastest way to get started - no local setup required.
73106
- **Inspect** output in the terminal and Dashboard link
74107
- **Experiment** by editing any example code
75108

109+
## ⚙️ Extension Configuration
110+
111+
### Auto-Open Tutorial
112+
113+
The tutorial homepage opens automatically when you start VS Code in the following scenarios:
114+
- **On first install** (always opens the first time you install the extension)
115+
- **In GitHub Codespaces** (when `CODESPACES=true`)
116+
- **When tutorial is enabled** (when `ZENML_ENABLE_TUTORIAL=true`)
117+
- **When user setting is enabled** (see configuration options below)
118+
119+
You can control the user preference behavior:
120+
121+
#### 🔧 Quick Disable
122+
When the welcome message appears, click **"Don't Show Again"** to disable auto-opening.
123+
124+
#### 🔧 Settings UI
125+
1. Open VS Code Settings (`Ctrl+,` or `Cmd+,`)
126+
2. Search for "zenml"
127+
3. Toggle **"Auto Open Tutorial"** on/off
128+
129+
#### 🔧 Settings JSON
130+
Add to your VS Code settings to enable auto-open (disabled by default):
131+
```json
132+
{
133+
"zenml.autoOpenTutorial": true
134+
}
135+
```
136+
137+
**Note**: You can always access the tutorial manually via the ZenML sidebar (book icon) or Command Palette (`Ctrl+Shift+P` → "ZenML: Open ZenML Tutorial Homepage").
138+
139+
#### 📖 Manual Tutorial Access
140+
141+
If the tutorial doesn't open automatically, you can easily access it manually:
142+
143+
**Method 1: Using the ZenML Tutorial Sidebar**
144+
1. Look for the ZenML Tutorial icon (📖) in the Activity Bar (left side of VS Code)
145+
2. Click on it to open the tutorial panel
146+
3. Click "Open Homepage" to start the tutorial
147+
148+
![Tutorial Sidebar](assets/tutorial-sidebar.png)
149+
150+
**Method 2: Using the Main Sidebar**
151+
1. Open the main VS Code sidebar (Explorer view)
152+
2. Scroll down to find "ZenML Tutorial" in the extensions list
153+
3. Click on it to access the tutorial
154+
155+
![Main Sidebar](assets/main-sidebar.png)
156+
157+
**Method 3: Using Command Palette**
158+
1. Press `Ctrl+Shift+P` (or `Cmd+Shift+P` on Mac)
159+
2. Type "ZenML: Open ZenML Tutorial Homepage"
160+
3. Press Enter
161+
162+
Once opened, you'll see the welcome screen:
163+
164+
![Tutorial Welcome Screen](assets/tutorial-welcome.png)
165+
166+
### Dashboard URL
167+
168+
Configure the ZenML dashboard URL for pipeline run links:
169+
```json
170+
{
171+
"zenml.dashboardUrl": "http://localhost:8237"
172+
}
173+
```
174+
76175
## 🛟 Getting Help
77176

78177
- **📖 ZenML Docs**: [docs.zenml.io](https://docs.zenml.io)

0 commit comments

Comments
 (0)