apps/gpui-photo-grid/KNOWN_ISSUES.md
Problem: The Tauri app starts the HTTP server on a random port (not fixed at 54321).
Current Workaround:
127.0.0.1:56851)SD_HTTP_URL="http://127.0.0.1:56851" ./run.sh
Why This Happens:
The HTTP server binds to (LOCALHOST, 0) which picks a random available port. This prevents port conflicts but makes it hard for external processes to find the server.
Permanent Solutions:
Add a new daemon query that returns the current HTTP server URL:
// In core
Query: "core.http_url" -> Returns current HTTP URL
Have the daemon write the HTTP URL to a known location:
~/.spacedrive/http_url.txt
Change server.rs to use a fixed port (e.g., 54321) but this risks conflicts.
Since GPUI app is separate, this doesn't work directly, but we could:
Recommended: Option 1 - add a daemon query. This is cleanest and works for any client.
// In core/src/ops/core/queries.rs (or similar)
#[derive(Debug, Clone, Serialize, Deserialize, Type)]
pub struct HttpUrlQuery;
impl CoreQuery for HttpUrlQuery {
type Output = Option<String>;
async fn execute(&self, ctx: &CoreContext) -> Result<Self::Output> {
Ok(ctx.http_server_url().cloned())
}
}
Then the GPUI app can query on startup:
let http_url = client.execute("query:core.http_url", ()).await?;
For now, just check the browser devtools for the port!