Skip to content

Port Hyper, GitKraken AI, and Bifrost providers - #619

Draft
Finesssee wants to merge 2 commits into
codex/integrate-reviewed-ports-20260923from
codex/port-0.65-provider-pack
Draft

Finesssee wants to merge 2 commits into
codex/integrate-reviewed-ports-20260923from
codex/port-0.65-provider-pack

Conversation

@Finesssee

Copy link
Copy Markdown
Collaborator

Summary

Ports the upstream v0.65 provider pack for Charm Hyper, GitKraken AI, and Bifrost. Adds provider registration and settings integration, including Bifrost gateway configuration. The Bifrost virtual-key header is prevented from following gateway redirects; GitKraken shared-pool usage stays display-only.

This is the first implementation unit in the v0.65/v0.66 port plan. It depends on #610 and targets codex/integrate-reviewed-ports-20260923; retarget or rebase it onto main after #610 merges.

Validation

  • Rust provider tests: 1,247 passed, 1 ignored.
  • Rust formatting and Clippy passed.
  • Tauri Clippy passed.
  • Frontend provider tests: 22 passed.
  • Frontend production build and locale parity check passed (882 keys).
  • Frontend lint exited successfully with existing warnings.

Review status

Draft. CircleCI will run on this PR. Native Windows CUA proof for the Bifrost settings surface remains pending; the active desktop was left undisturbed.

@coderabbitai

coderabbitai Bot commented Sep 25, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

@Finesssee

Copy link
Copy Markdown
Collaborator Author

Thermo-nuclear code-quality review

Verdict: FINDINGS (blocking). Reviewed head 669910bdd against its base codex/integrate-reviewed-ports-20260923.

P1: The gateway is reused through a boolean mode with hardcoded English strings

To add Bifrost, the Wayfinder-specific component gets a bifrost?: boolean prop (WayfinderGatewaySection.tsx:11). That prop switches the title, label and help text to unlocalized English literals, while Wayfinder still uses t(...). The rest of the flow picks up provider-id checks as well:

  • ProviderDetailPane.tsx:148 and :348 repeat providerId === "wayfinder" || providerId === "bifrost".
  • provider_settings.rs gateway_provider hardcodes the set, and set_provider_gateway_url re-matches on it with unreachable! (:494).
  • A new get_provider_gateway_url command (:474) plus a gatewayLoadedProviderId state exist only to load a value the detail request could return.

Adding a third gateway provider would mean editing all of these again.

Suggested restructure: make the gateway a typed capability owned by the provider. For example, ProviderId::gateway() -> Option<GatewaySpec { validate: fn(&str) -> Result<..>, title_key, label_key, help_key }>, and have the provider detail DTO carry gateway: { url, titleKey, labelKey, helpKey } | null. The frontend then renders one generic GatewaySection whenever detail.gateway is present. The id checks, the boolean prop, the unreachable!, the extra command and the loaded-id state all go away, and Bifrost gets localized strings for free.

P1: bifrost/mod.rs is a new 1,037-line file

About 835 lines of it are production code, with inline tests from :836. Hyper in this same PR already uses hyper/tests.rs; do the same here. The production half is also longer than it needs to be because it walks serde_json::Value by hand: object, array, optional_text, optional_number and optional_bool (:761–:808) reimplement typed deserialization, and quota_url_for_test (:757) is an identity wrapper. #[derive(Deserialize)] structs with Option<T> fields and #[serde(default)] would express the same fail-closed schema in a fraction of the code.

P2: Three new number formatters in one PR

bifrost::format_count (:823), gitkraken::format_number (:328) and hyper::format_balance (:265) each implement rounding, trimming and (in two of them) thousands grouping, with slightly different rules. The tree already has more than ten format_count / format_number copies. Add one shared providers::format::{count, grouped_decimal} and use it here, rather than adding three more variants.

P3: GitKraken skips the canonical validator

The GitKraken arm in validate_provider_workspace_value (provider_workspace.rs:43) hand-rolls its check, while the neighboring arms use validate_id(trimmed, label, predicate). Use the helper.

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