Skip to content

Offer only the visibility stops the tenant can honour at setup - #1940

Draft
realtonyyoung wants to merge 3 commits into
mainfrom
tonyyoung/ai-2896-setup-visibility-options
Draft

realtonyyoung wants to merge 3 commits into
mainfrom
tonyyoung/ai-2896-setup-visibility-options

Conversation

@realtonyyoung

@realtonyyoung realtonyyoung commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

No GitHub issue — AI-2896

What & why

kcap setup's visibility prompt offered all four stops on every tenant and preselected org_public, which on a tenant with no auto-public owner grants only what project does. Setup and the desktop app's visibility step now read GET /api/users/me/visibility-options (kurrent-io/kcap-server#2674) and offer exactly its stops, in its order and with the browser flow's copy. The terminal prompt preselects the server's default, and --no-prompt without --default-visibility takes it. A 404, or any other miss, keeps today's four stops and org_public, and every miss other than a 404 leaves one line saying why. Existing profiles are not touched

Where to look

--no-prompt without --default-visibility now takes the server's default rather than org_public, so on a tenant with no auto-public owner a scripted setup stamps project or private, which is narrower. The README and kcap setup --help say so

The desktop step clears an answer a refreshed offer no longer makes, so a revisit cannot save it. The desktop step still makes the user pick before continuing rather than preselecting the server's default, because that explicit choice is pinned by Privacy_requires_an_explicit_choice_before_install_or_skip. Preselecting there is a one-line change if wanted. The read ignores the response's owners, since the org label already names them

Verification

  • ServerVisibilityOptionsTests (Cli.Core, against WireMock): the three option sets, an unknown key dropped, an unoffered default, malformed JSON, 404 (silent), 401, 500 and an unreachable server, none of which throws
  • Step_three_offers_what_the_tenant_can_honour: red when the server's offer is ignored, Expected to be equivalent to [private, project, public]
  • HandleAsync_NoPrompt_without_a_visibility_takes_the_servers_default (whole wizard against WireMock): red with the hard-coded default, Expected to be equal to "project", and the 404 and 500 rows keep org_public
  • Who_can_read_offers_what_the_tenant_can_honour (desktop view-model): red when the offer is not applied, Expected to be equivalent to [private, public]. A failed or absent read keeps every answer, and a local install asks nothing
  • dotnet publish of the CLI raised no AOT warnings

🤖 Generated with Claude Code

realtonyyoung and others added 2 commits October 24, 2026 22:18
Only the server knows whether an org stop grants more than a project one; a server without the read keeps every stop and org_public

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@linear-code

linear-code Bot commented Oct 25, 2026

Copy link
Copy Markdown

AI-2896

@coderabbitai

coderabbitai Bot commented Oct 25, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

A second visit after a failed harness check reads the offer again, and an answer picked from the earlier list would otherwise be saved

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant