Skip to content

ui-sdk: remove the geo compatibility aliases from the SDK's public server entry #2770

Open

Description

@schlessera

Part of #1345.

Context

Split from #1374 on 2026-10-24; the ruling below was made there.

@schlessera/brain-ui-sdk/server still re-exports pure geo functions and types from @schlessera/brain-geo as compatibility aliases. The re-exports live in packages/ui-sdk/src/server/coastline.ts:1-11 ("Compatibility exports: the shared geo package owns geometry and request I/O") and are published through packages/ui-sdk/src/server/index.ts:64-87: OSM_ATTRIBUTION, clipLine, closeAgainstViewport, closedRings, detailFor, fetchCoastline, prepare, prepareLand, signedArea, simplify, stitch, toleranceMetres and the types BBox, Coord, CoastlineConfig, CoastlineRequest, CoastlineResult, FetchLike, LandOptions, MapDetail. geoConfigSchema, GeoConfig and GeoConfigInput are re-exported the same way (index.ts:166-167).

Known first-party consumers of the aliases on a6b945b: packages/ui-kit/tests/geo-fixtures.test.ts:14 (signedArea) and the SDK's own packages/ui-sdk/tests/coastline.test.ts. Re-run the inventory before changing anything.

The SDK keeps genuine geo uses that are not aliases: protocol track types (packages/ui-sdk/src/protocol.ts:29) and reverse geocoding (packages/ui-sdk/src/server/reverse-geocode.ts:1-2). Those keep the @schlessera/brain-geo dependency.

Maintainer decision — geo A (2026-10-09, on #1374)

Remove the SDK geo compatibility re-exports; consumers import directly from the canonical public @schlessera/brain-geo entries (or its /server entry). This explicitly approves a breaking import migration, with exact old-to-new import documentation and API-report/contract updates, without deprecated SDK aliases. Geometry, request and result behaviour stays unchanged. Do not remove the SDK's geo dependency merely because the aliases disappear; helpers that are not pure aliases need separate ownership assessment.

Scope

  • Inventory every name the SDK's public entries re-export from @schlessera/brain-geo and classify each as a pure alias or not.
  • Delete packages/ui-sdk/src/server/coastline.ts and the pure-alias re-exports from packages/ui-sdk/src/server/index.ts (and any equivalent in other SDK public entries).
  • Migrate every first-party consumer (source, tests, docs, website examples) to the canonical geo entry. Move or delete packages/ui-sdk/tests/coastline.test.ts so the behaviour stays covered in packages/geo/tests.
  • Write the migration table (old SDK import → new geo import) in the integration contract's migration notes and the changeset.

Out of scope

Acceptance criteria

  • packages/ui-sdk/src/server/coastline.ts does not exist, and git grep -n 'from "@schlessera/brain-geo' -- packages/ui-sdk/src shows only non-alias uses.
  • api-report/ui-sdk.txt no longer lists the removed names; api-report/geo.txt is unchanged.
  • No first-party file imports a removed name from @schlessera/brain-ui-sdk/server; bun run typecheck passes.
  • Coastline/land behaviour remains covered by geo's own tests, which pass unchanged.
  • The changeset and the integration contract list every removed import with its replacement.

Verification

git grep -n 'from "@schlessera/brain-geo' -- packages/ui-sdk/src
bun run test packages/geo packages/ui-sdk packages/ui-kit/tests/geo-fixtures.test.ts
bun run api-report
bun run typecheck

Contract impact

Breaking, approved by the 2026-10-09 ruling: contract and breaking labels, CONTRACT: commit, same-commit integration-contract and API-report update, and a changeset naming every removed SDK import. Before 1.0.0 that changeset is a minor, not a major (maintainer, 2026-10-24).

2026-10-24: filed from #1374's split.

Activity

  1. added
    type: refactor
    area: ui-sdk
    priority: p3
    agent-ready
    contract
    breaking
    on Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyarea: ui-sdkbreakingcontractpriority: p3type: refactor

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions