Skip to content

chore: spell out abbreviations in internal code, tests, and examples - #1709

Merged
spydon merged 2 commits into
mainfrom
lukasklingsbo/sdk-1480-spell-out-abbreviations-in-internal-code-tests-and-examples
Aug 14, 2026
Merged

spydon merged 2 commits into
mainfrom
lukasklingsbo/sdk-1480-spell-out-abbreviations-in-internal-code-tests-and-examples

Conversation

@spydon

@spydon spydon commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

What

Non-breaking counterpart to SDK-1479: spells out abbreviations in private members, @internal declarations, tests, and example apps.

No public API changes, so no MIGRATION.md entry and no sdk-compliance.yaml reconciliation. The three fromString methods, RealtimeChannel.send and GotrueFetch touched here are all @internal; everything else is a local, a private member, a positional parameter, a test, or an example.

Wire format is untouched throughout: JSON claim keys (exp, iat, sub), error keys (msg), Phoenix ref, and query keys all keep their literal spelling. Only the Dart identifiers around them changed.

Package internals

Current New Where
StackTrace stack stackTrace postgrest, storage, gotrue, yet_another_json_isolate
catch (e) catch (error) gotrue helper.dart, fetch.dart, gotrue_client.dart, supabase, storage, realtime, plus doc-comment examples
res response gotrue_client.dart, supabase_auth.dart
bodyStr bodyString gotrue, postgrest, functions
opts options @internal RealtimeChannel.send
val value @internal fromString methods in gotrue and realtime
fn action supabase_common retry.dart
_receivedResp, _recHooks _receivedResponse, _receiveHooks realtime push.dart
timerCalc timerCalculation realtime retry_timer.dart
bindingsLen bindingsLength realtime_channel.dart
lastIdx, valTrim lastIndex, trimmedValue realtime transformers.dart
obj1, obj2 first, second RealtimeChannel._isEqual
obj presencesByKey RealtimePresence._map and _cloneDeep
curPresenceRefs currentPresenceRefs realtime_presence.dart
_handleRes _handleResponse yet_another_json_isolate _isolates_io.dart
pChar, char previousCharacter, character supabase_common snake_case.dart
_appendParams, urlParams, searchParams, effectiveQueryParams …Parameters realtime, gotrue, postgrest, functions
exp, iat locals expiresAt, issuedAt gotrue_client.dart
re whitespaceRegularExpression postgrest query and transform builders

Tests

Current New Where
sut, sut* helpers client, createOAuthClient, authorizeClient, logIn gotrue/test/src/gotrue_oauth_api_test.dart
exp, iat expiresAt, issuedAt gotrue session, claims, and token refresh tests
capturedOpts, opts capturedOptions, options realtime_client/test/channel_test.dart
tParams channelConfig realtime_client/test/socket_test.dart
sub subscription supabase_common/test/supabase_common_test.dart
objectInfo objectMetadata storage_client/test/client_test.dart

Examples

Current New Where
args, flutterArgs arguments, flutterArguments examples/launcher
_parseEnv _parseEnvironment examples/launcher/lib/launcher.dart
msg message packages/realtime_client/example/main.dart
str jsonString yet_another_json_isolate example

Deviations from the ticket

  • curPresences is remainingPresences, not currentPresences. In syncDiff the enclosing scope already declares currentPresences, and curPresences is the filtered subset of it that has to be re-inserted, so the ticket's name would have been a self-referencing redeclaration. remainingPresences says what it holds.
  • The four catch (e) clauses in the supabase_flutter example never read the caught value, so they became catch (_) rather than declaring an unused error.
  • Three abbreviations outside the ticket's inventory were included because they sit squarely in its stated scope: qs to queryParameters in gotrue fetch.dart, and the (val) closure parameters in realtime transformers.dart and a functions_client doc comment.

Left alone as out of scope: the public opts on SupabaseClient.channel / RealtimeChannel.track / untrack, rpc(String fn), JwtPayload.exp / iat, validateExp, test env locals, single-letter closure parameters, and wire or third-party names.

Testing

dart analyze is clean across packages and examples, and all nine test suites pass against a local Supabase stack: gotrue (458), storage_client (220), realtime_client (211), postgrest (196), supabase (134), supabase_common (79), supabase_flutter (76), functions_client (48), yet_another_json_isolate (27).

