Skip to content

feat!: drop the {{client}} header placeholder - #160

Merged
fylorn merged 1 commit into
mainfrom
feat/drop-client-placeholder
Sep 24, 2026
Merged

fylorn merged 1 commit into
mainfrom
feat/drop-client-placeholder

Conversation

@fylorn

@fylorn fylorn commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Why

{{client}} in a header value was replaced with the name of the gateway key that made the request. There is no use for it: a relay that wants a caller name gets a fixed value written into the header. The desktop form stopped mentioning it (ThinkWatch-Lite#159); this removes the feature.

What

  • tw-config: CLIENT constant gone; Provider::outbound_headers(access_token) loses its client parameter; {{client}} is now an unrecognized placeholder.
  • tw-gateway: headers_for / headers_after_401 lose client; callers in the gateway, control plane and twcore updated.
  • Message code: the unrecognized-placeholder sentence changed ("only {{access_token}} is"), so config.credential.unknown_placeholder is replaced by config.credential.unrecognized_placeholder (same args: header, placeholder). Lite adds the translation when it takes this tag.
  • Tests: {{client}} rejected; header-order and relay-header tests use fixed values.

Breaking for tw-config / tw-gateway API callers; the server edition uses neither (checked with git grep).

Verified

cargo fmt --check, cargo clippy --workspace --all-targets -D warnings, cargo test --workspace (proxy env unset).

🤖 Generated with Claude Code

Header values could say {{client}} to get the name of the gateway key
that made the request. Nobody needs it: a relay that wants a caller
name gets a fixed value written into the header. It goes, along with the
`client` parameter it threaded through `Provider::outbound_headers`,
`GatewayState::headers_for` and `headers_after_401`.

{{client}} in a header is now an unrecognized placeholder. That error
changed its sentence (only {{access_token}} is recognized), so it has a
new code: config.credential.unrecognized_placeholder replaces
config.credential.unknown_placeholder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fylorn
fylorn merged commit a6ffe1f into main Sep 24, 2026
2 checks passed
@fylorn
fylorn deleted the feat/drop-client-placeholder branch September 24, 2026 05:56
@fylorn fylorn mentioned this pull request Sep 24, 2026
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