Skip to content

[Band-Aid] Integrate jumpToDeepest into open.ts for Simplified Project Access #19

@leebrandt

Description

@leebrandt

Currently, opening project markdown files requires navigating a duplicated directory structure ([project-name]/[projects]/[project-name]). This issue aims to implement a quick fix by integrating the jumpToDeepest function into the open.ts command. This will allow users to simply type grind open [project-name] and have the tool automatically resolve the correct path to the project files.

Acceptance Criteria:

  • The open command correctly resolves the project path using jumpToDeepest.
  • The open command opens the project markdown files as expected.
  • Error handling is implemented to gracefully handle invalid project names or unresolved paths.
  • Unit tests are added to verify the jumpToDeepest function's behavior in this context.

Tasks:

  1. Create src/utils/pathUtils.ts and paste in the provided TypeScript code.
  2. Create/modify src/utils/process.ts and paste in the provided changeDirectory function.
  3. Modify src/commands/open.ts to call jumpToDeepest before opening the files.
  4. Add error handling to src/commands/open.ts to catch errors from jumpToDeepest or changeDirectory.
  5. Write unit tests for jumpToDeepest within src/utils/pathUtils.ts.
  6. Test the open command with various project names.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions