Skip to content

docs: align local API port examples with current dev flow#250

Open
pandego wants to merge 2 commits intojamiepine:mainfrom
pandego:fix/docs-align-local-port-17493
Open

docs: align local API port examples with current dev flow#250
pandego wants to merge 2 commits intojamiepine:mainfrom
pandego:fix/docs-align-local-port-17493

Conversation

@pandego
Copy link

@pandego pandego commented Mar 12, 2026

Summary

  • align local API examples with the current app and development workflow port
  • update troubleshooting and OpenAPI generation guidance to use the same local default
  • keep manual custom host/port usage documented without changing backend CLI defaults

What changed

  • update README.md API examples to use http://localhost:17493
  • update backend/README.md usage examples and note that manual launches can use a different host or port
  • update docs/TROUBLESHOOTING.md health and OpenAPI checks to use 17493
  • update CONTRIBUTING.md troubleshooting guidance for OpenAPI client generation
  • update scripts/generate-api.sh to match bun run dev:server

Why

The repo currently has mixed references to 8000 and 17493. The current local app, web client, and development workflow use 17493, while some older docs and helper tooling still point at 8000. This patch aligns the user-facing docs and the OpenAPI generation helper with the modern local/dev flow without changing backend runtime defaults.

Validation

  • reviewed the current app/web/Tauri/dev flow and confirmed they use 17493
  • confirmed scripts/generate-api.sh previously disagreed with bun run dev:server
  • avoided changing backend default port behavior in code

Summary by CodeRabbit

  • Documentation

    • Updated API examples, README, backend docs, and troubleshooting to use the new default local backend port (17493) and clarified how to override it for local development.
  • Chores

    • Updated the API client generation script and related docs to reference the new default backend port.
  • Changelog

    • Noted the generator script update in the Unreleased → Fixed section.

@coderabbitai
Copy link

coderabbitai bot commented Mar 12, 2026

📝 Walkthrough

Walkthrough

The pull request updates local backend port references from 8000 to 17493 across documentation and a generation script, and adds a changelog entry documenting the generator script note.

Changes

Cohort / File(s) Summary
Documentation
CONTRIBUTING.md, README.md, backend/README.md, docs/TROUBLESHOOTING.md
Replaced examples and API/health-check URLs referencing http://localhost:8000 with http://localhost:17493. Added notes clarifying the default local backend host/port and how to override.
Script
scripts/generate-api.sh
Updated backend port used for startup, readiness probing, and OpenAPI schema download from 8000 to 17493. Minor loop variable rename and added clarifying comment; control flow unchanged.
Changelog
CHANGELOG.md
Added entry noting the OpenAPI client generator script documents the local backend port and avoids an unused loop variable warning.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped through docs in gentle bounds,
I nudged the port to newer grounds,
From eight-oh-oh to seventeen-four-three,
Docs and scripts now hum in harmony,
A tiny hop — the backend's free! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: aligning documentation and tooling examples to use the current local API port (17493) instead of the outdated port (8000).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Tip

You can customize the high-level summary generated by CodeRabbit.

Configure the reviews.high_level_summary_instructions setting to provide custom instructions for generating the high-level summary.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
scripts/generate-api.sh (2)

34-34: Static analysis: Unused loop variable i.

The loop variable i is unused (SC2034). This is a pre-existing issue unrelated to this PR's changes, but you could suppress the warning or use _ as the variable name.

♻️ Optional fix to suppress warning
-    for i in {1..30}; do
+    for _ in {1..30}; do
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/generate-api.sh` at line 34, The for-loop in generate-api.sh uses an
unused loop variable `i` ("for i in {1..30}; do"), triggering SC2034; either
replace `i` with `_` (e.g., "for _ in {1..30}; do") to indicate intentional
unused variable or add a ShellCheck suppression comment above the loop (e.g., "#
shellcheck disable=SC2034") to silence the warning; update the loop header
surrounding "for i in {1..30}; do" accordingly.

29-29: Port configurations serve different contexts and are intentional.

The script uses port 17493 via explicit --port 17493 argument, while backend/server.py defaults to port 8000 when no port is specified. This design is reasonable: the script specifies its automation-specific port, while the backend remains flexible via the --port argument. Developers running the backend directly (python -m backend.main) will naturally use the default 8000, which is appropriate for local development.

If clarity is desired, consider adding an inline comment in the script noting why 17493 is used.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/generate-api.sh` at line 29, Add an inline comment next to the
uvicorn invocation in generate-api.sh explaining why the specific port 17493 is
used (automation/CI-specific port) to avoid confusion with backend/server.py's
default 8000; update the line containing the uvicorn command (uvicorn main:app
--port 17493 &) to include that brief explanatory comment.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@scripts/generate-api.sh`:
- Line 34: The for-loop in generate-api.sh uses an unused loop variable `i`
("for i in {1..30}; do"), triggering SC2034; either replace `i` with `_` (e.g.,
"for _ in {1..30}; do") to indicate intentional unused variable or add a
ShellCheck suppression comment above the loop (e.g., "# shellcheck
disable=SC2034") to silence the warning; update the loop header surrounding "for
i in {1..30}; do" accordingly.
- Line 29: Add an inline comment next to the uvicorn invocation in
generate-api.sh explaining why the specific port 17493 is used
(automation/CI-specific port) to avoid confusion with backend/server.py's
default 8000; update the line containing the uvicorn command (uvicorn main:app
--port 17493 &) to include that brief explanatory comment.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f63f0c53-c438-4d98-801c-3b72f4f23aa9

📥 Commits

Reviewing files that changed from the base of the PR and between 38bf96f and cdef216.

📒 Files selected for processing (5)
  • CONTRIBUTING.md
  • README.md
  • backend/README.md
  • docs/TROUBLESHOOTING.md
  • scripts/generate-api.sh

@pandego
Copy link
Author

pandego commented Mar 13, 2026

Addressed the two CodeRabbit nits in the latest push.

What changed:

  • renamed the unused retry loop variable to _ in scripts/generate-api.sh
  • added an inline note explaining why the generator starts the backend on port 17493
  • updated CHANGELOG.md

No behavior change expected - this is just a small cleanup pass on top of the docs port alignment update.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
CHANGELOG.md (2)

58-58: Clarify "documents the local backend port" wording.

The phrase "documents the local backend port" is somewhat vague. Consider more precise wording like "updated to use port 17493" or "aligned with port 17493" to make the change clearer to readers.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CHANGELOG.md` at line 58, Update the vague phrase "documents the local
backend port" in the CHANGELOG entry to a precise description; replace it with
something like "updated to use port 17493" or "aligned with port 17493" so
readers know the exact port change, ensuring the sentence still reads naturally
with the existing fragment "OpenAPI client generator script now ..." and keep
the rest of the line unchanged.

