Skip to content

Add install page for ESPHome Device Builder#6669

Open
jesserockz wants to merge 2 commits into
currentfrom
jesserockz-2026-242
Open

Add install page for ESPHome Device Builder#6669
jesserockz wants to merge 2 commits into
currentfrom
jesserockz-2026-242

Conversation

@jesserockz
Copy link
Copy Markdown
Member

Description

Adds a new /install page that walks users through installing the ESPHome Device Builder, with native Starlight chrome (header, sidebar, footer) and theming. The interactive InstallSelector component fetches data from a hard-coded version constant — bump it manually when a significant esphome-desktop release ships.

The page has four OS tabs (Home Assistant, Windows, macOS, Linux). OS detection auto-selects the matching tab on load via navigator.userAgentData + UA fallback. Within each tab:

  • Home Assistant — flavor selector for OS (My-link badge + manual steps via Settings → Apps → Install App) and Container (a docker run command lifted from the command-line guide).
  • Windows — single installer download.
  • macOS — Apple Silicon / Intel selector; auto-picks Intel when UA-CH reports x86.
  • Linux — format selector (Debian/Ubuntu, Fedora/openSUSE, Arch AUR, AppImage) and architecture selector (x86_64 / arm64); the arch selector hides when AUR is selected. The serial-port group hint swaps dialoutuucp when Arch is selected.

Download buttons use Starlight's native <LinkButton> so they pick up theme colors automatically. The only custom CSS left is the segmented-control styling (Starlight doesn't ship one) and minor layout helpers.

Related issue (if applicable): fixes

Pull request in esphome with YAML changes (if applicable):

  • esphome/esphome#

Checklist

  • I am merging into next because this is new documentation that has a matching pull-request in esphome as linked above.
    or

  • I am merging into current because this is a fix, change and/or adjustment in the current documentation and is not for a new component or feature.

  • Link added in /src/content/docs/components/index.mdx when creating new documents for new components or cookbook.

New /install page covering installation as a Home Assistant app or as a
native desktop app on macOS, Windows, and Linux. OS detection auto-selects
the matching tab; Linux supports x86_64 and arm64 across deb, rpm,
AUR, and AppImage.
Copilot AI review requested due to automatic review settings May 23, 2026 05:10
@esphome esphome Bot added the current label May 23, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented May 23, 2026

Deploy Preview for esphome ready!

Name Link
🔨 Latest commit 9a5b6af
🔍 Latest deploy log https://app.netlify.com/projects/esphome/deploys/6a1171978b30aa000854c53f
😎 Deploy Preview https://deploy-preview-6669--esphome.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new Starlight-styled /install documentation page for installing ESPHome Device Builder across Home Assistant and desktop OSes, backed by a new interactive InstallSelector component.

Changes:

  • Added src/content/docs/install.mdx with a new install landing page that embeds an interactive selector.
  • Added src/components/InstallSelector.astro implementing OS tabs, per-OS install instructions, and basic UA-based auto-selection.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
src/content/docs/install.mdx New install landing page content and entry point for the selector UI.
src/components/InstallSelector.astro New interactive tabbed selector with OS detection and platform-specific download/install instructions.

Comment thread src/components/InstallSelector.astro
Comment thread src/components/InstallSelector.astro
Comment thread src/content/docs/install.mdx Outdated
Comment thread src/content/docs/install.mdx
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 23, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 46305dea-7d86-434f-8313-be47fd75d6cd

📥 Commits

Reviewing files that changed from the base of the PR and between 888c85e and 9a5b6af.

📒 Files selected for processing (2)
  • src/components/InstallSelector.astro
  • src/content/docs/install.mdx
✅ Files skipped from review due to trivial changes (1)
  • src/content/docs/install.mdx

Walkthrough

Adds an InstallSelector Astro component with OS- and architecture-aware download links, segmented controls, and client-side logic, plus a new install documentation page embedding the component and describing first-launch desktop behavior.

Changes

Installation Component & Documentation

Layer / File(s) Summary
Component structure and markup
src/components/InstallSelector.astro
Release metadata and full InstallSelector markup: Starlight tabs for Home Assistant, Windows, macOS, and Linux; HA flavor, macOS arch, and Linux format/arch segmented controls; per-platform CTAs and step-by-step instructions.
Styling and client-side interactivity
src/components/InstallSelector.astro
Component-scoped CSS for segmented controls and layout; JS to detect OS and choose Starlight tab, manage aria-pressed segmented state, update macOS DMG and Linux download URLs on selections, and optionally use UA-CH to refine macOS arch.
Installation documentation
src/content/docs/install.mdx
New MDX page "Install ESPHome Device Builder" embedding InstallSelector, describing bundled Python desktop behavior, first-launch actions (background setup, opens dashboard, system tray), and "See also" reference links.

Sequence Diagram

sequenceDiagram
  participant User
  participant StarlightTabs as starlight-tabs
  participant InstallSelector
  participant UA_CH as navigator.userAgentData
  participant GitHub as GitHubReleases

  User->>InstallSelector: interact (select platform/arch/format)
  Note right of InstallSelector: updates aria-pressed, shows/hides panels
  InstallSelector->>GitHub: set DownloadButton href (derived from releases base + tag)
  StarlightTabs-->>InstallSelector: component defined/upgrade event
  InstallSelector->>StarlightTabs: auto-select appropriate tab
  InstallSelector->>UA_CH: getHighEntropyValues(["architecture"]) (optional)
  UA_CH-->>InstallSelector: architecture hint (optional)
  InstallSelector->>GitHub: update DMG/Linux URL if arch/format changed
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

current

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add install page for ESPHome Device Builder' clearly and concisely describes the main change: adding a new documentation page for installation instructions.
Description check ✅ Passed The description is comprehensive and directly related to the changeset, detailing the new /install page structure, OS-specific installation steps, component functionality, and implementation details.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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 jesserockz-2026-242

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


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.

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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/components/InstallSelector.astro`:
- Around line 402-407: The UA-CH call can be undefined and calling .then/.catch
on it throws; guard the chain by first obtaining the potential promise via
navigator.userAgentData?.getHighEntropyValues?.(["architecture"]) and only
attach .then/.catch if that value is a Promise (e.g., check p && typeof p.then
=== "function"). In other words, in the inline script replace the direct
navigator.userAgentData?.getHighEntropyValues(...).then(...) with a guarded flow
that assigns the result to a variable (p) and conditionally calls p.then(info =>
{ if (info.architecture === "x86") selectArch("x64"); }).catch(...) so browsers
without navigator.userAgentData or getHighEntropyValues don't throw and the rest
of the script still runs.
🪄 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: 0ead0acd-e66d-4e86-b0fc-f622dcccdfd7

📥 Commits

Reviewing files that changed from the base of the PR and between 87bab78 and 888c85e.

📒 Files selected for processing (2)
  • src/components/InstallSelector.astro
  • src/content/docs/install.mdx

Comment thread src/components/InstallSelector.astro
- detectOs() now returns null for iOS and desktop-mode iPad UAs so mobile
  Safari no longer auto-selects the macOS download.
- HA Container instructions now point at http://localhost:6052 and note
  the -p 6052:6052 alternative for Docker Desktop.
- Scope the "First Launch" section to desktop installs and direct HA
  users to the Open Web UI button.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants