Skip to content

Feat: add config option to show Projects/Services outside a compose directory (#800) - #827

Open
ayoub3bidi wants to merge 1 commit into
jesseduffield:masterfrom
ayoub3bidi:feat/force-project-view
Open

Feat: add config option to show Projects/Services outside a compose directory (#800)#827
ayoub3bidi wants to merge 1 commit into
jesseduffield:masterfrom
ayoub3bidi:feat/force-project-view

Conversation

@ayoub3bidi

Copy link
Copy Markdown

Summary

Since v0.25.2, Projects and Services panels are hidden when lazydocker is not launched from a docker-compose directory (unless -p is passed). That broke workflows that start lazydocker from anywhere (for example from a status bar) and still want to browse all running compose projects.

This PR adds an opt-in gui.forceProjectView config flag so those panels can be shown again without changing the default behavior.

Fixes #800

What was done

  • Added gui.forceProjectView (ForceProjectView) to user config, default false
  • Extended IsProjectScoped() so forceProjectView: true shows Projects/Services and enables project filtering when outside a compose directory
  • Documented the option in docs/Config.md
  • Extended TestIsProjectScoped coverage for the new flag

Technical Details

Panel visibility already keys off IsProjectScoped() (not the raw InDockerComposeProject flag alone). This change extends that predicate instead of forcing InDockerComposeProject = true when no local compose file exists.

Keeping InDockerComposeProject truthful avoids:

  • Failed docker compose config --services calls on every refresh outside a compose directory
  • Incorrectly treating the cwd basename as LocalProjectName

With forceProjectView enabled, projects and services are discovered from running container compose labels (the same path already used for multi-project discovery).

Notes

  • Default remains false; no behavior change for existing users
  • Stopped services for projects without a local compose file are still not listed (same as label-based discovery today)
  • JSON SchemaStore schema is external to this repo and was not updated

@ayoub3bidi
ayoub3bidi force-pushed the feat/force-project-view branch from 9b90491 to 8e7c7ea Compare August 3, 2026 16:15
@ayoub3bidi ayoub3bidi changed the title Fix: add config option to show Projects/Services outside a compose directory (#800) Feat: add config option to show Projects/Services outside a compose directory (#800) Aug 3, 2026
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.

Add config option to show Projects/Services panels outside of a docker-compose directory

1 participant