Resolves SDK-1480.

Summary by CodeRabbit

  • Refactor

    • Improved naming consistency and readability across authentication, database, realtime, storage, networking, and JSON utilities.
    • Clarified parameter names in public APIs without changing their behavior.
    • Standardized error, response, query-parameter, and JWT terminology.
  • Tests

    • Updated test fixtures, variables, and assertions to match the clearer terminology.
    • Existing coverage and runtime behavior remain unchanged.
  • Documentation

    • Refined examples and inline documentation for consistency and clarity.

@spydon
spydon requested a review from a team as a code owner August 13, 2026 15:17
@coderabbitai

coderabbitai Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@spydon, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 3 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 09319a58-ceab-4853-a186-5d94ee40c0b5

📥 Commits

Reviewing files that changed from the base of the PR and between 02170e9 and 2a2deb9.

📒 Files selected for processing (13)
  • packages/realtime_client/lib/src/transformers.dart
  • packages/supabase/lib/src/supabase_client.dart
  • packages/supabase_auth/lib/src/auth_client.dart
  • packages/supabase_auth/lib/src/constants.dart
  • packages/supabase_auth/lib/src/fetch.dart
  • packages/supabase_auth/lib/src/helper.dart
  • packages/supabase_auth/test/get_claims_test.dart
  • packages/supabase_auth/test/src/auth_oauth_api_test.dart
  • packages/supabase_auth/test/src/set_session_test.dart
  • packages/supabase_auth/test/src/token_refresh_race_test.dart
  • packages/supabase_auth/test/src/types/session_test.dart
  • packages/supabase_common/test/timestamp_test.dart
  • packages/supabase_flutter/lib/src/supabase_auth.dart

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 434f8759-a396-486c-bb7a-b8d2ab0518bf

📥 Commits

Reviewing files that changed from the base of the PR and between 563b502 and 02170e9.

📒 Files selected for processing (38)
  • examples/launcher/bin/examples_launcher.dart
  • examples/launcher/lib/launcher.dart
  • packages/functions_client/lib/src/functions_client.dart
  • packages/gotrue/lib/src/constants.dart
  • packages/gotrue/lib/src/fetch.dart
  • packages/gotrue/lib/src/gotrue_client.dart
  • packages/gotrue/lib/src/helper.dart
  • packages/gotrue/test/get_claims_test.dart
  • packages/gotrue/test/src/gotrue_oauth_api_test.dart
  • packages/gotrue/test/src/set_session_test.dart
  • packages/gotrue/test/src/token_refresh_race_test.dart
  • packages/gotrue/test/src/types/session_test.dart
  • packages/postgrest/example/main.dart
  • packages/postgrest/lib/src/postgrest_builder.dart
  • packages/postgrest/lib/src/postgrest_query_builder.dart
  • packages/postgrest/lib/src/postgrest_transform_builder.dart
  • packages/postgrest/lib/src/response_postgrest_builder.dart
  • packages/realtime_client/example/main.dart
  • packages/realtime_client/lib/src/push.dart
  • packages/realtime_client/lib/src/realtime_channel.dart
  • packages/realtime_client/lib/src/realtime_client.dart
  • packages/realtime_client/lib/src/realtime_presence.dart
  • packages/realtime_client/lib/src/retry_timer.dart
  • packages/realtime_client/lib/src/transformers.dart
  • packages/realtime_client/lib/src/types.dart
  • packages/realtime_client/test/channel_test.dart
  • packages/realtime_client/test/socket_test.dart
  • packages/storage_client/lib/src/fetch.dart
  • packages/storage_client/lib/src/storage_file_api.dart
  • packages/storage_client/test/client_test.dart
  • packages/supabase/lib/src/supabase_client.dart
  • packages/supabase_common/lib/src/retry.dart
  • packages/supabase_common/lib/src/snake_case.dart
  • packages/supabase_common/test/supabase_common_test.dart
  • packages/supabase_flutter/example/lib/main.dart
  • packages/supabase_flutter/lib/src/supabase_auth.dart
  • packages/yet_another_json_isolate/example/yet_another_json_isolate_example.dart
  • packages/yet_another_json_isolate/lib/src/_isolates_io.dart

