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

Return issue URL and base64 ID in hub issue create response

0 Anchors
Blast radius
Churn 30d
0 Proposals

Return Mist URL and Base64 Issue ID in hub issue create Response

Current Behavior

muse hub issue create returns the issueId as a full sha256:<hex> string in --json output:

{
  "issueId": "sha256:9902b5e3cee06134bb119359cfccc01e402e342863254cc56b25149e294f1d7f",
  "number": 78,
  ...
}

The --json response does not include a URL to the created issue. The human-readable (non---json) output is unclear on whether it surfaces a URL either — but a URL is the single most useful thing a user needs after creating an issue.

Expected Behavior

The success response (both --json and human-readable) should include:

  1. url — the fully-qualified URL to the issue on the hub, e.g.:

    https://staging.musehub.ai/gabriel/muse/issues/78
    
  2. issue_id_b64 — the base64url-encoded issue ID, e.g.:

    mQLW4874...
    

    The raw sha256:<hex> form is unwieldy to copy-paste into API calls, browser address bars, or agent prompts. Base64url is ~44 chars vs. 71 for hex.

--json shape

{
  "issueId": "sha256:9902b5e3...",
  "issue_id_b64": "mQLW4874...",
  "url": "https://staging.musehub.ai/gabriel/muse/issues/78",
  "number": 78,
  ...
}

Human-readable output

✔ Issue #78 created
  https://staging.musehub.ai/gabriel/muse/issues/78

The URL should be the last line printed so it is trivially pipe-able or click-able from a terminal.

Scope

  • muse hub issue create (primary)
  • Audit: muse hub proposal create, muse hub repo create, and any other hub … create commands that return object IDs — apply the same pattern consistently

Acceptance Criteria

  • --json output includes url pointing to the created issue on the hub
  • --json output includes issue_id_b64 (base64url, no padding)
  • Human-readable output prints the URL on the last line
  • Existing issueId (sha256:<hex>) field is preserved — no breaking change
  • Same treatment applied to hub proposal create and hub repo create
Activity1
gabriel opened this issue 4 days ago
gabriel 3 days ago

Implemented and deployed to staging.

Changes made:

  • musehub/services/musehub_issues.py: create_issue now accepts url_prefix and passes it to _to_issue_response, populating IssueResponse.url
  • musehub/api/routes/musehub/issues.py: create_issue route computes url_prefix and passes it to the service
  • musehub/services/musehub_proposals.py: same pattern for create_proposal
  • musehub/api/routes/musehub/proposals.py: same pattern — added request: Request, computes url_prefix
  • muse/cli/commands/hub/issues.py: --json output now includes url and issueIdB64 (base64url, no padding)
  • muse/cli/commands/hub/proposals.py: --json output now includes url and proposalIdB64
  • muse/cli/commands/hub/repos.py: --json output now includes url and repoIdB64

Verified on staging: muse hub issue create --json returns both fields correctly.

closed this issue 3 days ago