58-58: Consider moving this entry to the "Changed" section.

Since the primary change is aligning documentation with the current workflow (port 17493) rather than fixing broken functionality, this entry might fit better in a "Changed" section. The Keep a Changelog format typically reserves "Fixed" for bug fixes.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CHANGELOG.md` at line 58, Move the changelog entry "- OpenAPI client
generator script now documents the local backend port and avoids an unused loop
variable warning" out of the "Fixed" section and place it under the "Changed"
section in CHANGELOG.md; locate the current "Fixed" and "Changed" headings and
relocate that exact bullet so the entry reflects a documentation/workflow change
rather than a bug fix.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@CHANGELOG.md`:
- Line 58: Update the CHANGELOG entry to list all documentation files updated in
this PR and the specific port change: amend the line about the OpenAPI client
generator to also mention that README.md, backend/README.md, CONTRIBUTING.md,
and TROUBLESHOOTING.md were updated to change the local backend port reference
from 8000 to 17493 and note the removal of an unused loop variable warning in
the generator script; keep the wording concise and consistent with existing
changelog style.

---

Nitpick comments:
In `@CHANGELOG.md`:
- Line 58: Update the vague phrase "documents the local backend port" in the
CHANGELOG entry to a precise description; replace it with something like
"updated to use port 17493" or "aligned with port 17493" so readers know the
exact port change, ensuring the sentence still reads naturally with the existing
fragment "OpenAPI client generator script now ..." and keep the rest of the line
unchanged.
- Line 58: Move the changelog entry "- OpenAPI client generator script now
documents the local backend port and avoids an unused loop variable warning" out
of the "Fixed" section and place it under the "Changed" section in CHANGELOG.md;
locate the current "Fixed" and "Changed" headings and relocate that exact bullet
so the entry reflects a documentation/workflow change rather than a bug fix.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b95985c7-e14d-436f-9fce-dddbf5bbe8a5

📥 Commits

Reviewing files that changed from the base of the PR and between cdef216 and 3d25067.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • scripts/generate-api.sh
🚧 Files skipped from review as they are similar to previous changes (1)
  • scripts/generate-api.sh


### Fixed
- Audio export failing when Tauri save dialog returns object instead of string path
- OpenAPI client generator script now documents the local backend port and avoids an unused loop variable warning
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Expand the changelog entry to include all documentation updates.

The current entry only mentions the generator script, but the PR updates multiple documentation files (README.md, backend/README.md, CONTRIBUTING.md, TROUBLESHOOTING.md) to align port references from 8000 to 17493. Users reading the changelog won't be aware of these important documentation updates.

📝 Suggested expanded entry
-- OpenAPI client generator script now documents the local backend port and avoids an unused loop variable warning
+- Updated local API port references from 8000 to 17493 across documentation (README.md, backend/README.md, CONTRIBUTING.md, TROUBLESHOOTING.md) and OpenAPI client generator script to align with current development workflow
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- OpenAPI client generator script now documents the local backend port and avoids an unused loop variable warning
- Updated local API port references from 8000 to 17493 across documentation (README.md, backend/README.md, CONTRIBUTING.md, TROUBLESHOOTING.md) and OpenAPI client generator script to align with current development workflow
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CHANGELOG.md` at line 58, Update the CHANGELOG entry to list all
documentation files updated in this PR and the specific port change: amend the
line about the OpenAPI client generator to also mention that README.md,
backend/README.md, CONTRIBUTING.md, and TROUBLESHOOTING.md were updated to
change the local backend port reference from 8000 to 17493 and note the removal
of an unused loop variable warning in the generator script; keep the wording
concise and consistent with existing changelog style.

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