📝 Walkthrough

Walkthrough

This pull request replaces abbreviated identifiers with descriptive names across the launcher and Supabase Dart packages. It updates request variables, exception bindings, helper names, JWT claim locals, retry callbacks, test fixtures, and documentation examples without changing runtime behavior.

Changes

Descriptive naming cleanup

Layer / File(s) Summary
Launcher argument and environment naming
examples/launcher/...
Renames launcher arguments, Flutter argument locals, and the environment parser helper.
Functions and GoTrue request naming
packages/functions_client/..., packages/gotrue/lib/...
Renames request-body, query-parameter, response, JWT claim, and exception variables.
GoTrue test naming
packages/gotrue/test/...
Renames JWT timestamp locals and OAuth fixture helper methods.
PostgREST naming
packages/postgrest/...
Renames request, regular-expression, stack-trace, and documentation example variables.
Realtime naming
packages/realtime_client/...
Renames push state, channel options, retry callbacks, presence variables, transformer locals, and test fixtures.
Shared, storage, Supabase, and example naming
packages/supabase_common/..., packages/storage_client/..., packages/supabase/..., packages/supabase_flutter/..., packages/yet_another_json_isolate/...
Renames retry, utility, error, metadata, OAuth response, and JSON output variables. Unused example catch parameters are replaced with catch (_).

Estimated code review effort: 2 (Simple) | ~15 minutes

Mergeability Score: ⚪ Minimal · up to 02170

This change only expands internal names and test/example identifiers without altering public APIs or wire formats; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: tr00d

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the abbreviation-expansion changes across internal code, tests, and examples.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch lukasklingsbo/sdk-1480-spell-out-abbreviations-in-internal-code-tests-and-examples

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.

spydon added 2 commits August 14, 2026 10:36
Non-breaking counterpart to SDK-1479: renames abbreviations in private
members, @internal declarations, tests, and example apps. No public API
changes.

Package internals:
- StackTrace stack -> stackTrace (postgrest, storage, gotrue, yaji)
- catch (e) -> catch (error), or catch (_) where the value was unused
- res -> response, bodyStr -> bodyString, qs -> queryParameters
- opts -> options on the @internal RealtimeChannel.send
- val -> value on the @internal fromString methods
- fn -> action in supabase_common retry
- _receivedResp / _recHooks -> _receivedResponse / _receiveHooks
- timerCalc -> timerCalculation, bindingsLen -> bindingsLength
- lastIdx / valTrim -> lastIndex / trimmedValue
- obj1 / obj2 -> first / second, obj -> presencesByKey
- curPresences / curPresenceRefs -> current…
- _handleRes -> _handleResponse, pChar / char -> previousCharacter / character
- …Params locals and private members -> …Parameters
- exp / iat locals -> expiresAt / issuedAt
- re -> whitespaceRegularExpression

Tests:
- sut and sut* helpers -> client, createOAuthClient, authorizeClient, logIn
- exp / iat -> expiresAt / issuedAt
- capturedOpts / opts -> capturedOptions / options
- tParams -> channelConfig, sub -> subscription, objectInfo -> objectMetadata

Examples:
- args / flutterArgs -> arguments / flutterArguments
- _parseEnv -> _parseEnvironment, msg -> message, str -> jsonString
@spydon
spydon force-pushed the lukasklingsbo/sdk-1480-spell-out-abbreviations-in-internal-code-tests-and-examples branch from 02170e9 to 2a2deb9 Compare August 14, 2026 08:37
@spydon
spydon merged commit 7a330d7 into main Aug 14, 2026
40 checks passed
@spydon
spydon deleted the lukasklingsbo/sdk-1480-spell-out-abbreviations-in-internal-code-tests-and-examples branch August 14, 2026 08:43
spydon added a commit that referenced this pull request Aug 14, 2026
## What kind of change does this PR introduce?

Breaking change, refactor. Closes SDK-1479.

## What is the current behavior?

A repository-wide sweep found public identifiers that still use
abbreviations: `setAuth`, `queryParams`, `opts`, `vsn`,
`heartbeatIntervalMs`, the Iceberg `spec` cluster, and more.

## What is the new behavior?

They are spelled out, continuing the precedent set by `conn` to
`connection`.

