Focus previously switched the box from Size to Weight: 2, giving the
panel ~2/7 of the side area regardless of how many rows it had. That
also ignored Gui.ExpandFocusedSidePanel — every other side panel only
expands on focus when accordion mode is on.
Route the project box through the same accordionBox helper as the
others. Stays fitted to content normally; expands on focus only when
the user opted in.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Previously hard-coded to Size: 3 (one visible row) on the assumption
there was only ever one project. With profile pseudo-projects you can
have several rows, but they were hidden until you focused the panel.
Sizes to Len()+2 (rows plus borders), clamped to [3, 8] so the
single-project case is unchanged and a project with many profiles
can't squeeze out the other side panels.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Implements the design captured in docs/adr/0001-docker-compose-profile-support.md
(jesseduffield/lazydocker#423). Profiles render as pseudo-projects in the
project panel; selecting one filters the services and containers panels to
the services that activate with that profile, and Up/Down/Restart on the
selection use docker compose --profile X invocations.
Key choices:
- Profile is a flag on Project (IsProfile bool), not a new type. Avoids a
generic-type split across the SideListPanel and CommandObject.
- Reuse existing command templates (Up, Down, DownWithVolumes, Restart,
AllLogs, DockerComposeConfig). NewCommandObject appends --profile X when
a profile context is set, so no separate UpProfile/DownProfile/... family
is needed. Adds a new Restart template (master had no project-level
restart at all).
- Discovery via 'docker compose config --profiles' and
'docker compose --profile X config --services', cached on DockerCommand
for the session. Soft-fails on error (logs once, caches empty) so the UI
degrades to "no profile rows" rather than popping an error.
- Per-profile service filtering uses the local project and the profile's
service set (default services + profile-X services, per docker semantics).
- No new keybinding for project/profile restart in this PR; handler exists
for follow-up discussion.
- New unit tests cover NewCommandObject --profile injection, GetProfiles
caching, GetProfileServices caching, and the soft-fail path.
fixes: https://github.com/jesseduffield/lazydocker/issues/423
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Addresses Copilot review comments on PR #797:
- Containers panel title, initial focus selection, and the local-project
inclusion in getDiscoveredProjects all switched from
InDockerComposeProject to IsProjectScoped, so they stay consistent
when -p is given outside a compose dir.
- Adds TestIsProjectScoped table test covering all four combinations.
InDockerComposeProject is still used at the call sites that genuinely
require a compose dir (renderDockerComposeConfig, GetServices).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
A la lazygit, we can now navigate between panels using numbers
(1,2,3,4,5,6,7)
Add translation for number navigation
reformat
oops
fix translation case & generate docs
pluralize networks
Turns out that upon switching to a subprocess we were cancelling ALL
periodic tasks, which includes re-rendering the main view ever 30ms.
This completely broke our log rendering and meant that it only updated
when an event occurred
Previously we separately obtained container details every second,
meaning there was a second of not knowing whether a given container was
using a TTY or not, and that meant we were using the wrong streaming
method for logs, which led to a black screen.