gabriel / musehub public
Closed #80
filed by gabriel human · 4 days ago

Return mist URL in mist list and read responses

0 Anchors
Blast radius
Churn 30d
0 Proposals

Return Mist URL in muse mist list Response

Relates to #79 — consistent URL surfacing across all hub … create and list commands.

Current Behavior

muse mist list returns a mistId as a short base64 ID (e.g. 84xbJipoEqjU) but does not include a URL to the mist detail page:

{
  "mistId": "84xbJipoEqjU",
  "owner": "gabriel",
  "filename": "recreate-muse-repo-steps.md",
  "title": "Steps for deleting and recreating the local muse repo",
  ...
}

To navigate to a mist, a user or agent must manually construct the URL from owner + mistId. That is implicit knowledge — it shouldn't be.

Expected Behavior

Every entry in the muse mist list response includes a url field pointing to the mist detail page:

{
  "mistId": "84xbJipoEqjU",
  "owner": "gabriel",
  "url": "https://staging.musehub.ai/gabriel/mists/84xbJipoEqjU",
  "filename": "recreate-muse-repo-steps.md",
  "title": "Steps for deleting and recreating the local muse repo",
  ...
}

The hub base URL is already known server-side at response time — there is no reason to push URL construction onto callers.

Scope

  • muse mist list (primary)
  • muse mist read / single-mist fetch — same url field in the response
  • Audit all other list/read commands that return object IDs without a URL (hub issue list, hub proposal list, hub repo list) and apply consistently

Acceptance Criteria

  • Every object in muse mist list --json includes a url field
  • muse mist read <id> --json includes a url field
  • The URL is correct for both localhost and staging/prod (uses the hub base URL the request arrived on, not a hardcoded value)
  • Existing mistId field is preserved — no breaking change
  • hub issue list and hub proposal list entries include a url field (follow-on, same PR or separate)
Activity1
gabriel opened this issue 4 days ago
gabriel 3 days ago

Fixed in commit sha256:3707eba7ad42cadedf18c8b9c534d839b88cfd1c30924c3c5a3edc74e1d809de (merged to dev, deployed to staging).

All acceptance criteria met:

  • muse mist list --json — every MistListEntry now includes url (e.g. https://staging.musehub.ai/gabriel/mists/84xbJipoEqjU)
  • muse mist read <id> --jsonMistResponse already had url; confirmed populated on staging
  • URL uses the hub base URL from the request — correct across localhost, staging, and prod
  • Existing mistId field preserved — no breaking change
  • hub issue list entries include url ({base_url}/{owner}/{slug}/issues/{number})
  • hub proposal list entries include url ({base_url}/{owner}/{slug}/proposals/{proposal_id})

Files changed: models/mists.py, models/musehub.py, services/musehub_mists.py, services/musehub_issues.py, services/musehub_proposals.py, api/routes/musehub/mists.py, api/routes/musehub/issues.py, api/routes/musehub/proposals.py

closed this issue 3 days ago