**The wire format is untouched.** Wherever a JSON key, query parameter
or URL path matched the abbreviation, only the Dart identifier is
renamed and the literal key stays: `vsn`, `presence_ref`,
`iss`/`sub`/`aud`/`exp`/`nbf`/`iat`/`jti`, `kty`/`key_ops`/`alg`/`kid`,
`authorization_params`, `token_endpoint_auth_method`, `sseType`,
`spec-id`, `spec-ids`, `default-spec-id`, `partition-specs`, `refs`,
`doc`, `timestamp-ms`, `max-ref-age-ms`, `max-snapshot-age-ms`,
`last-updated-ms`, and the `/object/info/` path.

### Highlights

Across every package: `setAuth()` → `setAccessToken()`, `queryParams:` →
`queryParameters:`, `opts:` → `options:`, `PresenceOpts` →
`PresenceOptions`, and
`appendSearchParams`/`overrideSearchParams`/`toQueryParams` →
`…Parameters`.

`realtime_client`: `params` → `parameters`, `endPoint`/`endPointURL` →
`endpoint`/`endpointUrl`, `wsCloseNormal` → `webSocketCloseNormal`,
`RealtimeProtocolVersion.vsn` → `wireVersion`, `Presence.presenceRef` →
`presenceReference`, and the `RealtimeChannel` constructor takes
`config:` instead of `params:` (it always took a
`RealtimeChannelConfig`).

`supabase_auth`: the JWT claim and header fields spell out their names,
`User.aud` → `audience`, the four `…Params` option classes become
`…Options`, `validateExp` → `validateExpiration`, `AMRMethod`/`AMREntry`
→ `AuthenticationMethodReference`/`AuthenticationMethodReferenceEntry`.

`storage_client`: `StorageFileApi.info()` → `getMetadata()`, `sseType` →
`serverSideEncryptionType`, the Iceberg `spec` cluster becomes
`…Specification…`, `TableField.doc` → `documentation`,
`TableMetadata.refs` → `references`.

### Enums use the built-in `name`

`AuthChangeEvent.jsName` is gone rather than renamed: the enum declares
`name` itself, so `AuthChangeEvent.signedIn.name` is `'SIGNED_IN'`, the
value it always sent. The internal `fromString` therefore matches on the
wire value; writer and reader both use `.name`, so nothing round-trips
differently.

`TableSnapshotScope` drops its redundant `value` field, since `all` and
`refs` already match what the catalog expects, and `.name` returns the
same string.

### Type changes

`RealtimeClient.heartbeatInterval` and the function returned by
`reconnectAfter` use `Duration` instead of millisecond counts, and the
Iceberg fields that carried an `Ms` suffix drop it for `Duration`
(`maxReferenceAge`, `maxSnapshotAge`) or `DateTime`
(`Snapshot.timestamp`, `TableMetadata.lastUpdated`).

### Deliberately not renamed

`JWK`/`JWKSet` (more common than spelling them out), `PlatformInfo`,
`uuidRegex`, `YAJsonIsolate` (matches its package),
`RealtimeLogLevel.warn` (the wire value), and the `signup`/`magiclink`
enum values on `GenerateLinkType`/`OtpType` (their `snakeCase` already
produces the wire value). Also `rpc(String fn, {params})`, the PostgREST
operator family and `PostgresChangeFilterType`, for cross-SDK parity.

## Additional context

`MIGRATION.md` gains a section listing every rename, and
`sdk-compliance.yaml` is reconciled. The three supabase/sdk checks
(`check-api-symbols`, `check-drift`, `validate-compliance`) pass
locally, as do `dart analyze`, `dart format`, `dcm analyze` and every
package's test suite against a local Supabase stack.

Internal identifiers, tests and examples landed separately in #1709
(SDK-1480), which this branch is rebased on top of.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Added utilities for converting millisecond values into UTC timestamps
and `Duration` values.
  - Added migration guidance for updated public API names and types.

- **Breaking Changes**
- Replaced abbreviated public identifiers with descriptive names across
authentication, realtime, storage, PostgREST, functions, and shared
models.
  - Authentication token setters now use `setAccessToken`.
- Realtime timing options use `Duration`, and timestamp fields use
`DateTime`.
  - JSON, URL, query, and wire-format names remain unchanged.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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.

2 participants