Skip to content

fix(generate): point the 'Not signed in' hint at /profile/api-keys - #1107

Merged
mattmillerai merged 1 commit into
mainfrom
be-25408-api-keys-hint-url
Nov 17, 2026
Merged

mattmillerai merged 1 commit into
mainfrom
be-25408-api-keys-hint-url

Conversation

@mattmillerai

@mattmillerai mattmillerai commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

ELI5

When someone tries to generate without being signed in, the CLI tells them where to get an API key. That link pointed at a web address with no real page behind it. It now goes to the actual API-key page and opens the "create key" dialog right away.

Summary

  • comfy_cli/command/generate/client.py: the Not signed in hint now links https://platform.comfy.org/profile/api-keys?onboarding=router instead of https://platform.comfy.org/api-keys. The platform only has a page at /profile/api-keys. The short path gets a 200 from the SPA but can render a 404 shell. The onboarding=router query opens the create-key dialog.
  • tests/comfy_cli/command/generate/test_client.py: test_resolve_api_key_missing now checks for the new URL. Before this, no test checked the URL at all, only the Not signed in prefix.

A repo-wide grep (grep -rnI 'platform.comfy.org/api-keys' across code, docs, README, specs and tests) found this as the only occurrence. Nothing else needed changing, and the old short-path string no longer appears anywhere.

Testing

  • pytest tests/comfy_cli/command/generate/test_client.py: 16 passed.
  • Mutation check: with the URL change reverted, the new assertion fails (1 failed, 15 passed).
  • ruff check .: clean. ruff format --check .: clean.
  • I could not get a full-suite result locally. A full pytest run was killed at about 10 minutes, and pytest tests/comfy_cli/command/generate was killed at its 400s timeout. Neither produced any failure output (the first run's output was cut off by a tail pipe). CI's run is the full-suite signal for this PR.
  • Doc-drift sweep: 1 reference checked, 0 updated. README.md:494 (export COMFY_API_KEY=...) is still accurate.

Provenance

  • Authored by: agent-work loop
  • Verified:
    • Targeted tests: green (16/16), and the new assertion fails when the fix is reverted
    • Lint/format: clean
    • Full suite: not completed locally (see Testing); relying on CI
  • Deviations: none to the requested change; the full local test run is unconfirmed (see Testing)

Residual

  • I did not check in a browser that /profile/api-keys?onboarding=router opens the create-key dialog with the Router banner. That behaviour comes from the platform frontend, which this repo doesn't contain.
  • The full local pytest run and the tests/comfy_cli/command/generate package run both hit their timeouts on the build host without producing any failure output, so the cause isn't known. The one test file this PR touches passes in about 6s. If CI is also slow or hangs, it's worth looking into separately.

Summary by CodeRabbit

  • Bug Fixes
    • Updated the missing API key message to link to the onboarding API-key page.

@mattmillerai mattmillerai added cursor-review Request Cursor bot review agent-coded PR authored by the agent-work loop labels Nov 4, 2026
@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 3629690 and d8fba42.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The missing-credential error now points to the API-key page with the onboarding=router query. The test checks the error message and URL.

Changes: API Key Guidance

Layer / File(s) Summary
Missing API key guidance and assertion
comfy_cli/command/generate/client.py, tests/comfy_cli/command/generate/test_client.py
The missing-credential error now uses the router onboarding URL. The test checks for “Not signed in” and verifies that URL.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Suggested reviewers: skishore23

Merge Risk: Minimal · previous review 36296

The missing-key hint points to the updated API-key page. No merge-blocking issue is established.

Pre-merge checks: Passed 6

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: updating the “Not signed in” hint to use the /profile/api-keys URL.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Architecture Decision Compliance Passed PASS. The diff changes only the human-readable resolve_api_key() hint URL and adds a matching test assertion. The accepted ADRs concern machine-output schemas, workflow operations, dependency resolu…
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files.

Full details: Architecture Decision Compliance

Explanation

PASS. The diff changes only the human-readable resolve_api_key() hint URL and adds a matching test assertion. The accepted ADRs concern machine-output schemas, workflow operations, dependency resolution, knowledge discovery, and save-to-API conversion; none governs this URL. The URL update is a local, reversible implementation detail and does not create an architectural boundary or dependency choice.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between ba9f00e and 3629690.

Files selected for processing: 2

  • comfy_cli/command/generate/client.py
  • tests/comfy_cli/command/generate/test_client.py

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Cursor Review — Consolidated panel

Triggered by @mattmillerai.

✅ No high-signal findings.

Panel: 6/6 reviewers contributed findings.

The short platform.comfy.org/api-keys path has no page behind it (the SPA
only serves /profile/api-keys), so the hint could land on a 404 shell. Link
the real key page with ?onboarding=router, which opens the create-key dialog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@comfy-greenlight-bot

comfy-greenlight-bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Swarmhost agentic review

The detailed evaluation is available to employees in the internal Slack review thread.

Evaluation budget remaining for this pull request: 14 automatic and 15 manual.

Updated by Swarmhost's agentic review process.

@comfy-greenlight-bot comfy-greenlight-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request at head commit d8fba42 has been reviewed and approved by Swarmhost's agentic review process.

The detailed evaluation is available to employees in the internal Slack review thread.

@mattmillerai
mattmillerai merged commit ab5abec into main Nov 17, 2026
20 checks passed
@mattmillerai
mattmillerai deleted the be-25408-api-keys-hint-url branch November 17, 2026 00:39
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

agent-coded PR authored by the agent-work loop cursor-review Request Cursor bot review greenlight

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants