Skip to content

fix: use CONTAINER_HOST for Podman - #1233

Merged
GT-610 merged 4 commits into
mainfrom
fix/podman-container-host-1232
Jul 16, 2026
Merged

fix: use CONTAINER_HOST for Podman#1233
GT-610 merged 4 commits into
mainfrom
fix/podman-container-host-1232

Conversation

@GT-610

@GT-610 GT-610 commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • use CONTAINER_HOST when executing Podman commands
  • keep DOCKER_HOST for Docker commands
  • update the container settings label and socket hint for the selected runtime

Validation

  • flutter analyze lib/data/provider/container.dart lib/view/page/container/container.dart lib/view/page/container/actions.dart
  • flutter test test/container_test.dart

Related to #1232.

Summary by CodeRabbit

  • New Features
    • Added Podman-aware host configuration, showing and editing CONTAINER_HOST for Podman and DOCKER_HOST for Docker.
    • Updated the container host editor dialog and settings tiles to follow the selected container runtime.
  • Bug Fixes
    • Fixed container host values to be saved and retrieved per runtime, preventing cross-runtime mix-ups.
    • Improved server Docker-container ID migration to preserve the correct Docker host settings.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: f6b13630-8c0f-452c-9710-bf44d062b383

📥 Commits

Reviewing files that changed from the base of the PR and between a2e9e00 and c029740.

📒 Files selected for processing (1)
  • lib/data/store/container.dart
🚧 Files skipped from review as they are similar to previous changes (1)
  • lib/data/store/container.dart

📝 Walkthrough

Walkthrough

Container host values are stored and retrieved per runtime, with Docker fallback support for legacy entries. Command wrapping exports CONTAINER_HOST for Podman and DOCKER_HOST otherwise. Host editing labels, socket hints, persistence calls, and settings identifiers now follow the selected runtime. Formatting-only changes preserve existing behavior.

Possibly related PRs

Suggested reviewers: lollipopkit

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main behavioral change: using CONTAINER_HOST for Podman instead of Docker-specific handling.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/podman-container-host-1232

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

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 2

🧹 Nitpick comments (1)
lib/view/page/container/container.dart (1)

396-399: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Rename the Docker-specific host identifiers.

The setting now supports both runtimes, but _SettingsMenuItems.editDockerHost and _onSaveDockerHost in lib/view/page/container/actions.dart, Line [140], still encode Docker-only semantics. Rename them to runtime-neutral names such as editContainerHost and _onSaveContainerHost.

🤖 Prompt for 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.

In `@lib/view/page/container/container.dart` around lines 396 - 399, Rename the
Docker-specific symbols _SettingsMenuItems.editDockerHost and _onSaveDockerHost
in the container settings flow to runtime-neutral names such as
editContainerHost and _onSaveContainerHost, and update all references and
callbacks accordingly. Preserve the existing behavior for both Podman and Docker
host settings.
🤖 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 `@lib/data/provider/container.dart`:
- Around line 467-474: Update the host lookup in _wrap to persist and retrieve
the container host separately for each ContainerType, rather than using only
hostId; ensure Docker and Podman cannot reuse each other’s URI while preserving
the corresponding DOCKER_HOST or CONTAINER_HOST environment variable behavior.

In `@lib/view/page/container/actions.dart`:
- Around line 121-133: Update the Podman branch of the hint in the host-edit
dialog around _onSaveDockerHost to use the rootless socket path, such as
$XDG_RUNTIME_DIR/podman/podman.sock or /run/user/<uid>/podman/podman.sock, while
preserving the existing Docker hint.

---

Nitpick comments:
In `@lib/view/page/container/container.dart`:
- Around line 396-399: Rename the Docker-specific symbols
_SettingsMenuItems.editDockerHost and _onSaveDockerHost in the container
settings flow to runtime-neutral names such as editContainerHost and
_onSaveContainerHost, and update all references and callbacks accordingly.
Preserve the existing behavior for both Podman and Docker host settings.
🪄 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: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 1320bbbc-551e-4545-a97f-79f79a01c9b9

📥 Commits

Reviewing files that changed from the base of the PR and between e4ceca4 and 4f6a7f0.

📒 Files selected for processing (3)
  • lib/data/provider/container.dart
  • lib/view/page/container/actions.dart
  • lib/view/page/container/container.dart

Comment thread lib/data/provider/container.dart Outdated
Comment thread lib/view/page/container/actions.dart
@coderabbitai
coderabbitai Bot requested a review from lollipopkit July 16, 2026 03:24

@coderabbitai coderabbitai Bot left a comment

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.

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 `@lib/data/store/server.dart`:
- Around line 63-66: Update the server ID migration flow around dockerHost to
remove the old typed Docker container entry before storing it under newId. Use
the container API’s typed delete operation for ContainerType.docker and oldId,
while preserving the existing fetch and put behavior.
🪄 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: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 7cbec3d9-a1bb-4b09-b0bd-b4405c06c296

📥 Commits

Reviewing files that changed from the base of the PR and between 4f6a7f0 and ac385a2.

📒 Files selected for processing (6)
  • lib/data/provider/container.dart
  • lib/data/store/container.dart
  • lib/data/store/server.dart
  • lib/view/page/container/actions.dart
  • lib/view/page/container/container.dart
  • lib/view/page/container/types.dart
🚧 Files skipped from review as they are similar to previous changes (2)
  • lib/view/page/container/container.dart
  • lib/data/provider/container.dart

Comment thread lib/data/store/server.dart

@coderabbitai coderabbitai Bot left a comment

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.

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 `@lib/data/store/container.dart`:
- Around line 25-27: The typed Docker host removal in ContainerStore.removeHost
must delete both the runtime-scoped key and the legacy id key; update
lib/data/store/container.dart lines 25-27 accordingly. During ID migration,
update the migration flow in lib/data/store/server.dart lines 63-66 to remove
the legacy key before storing the host under newId.
🪄 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: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 1ab33212-9510-4a9e-b149-8c1b77d50231

📥 Commits

Reviewing files that changed from the base of the PR and between ac385a2 and a2e9e00.

📒 Files selected for processing (2)
  • lib/data/store/container.dart
  • lib/data/store/server.dart

Comment thread lib/data/store/container.dart
@GT-610
GT-610 merged commit 071332c into main Jul 16, 2026
4 checks passed
@GT-610
GT-610 deleted the fix/podman-container-host-1232 branch July 16, 2026 03:58
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.

1 participant