Skip to content

WeChat bridge defaults to installation directory instead of most recent project #213

@yqmaphy

Description

@yqmaphy

Problem

When the WeChat bridge starts without an explicit AETHER_WORK_DIR environment variable, it falls back to Path.cwd() as the default directory. Since the bridge runs as a child process of the Aether app, Path.cwd() resolves to the Aether installation directory (e.g. C:\Users\<user>\AppData\Local\Programs\Aether\aether-windows-x64-web), which is never a valid project directory.

This causes every new WeChat conversation to connect to a meaningless directory by default, instead of the user's most recently active project.

Expected Behavior

When no explicit directory is provided, the WeChat bridge should query /project/recent and select the most recently active project as the default directory. If no projects exist, it should fall back to the user's home directory.

Additional Cleanup

The _is_root_dir method and its usage in _get_projects were redundant because the /project/recent SQL already excludes root directories (directory != '/') and only returns entries with at least one session. These have been removed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions