Skip to content

Move screen add, delete and the token check off v3 - #328

Merged
rusko124 merged 3 commits into
masterfrom
screens-v4.1
Sep 29, 2026
Merged

rusko124 merged 3 commits into
masterfrom
screens-v4.1

Conversation

@rusko124

Copy link
Copy Markdown
Contributor

Why

The v3 API is being retired along with the legacy app server. Screen add,
screen delete and the token check on login were the last three places the CLI
still used it, so they stop working when it goes.

What

Adding a screen posts to v4.1 instead. That endpoint answers with the id of the
new screen and nothing else, so the screen is read back before returning, and
screen add prints what it printed before.

Deleting a screen filters on the id, the same way the other v4 screen calls do.

Verifying a token used to ask v3 for a group that does not exist and treat the
404 as proof that the token was accepted. It now reads a single screen and
treats 200 as proof. That also fixes a real problem with the old approach: a
request that failed for any other reason also came back 404, so a bad token
could look valid at login and only fail later.

One of the tests for the old behaviour was passing for the same reason — its
mock asserted a different token than the test supplied, so the request never
matched and the mock server's own 404 was read as success. The mock now
asserts the token the test actually sends.

The v3 API is being retired with the legacy app server, and these were the last
three calls the CLI made to it.

Adding a screen now posts to v4.1, which answers with the new id alone, so the
screen is read back to keep the command's output the same. Deleting filters on
the id the way the other v4 calls do.

Verifying a token asked v3 for a group that does not exist and took the 404 as
proof the token was good. It now reads a single screen and takes 200 as proof,
which also means an invalid token is rejected rather than reported as valid.
Copilot AI balanced review requested due to automatic review settings September 29, 2026 08:40

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings September 29, 2026 08:45

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@rusko124
rusko124 merged commit 5fa2e4f into master Sep 29, 2026
11 checks passed
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.

3 participants