Skip to content

feat: Add 'studio' region and filter region selection based on permissions#82

Merged
milesapnash merged 6 commits intomainfrom
miles/feat/plg-and-region-filter
Apr 21, 2026
Merged

feat: Add 'studio' region and filter region selection based on permissions#82
milesapnash merged 6 commits intomainfrom
miles/feat/plg-and-region-filter

Conversation

@milesapnash
Copy link
Copy Markdown
Contributor

@milesapnash milesapnash commented Apr 16, 2026

Summary

Updates poly init to only display regions the user's API key has access to, and adds the studio region.

Motivation

Previously, poly init showed all hardcoded regions regardless of whether the user had access. This change probes regions concurrently and filters the list. Additionally, studio was not available as a region.

Changes

  • Added get_accessible_regions() to PlatformAPIHandler that concurrently probes regions via get_accounts() and returns only accessible ones
  • Added get_accessible_regions() to AgentStudioInterface as the public interface
  • Updated init_project() in cli.py to fetch and display only accessible regions (with a loading spinner), with an error message if none are found
  • Added "studio" region pointing to https://api.studio.poly.ai/adk/v1

Test strategy

  • Added/updated unit tests
  • Manual CLI testing (poly <command>)
  • Tested against a live Agent Studio project
  • N/A (docs, config, or trivial change)

Checklist

  • ruff check . and ruff format --check . pass
  • pytest passes
  • No breaking changes to the poly CLI interface (or migration path documented)
  • Commit messages follow conventional commits

Screenshots / Logs

Screenshot 2026-04-21 at 11 20 47

@milesapnash milesapnash requested a review from a team April 16, 2026 13:49
@github-actions

This comment has been minimized.

Comment thread src/poly/cli.py Outdated
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

Coverage Report

Base (main) PR Change
72.3% 72.1% -0.3% ⚠️

Changed file coverage

File Coverage Change
poly/handlers/platform_api.py 31.2% -2.4% ⚠️
poly/cli.py 52.1% -0.6% ⚠️
poly/handlers/interface.py 54.7% +0.4% ✅

@milesapnash milesapnash merged commit d4af195 into main Apr 21, 2026
3 checks passed
@milesapnash milesapnash deleted the miles/feat/plg-and-region-filter branch April 21, 2026 10:24
AaronForinton added a commit that referenced this pull request Apr 21, 2026
…permissions (#93)

## Summary

This PR contains the work from #82

## Motivation

<!-- Why is this change needed? Link to an issue if applicable. -->

Closes #<!-- issue number -->

## Changes

<!-- Bullet list of the key changes. Focus on *what* changed, not *how*.
-->

-

## Test strategy

<!-- How did you verify this works? Check all that apply. -->

- [ ] Added/updated unit tests
- [ ] Manual CLI testing (`poly <command>`)
- [ ] Tested against a live Agent Studio project
- [x] N/A (docs, config, or trivial change)

## Checklist

- [ ] `ruff check .` and `ruff format --check .` pass
- [ ] `pytest` passes
- [x] No breaking changes to the `poly` CLI interface (or migration path
documented)
- [ ] Commit messages follow [conventional
commits](https://www.conventionalcommits.org/)

## Screenshots / Logs

<!-- Optional: paste terminal output, screenshots, or before/after diffs
if helpful. -->

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.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.

2 participants