Skip to content

#1808: do not report a workspace when icd navigates to the project root#2125

Open
maybeec wants to merge 2 commits into
devonfw:mainfrom
maybeec:bugfix/1808-icd-project-root-message
Open

#1808: do not report a workspace when icd navigates to the project root#2125
maybeec wants to merge 2 commits into
devonfw:mainfrom
maybeec:bugfix/1808-icd-project-root-message

Conversation

@maybeec

@maybeec maybeec commented Jul 7, 2026

Copy link
Copy Markdown
Member

This PR fixes #1808

Implemented changes:

  • The icd command (and the shared ide shell integration it reuses) no longer claims you are in workspace main when you actually navigate to the project root.
  • The workspace is now only reported when the current directory is really inside a workspaces/<name> folder:
    • icd -p «project»IDE environment variables have been set for «home» (no workspace mentioned)
    • icd -p «project» -w [«name»]... in workspace «name» (unchanged)
    • bare icd inside a project → jumps to the project root → ... for «home» (no workspace)
    • bare icd with no project → only navigates to the projects root (IDE_ROOT), no environment setup and no message (unchanged)
  • Applied the same logic to the Windows ide.bat wrapper for cross-platform consistency.
  • Updated the affected documentation examples (cli.adoc, features.adoc) and added a CHANGELOG.adoc entry.

This is a message-only change; the navigation semantics of -p / -w (as designed and discussed in the issue) are unchanged.


Testing instructions

  1. Run the shell-integration tests: bash cli/src/test/functions-test.sh — all tests pass (includes new icd message tests covering project-root vs. workspace).
  2. Manually: in an IDEasy installation with a single project, run icd -p «project». The output must read IDE environment variables have been set for «...»/«project» without in workspace main.
  3. Then run icd -p «project» -w and confirm it still reports ... in workspace main (you are now inside the workspace).
  4. From a deeply nested folder inside a workspace, run bare icd and confirm it jumps to the project root and reports ... for «home» without a workspace.

Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summarizes what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labeled with internal
  • You have formulated clear instructions on how to test your contribution under "Testing instructions"

@github-project-automation github-project-automation Bot moved this to 🆕 New in IDEasy board Jul 7, 2026
@maybeec maybeec added usability usage should be more intuitive icd Changes related to our icd command. labels Jul 7, 2026
@maybeec maybeec moved this from 🆕 New to Team Review in IDEasy board Jul 7, 2026
@maybeec maybeec requested a review from hohwille July 7, 2026 07:49
@coveralls

coveralls commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 28850392142

Coverage increased (+0.02%) to 72.087%

Details

  • Coverage increased (+0.02%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 16558
Covered Lines: 12435
Line Coverage: 75.1%
Relevant Branches: 7434
Covered Branches: 4860
Branch Coverage: 65.38%
Branches in Coverage %: Yes
Coverage Strength: 3.18 hits per line

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

icd Changes related to our icd command. usability usage should be more intuitive

Projects

Status: Team Review

Development

Successfully merging this pull request may close these issues.

icd is not navigating into single available workspace on icd -p project

2 participants