Skip to content

feat(onboarding): enhance integration setup with Docker discovery and URL templating#5607

Open
ajnart wants to merge 59 commits into
devfrom
feat/add-integration-from-dashboard
Open

feat(onboarding): enhance integration setup with Docker discovery and URL templating#5607
ajnart wants to merge 59 commits into
devfrom
feat/add-integration-from-dashboard

Conversation

@ajnart
Copy link
Copy Markdown
Member

@ajnart ajnart commented May 1, 2026


Homarr

Thank you for your contribution. Please ensure that your pull request meets the following pull request:

  • Builds without warnings or errors (pnpm build, autofix with pnpm format:fix)
  • Pull request targets dev branch
  • Commits follow the conventional commits guideline
  • No shorthand variable names are used (eg. x, y, i or any abbrevation)
  • Documentation is up to date. Create a pull request here.

Summary

  • Docker service discovery during onboarding: auto-detect running containers, match them to integration kinds, and pre-select/pre-fill the integration list
  • URL templating with base host and subdomain/port modes so users can quickly fill URLs for all integrations at once (e.g. {app}.website.com or 192.168.1.1:{port})
  • API key helper links for supported integrations (Sonarr, Radarr, SABnzbd, Seerr, etc.) that open the relevant settings page
  • Docker app creation: option to auto-create bookmark apps for all discovered containers
  • Curated onboarding list: hide niche/registry integrations (GitHub, npm, Docker Hub, GitLab, Codeberg, LinuxServer.io, GHCR, Quay, Search.ch) from the selection grid
  • Duplicate widget prevention: clear existing board items before placing onboarding widgets
  • Removed timetable widget from default seed dashboards

Test plan

  • Run onboarding flow with Docker available — verify containers are discovered and pre-selected
  • Run onboarding flow without Docker — verify graceful degradation, no errors
  • Set a base URL template and verify integration URLs are correctly generated
  • Verify API key helper links appear and point to correct paths for supported integrations
  • Toggle "Add apps to dashboard" and verify Docker apps are created/skipped accordingly
  • Confirm hidden integrations do not appear in the onboarding grid but still appear on the manage integrations page
  • Verify no duplicate widgets are created after completing onboarding

ajnart added 6 commits May 1, 2026 09:58
Add static mapping of widget kinds to integration kinds for server-side
use without importing @homarr/widgets. Includes default widget configs
(size, options, skip), featured integrations list for grid sorting,
and default bookmark apps for onboarding dashboard population.
Create a default "dashboard" board during seeding with a section and
layout. Set it as the home board for the everyone group. Seed default
bookmark apps (Homarr Docs, GitHub, Help Translate) for the bookmarks
widget.
Add "integrations" step to onboarding flow between settings and finish.
Add setupIntegrations mutation that reads existing integrations from DB,
populates the dashboard with matching widgets (respecting config-driven
sizes/options/skip), places app widgets for each app, and creates a
bookmarks widget with seeded default apps.
Create IntegrationSelectGrid (single-select) and
IntegrationMultiSelectGrid (multi-select) components with search,
category badges, widget count tooltips, and featured integration
sorting. Use SimpleGrid to prevent horizontal overflow. Add stepper
modal for creating integrations from the dashboard.
Add 3-phase integration setup to onboarding: multi-select grid,
per-integration configuration with NewIntegrationForm stepper, and
finishing phase that populates the dashboard and shows final actions.
Merge finish step actions into the integrations step. Add translation
keys for configure phase.
…tion

Refactor integration creation page to show a grid picker before the
form. Add "Add integration" action to dashboard header menu. Convert
app select modal to a two-step stepper. Standardize modal widths to
1200 for item, integration, and app select modals.
@ajnart ajnart requested a review from a team as a code owner May 1, 2026 07:59
@homarr-labs homarr-labs deleted a comment from deepsource-io Bot May 1, 2026
- Fix TypeScript error: InitIntegrations returning null by transitioning
  to done phase instead
- Fix TypeScript error: Object.fromEntries cast in integration grids by
  typing the array elements
- Update E2E onboarding tests to process the new integrations step
  (skip for now) and increase finish assertion timeout for async mutation
@homarr-labs homarr-labs deleted a comment from deepsource-io Bot May 1, 2026
fix(lint): remove empty fragment and redundant undefined argument

chore: format
@ajnart ajnart force-pushed the feat/add-integration-from-dashboard branch from 3197f9e to 62d5716 Compare May 1, 2026 08:24
@deepsource-io
Copy link
Copy Markdown
Contributor

deepsource-io Bot commented May 1, 2026

DeepSource Code Review

We reviewed changes in b9c701a...5a0ba98 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
JavaScript May 4, 2026 10:41a.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@ajnart ajnart added needs-demo This PR needs a demo deployment labels May 1, 2026
@dokploy-demos-homarr
Copy link
Copy Markdown

Dokploy Preview Deployment

Name Status Preview Updated (UTC)
homarr 🔄 Building Preview URL 2026-05-01T08:56:34.335Z

@dokploy-demos-homarr
Copy link
Copy Markdown

dokploy-demos-homarr Bot commented May 1, 2026

Dokploy Preview Deployment

