Skip to content

fix: address PR #2 review comments - #7

Merged
nicomiguelino merged 5 commits into
developmentfrom
chore/address-pr-2-review-comments
Aug 21, 2026
Merged

fix: address PR #2 review comments#7
nicomiguelino merged 5 commits into
developmentfrom
chore/address-pr-2-review-comments

Conversation

@nicomiguelino

Copy link
Copy Markdown
Contributor

Summary

Addresses review comments from #2.

Avoids unnecessary network calls during local dev.
Handles a missing trailing slash on screenly_oauth_tokens_url.
- Renames proxyToRealPuzzel to callPuzzel
- Drops the synthetic-data fallback for /puzzel routes
- Returns 502 on upstream fetch failure instead of crashing
- Returns 404 when there's no active Connect session
Copilot AI lite review requested due to automatic review settings August 21, 2026 16:26
@nicomiguelino nicomiguelino self-assigned this Aug 21, 2026
@nicomiguelino
nicomiguelino merged commit 3a0a802 into development Aug 21, 2026
1 check passed
@nicomiguelino
nicomiguelino deleted the chore/address-pr-2-review-comments branch August 21, 2026 16:27

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.

Pull request overview

This PR addresses review feedback from PR #2 by tightening access-token retrieval behavior in the Edge App and aligning the mock server toward a “connected/proxy-only” model.

Changes:

  • fetchAccessToken now returns a configured access_token immediately (no broker call) and constructs the broker URL robustly whether or not the base URL ends with /.
  • Tests were updated/expanded to cover the early-return dev token path and URL construction behavior.
  • Mock server Puzzel routes now require an active connection and proxy to the real upstream API, with clearer error handling and updated README guidance.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/credentials.ts Early-return for dev token; safer URL construction for broker endpoint; clearer fallback behavior.
src/credentials.test.ts Adds/updates tests for early-return dev token, request URL building, and fallback behavior.
mock-server/src/routes/puzzel.ts Removes synthetic responses; requires connection and proxies upstream with error handling.
mock-server/README.md Updates docs to reflect proxy-only behavior and connection requirements (but needs a couple of corrections).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread mock-server/README.md
Comment thread mock-server/README.md
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