Skip to content

bug(wasm): git features unavailable on web — GitManager and CredentialStore are stubs #190

Description

@tstapler

Summary

Git commit, push, pull, and credential storage are all no-ops on the WASM/browser target:

  • JsGitManager (kmp/src/wasmJsMain/kotlin/dev/stapler/stelekit/platform/GitManager.kt) — commit returns a fake success string; push/pull return HTTP 501 errors; status always returns "Clean".
  • CredentialStore (kmp/src/wasmJsMain/kotlin/dev/stapler/stelekit/git/CredentialStore.kt) — all methods are no-ops; credentials are never stored or retrieved.

Any UI surface that exposes git operations (sync button, git setup screen) will silently fail or report incorrect state on web.

Root cause

There is no WASM-compatible git implementation in the project. The JVM target uses JGit; there is no equivalent for the browser. Git operations on the web would require one of:

  • A WASM build of libgit2 (e.g. isomorphic-git via JS interop)
  • A server-side git proxy reachable via HTTP from the browser
  • OPFS-backed git storage with a JS git library

Proposed fix

Integrate isomorphic-git via Kotlin/WASM JS interop. It runs entirely in the browser using OPFS for storage and supports push/pull over HTTP with CORS-enabled remotes. CredentialStore on WASM could use localStorage or sessionStorage for in-session tokens.

This is a significant implementation effort (Epic-scale) and should be tracked separately.

Affected files

  • kmp/src/wasmJsMain/kotlin/dev/stapler/stelekit/platform/GitManager.kt
  • kmp/src/wasmJsMain/kotlin/dev/stapler/stelekit/git/CredentialStore.kt

Labels

bug, platform: web, epic

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions