Skip to content

Dashboard Config Editor can't discover project configs on OpenCode Desktop #248

Description

@TreedsSlop

Short description

The Config Editor's "Project Configs" tab shows "No project-level configs found" on OpenCode Desktop, even when valid project configs exist at .cortexkit/magic-context.jsonc.

What happened?

Describe the bug

The Config Editor's "Project Configs" tab shows "No project-level configs found" on OpenCode Desktop, even when valid project configs exist at .cortexkit/magic-context.jsonc.

The "Projects" tab correctly discovers the same projects (using get_projects from the Magic Context DB), but the Config Editor uses get_project_configs()discover_project_configs() which is hardcoded to query the OpenCode CLI's SQLite database at $LOCALAPPDATA/opencode/opencode.db. OpenCode Desktop doesn't create this database, so the project list is always empty.

To Reproduce

  1. Install OpenCode Desktop (not CLI)
  2. Create .cortexkit/magic-context.jsonc in a project
  3. Open Magic Context Dashboard → Configuration
  4. Click "Project Configs" tab → shows "No project-level configs found"
  5. Navigate to the "Projects" section → project is listed correctly

Expected behavior

Project configs should appear in the Config Editor's "Project Configs" tab regardless of whether the OpenCode CLI DB exists.

Suggested fix

discover_project_configs() in packages/dashboard/src-tauri/src/config.rs should fall back to reading the project list from the Magic Context DB (similar to how the "Projects" tab does it) when the OpenCode CLI DB is absent or empty. The Magic Context DB already tracks projects — the function just needs a second query path against context.db when opencode.db isn't available.

Diagnostics

Plugin version

0.33.0

OpenCode version

v1.17.14

Platform

Windows x64

Client

OpenCode Desktop

Log output (optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions