Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: squidcode/timebook-cli
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: squidcode/timebook-cli
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: fix/cli-default-api-url
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on May 4, 2026

  1. fix(login): default apiUrl to https://usetimebook.com (no api. subdom…

    …ain exists)
    
    The default `apiUrl` was `https://api.usetimebook.com`, but the
    production deploy on DigitalOcean App Platform only has the bare
    `usetimebook.com` domain — both the React app and the JSON API are
    served from the same origin (`/api/*`). DNS for `api.usetimebook.com`
    returns nothing, so `verifyToken` after the browser callback always
    threw a bare `TypeError: fetch failed` and the CLI bailed before
    writing the config — making login appear to succeed (the loopback
    callback printed) but never persist a token.
    
    Also wrap the `fetch` call in `lib/api.ts` to surface the underlying
    cause (DNS, ECONNREFUSED, cert error, …) instead of the bare
    `fetch failed`. This would have made the misconfiguration above
    trivial to diagnose.
    
    Users with an already-saved bad apiUrl can re-run with
    `TIMEBOOK_API_URL=https://usetimebook.com timebook login` once;
    the corrected value will then be persisted.
    ktamas77 committed May 4, 2026
    Configuration menu
    Copy the full SHA
    2399303 View commit details
    Browse the repository at this point in the history
Loading