Name Status Preview Updated (UTC)
homarr 🔄 Building Preview URL 2026-05-01T09:12:22.370Z

@ajnart ajnart added needs-demo This PR needs a demo deployment and removed needs-demo This PR needs a demo deployment labels May 1, 2026
@dokploy-demos-homarr
Copy link
Copy Markdown

dokploy-demos-homarr Bot commented May 1, 2026

Dokploy Preview Deployment

Name Status Preview Updated (UTC)
homarr 🔄 Building Preview URL 2026-05-01T13:59:31.371Z

@ajnart ajnart added needs-demo This PR needs a demo deployment and removed needs-demo This PR needs a demo deployment labels May 3, 2026
@dokploy-homarr-labs
Copy link
Copy Markdown

dokploy-homarr-labs Bot commented May 3, 2026

Dokploy Preview Deployment

Name Status Preview Updated (UTC)
homarr 🔄 Building Preview URL 2026-05-04T10:07:26.130Z

@ajnart ajnart added needs-demo This PR needs a demo deployment and removed needs-demo This PR needs a demo deployment labels May 4, 2026
@dokploy-homarr-labs
Copy link
Copy Markdown

dokploy-homarr-labs Bot commented May 4, 2026

Dokploy Preview Deployment

Name Status Preview Updated (UTC)
homarr ✅ Done Preview URL 2026-05-29T12:59:01.699Z

This comment was marked as outdated.

Comment thread packages/definitions/src/integration-url-template.ts Fixed
Comment thread packages/definitions/src/integration.ts Fixed
ajnart and others added 24 commits May 27, 2026 15:53
- Show error notification on setup failure instead of silent reset
- Fix toggleKind stale closure by using prop array directly
- Remove duplicate translations from en-gb.json (falls back to en.json)
- Align seed board columnCount to 12 (codebase default)
- Extract shared placeAllWidgetsAsync helper to @homarr/db/queries
- Remove redundant onboardingFormSchema; reuse formSchema for both paths
- Fix lint errors (optional chain, unused imports, unnecessary conditions)
- Filter out integrations with no widgets from onboarding selection
- Replace single checkbox app toggle with a compact selectable grid
- Each Docker-discovered app is individually toggleable (all on by default)
- Track selected apps by container ID instead of a boolean flag
CodeQL flagged `/\/+$/` as polynomial-time on repeated slashes.
Use `while (endsWith("/"))` loop instead.
Containers that don't match a known integration were only added as apps
if they had a matching icon in the DB. Remove the iconUrl requirement
so all non-integration containers appear as selectable apps.
During fresh onboarding the icons DB table hasn't been populated by the
cron job yet. Fall back to a dashboard-icons CDN URL guess based on
the container image name so apps still get icons for popular services.
…th matched icons

- Change listContainers to all:false so only running containers are discovered
- Replace loose bestMatch with strictIconMatch (exact or startsWith) to avoid
  false positives from short image names matching unrelated icons
- Gate discovered apps behind DB icon match; unmatched containers are hidden
- Add CDN icon URL fallback for matched integrations display
…tion

- Show animated "Scanning Docker..." indicator with dots loader while
  the discovery query is pending
- Add isLoading prop to DockerDiscoveryIndicator
- Fix button hydration mismatch with suppressHydrationWarning
- Add scanning/scanningDescription translation keys
Apply miw="min(1400px, 90vw)" to app select and integration select
modals so they never shrink when filtering reduces visible items.
Integrate dev's centralized Mantine theme in @homarr/ui and reconcile modal grid work.
Replace per-step hardcoded Card widths (384px, 776px, 1024px) with a
consistent 1024px shell defined in _constants.ts. All steps now use an
InitStepCard wrapper set to w=100%, inheriting width from the page shell.

Also updates old-import cards to w=100% for proper width propagation.
- Replace plain Base URL input with a prominent Alert callout so users
  don't overlook it
- Add disableScroll prop to SelectGridLayout and use it in onboarding
  so integrations expand the page instead of scrolling
- Fix Collapse `in` → `expanded` prop for Mantine v9 migration in both
  the URL helpers panel and the Docker discovery panel
Points to /#/settings/webui so the integration form can link directly
to the qBittorrent API key settings page.
Subdomain-based URLs (e.g. sonarr.example.com) are typically served
behind a reverse proxy with TLS. Update the template to generate
https:// URLs. Host:port mode remains http:// for local access.
Discovered Docker apps now use the same buildAppUrl logic as
integrations when a base host is set, instead of using the raw
Docker socket URL (e.g. http://container:5432).

Extracts shared buildUrl helper and adds buildAppUrl that derives
a slug from the container name. Also passes publishedPort through
the DiscoveredApp type so host:port mode works correctly.
Comment thread packages/definitions/src/integration-url-template.ts Fixed
Comment thread packages/definitions/src/integration-url-template.ts Fixed
Comment thread packages/modals-collection/src/apps/quick-add-app/quick-add-app-modal.tsx Outdated
Replace polynomial trailing-slash regex with removeTrailingSlash helper
and remove unused ModalFormFooter import in quick-add-app modal.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-demo This PR needs a demo deployment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants