-
Notifications
You must be signed in to change notification settings - Fork 762
[WIP] Update backend route to use command in URL #12003
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
@copilot Continue |
Done in e4374e8. The frontend now POSTs to Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
This is a first step towards actually adding a routing table. Co-authored-by: Byron <63622+Byron@users.noreply.github.com>
e4374e8 to
8665b5c
Compare
Byron
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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 refactors the HTTP API communication between the frontend desktop app and the but-server backend. The command name is now included in the URL path (e.g., POST /list_projects) instead of being part of the JSON request body. The parameters are sent directly as the JSON body rather than being wrapped in a {command, params} structure.
Changes:
- Modified the frontend to construct URLs with the command name as part of the path and send params as the direct JSON body
- Updated the backend to extract the command from the URL path parameter and accept params directly as the JSON body
- Removed the old root endpoint handler that accepted command in the body
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| apps/desktop/src/lib/backend/web.ts | Updated webInvoke to append command to URL path and send params directly as JSON body |
| crates/but-server/src/lib.rs | Changed route from / to /{command}, updated handler to extract command from path and reconstruct Request internally |

apps/desktop/src/lib/backend/web.tsto include the command in the URL path (e.g.,http://localhost:port/list_projects) instead of in the JSON bodycrates/but-server/src/lib.rsto:/{command}){command, params})/endpoint (no backward compatibility needed)Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.