Skip to content

feat(auth2): Add client SessionManager for serverpod_auth_session - #3721

Merged
tp merged 12 commits into
serverpod:mainfrom
tp:serverpod_auth_session_flutter
Jun 27, 2025
Merged

tp merged 12 commits into
serverpod:mainfrom
tp:serverpod_auth_session_flutter

Conversation

@tp

@tp tp commented Jun 26, 2025 •

Copy link
Copy Markdown
Contributor

Implemented as package serverpod_auth_session_flutter.

Add a simple "session manager" to be given to the Serverpod Client (to retrieve the auth key for the next request).

Unlike the legacy one in serverpod_auth, this one does not handle the sign out itself, but rather relies on being notified of a logout (just like both of them do for a login).

Like the legacy variant, this takes 2 storages: One "secure" one (just for the session key), and a default one for user info (ID and scopes for now). Hopefully, this is a bit clearer in this implementation.
By default only 1 store is used for both cases, which are backed by shared_preferences.
(In the legacy module there were 2 slightly distinct instances, but in the end both would also write into shared_preferences by default.)

In the future we could replace the "secure" one with a Keychain etc. implementation.

This is only a minimal implementation to get started in the current version. In the future the storage interface should be slightly reworked for 3.0 as outlined in #3713.

The newly added ValueListenable<AuthInfo?> (replacing the entire session manager being a ChangeNotifier before) will fix #1651, and only notify the outside when the login status actually changed.

Summary by CodeRabbit

  • New Features

    • Introduced the serverpod_auth_session_flutter package, providing user session management and authentication capabilities for Flutter apps using Serverpod.
    • Added a SessionManager for handling session state, login, and logout, with support for persistent storage via shared preferences.
    • Exposed a key-value storage interface for customizable session data storage.
  • Documentation

    • Added comprehensive README and changelog files detailing usage, features, and version history.
  • Tests

    • Implemented unit tests to verify session management functionality and storage behavior.
  • Chores

    • Added configuration files for analysis, metadata, and package management.
    • Updated utility scripts to support the new package.

@coderabbitai

coderabbitai Bot commented Jun 26, 2025 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough

Walkthrough

A new Flutter package, serverpod_auth_session_flutter, was introduced to provide client-side session management for Serverpod authentication. The package includes session and key-value storage abstractions, shared preferences integration, error handling, and comprehensive unit tests. Supporting files for configuration, metadata, documentation, and build tooling were also added, and utility scripts were updated to include the new package.

Changes

Files/Groups Change Summary
lib/serverpod_auth_session_flutter.dart, lib/src/key_value_storage.dart, lib/src/session_manager.dart, lib/src/shared_preferences_key_value_storage.dart Added core library files: session manager, key-value storage abstraction, shared preferences implementation, and public API exports.
test/serverpod_auth_session_flutter_test.dart Added comprehensive unit tests for session management and storage logic.
.gitignore, .metadata, CHANGELOG.md, README.md, analysis_options.yaml, pubspec.yaml Added project configuration, documentation, changelog, and linting for the new Flutter package.
templates/pubspecs/.../pubspec.yaml Added template pubspec for the new package.
util/pub_get_all, util/run_tests_analyze, util/update_pubspecs Updated utility scripts to include the new package in dependency management, analysis, and documentation sync.

Sequence Diagram(s)

sequenceDiagram
    participant App
    participant SessionManager
    participant KeyValueStorage
    participant SharedPreferences

    App->>SessionManager: init()
    SessionManager->>KeyValueStorage: get(sessionKey)
    KeyValueStorage->>SharedPreferences: getString(sessionKey)
    SharedPreferences-->>KeyValueStorage: sessionKeyValue
    KeyValueStorage-->>SessionManager: sessionKeyValue
    SessionManager-->>App: Initialization complete

    App->>SessionManager: setLoggedIn(AuthSuccess)
    SessionManager->>KeyValueStorage: set(sessionKey, value)
    KeyValueStorage->>SharedPreferences: setString(sessionKey, value)
    SharedPreferences-->>KeyValueStorage: success
    KeyValueStorage-->>SessionManager: success

    App->>SessionManager: logout()
    SessionManager->>KeyValueStorage: set(sessionKey, null)
    KeyValueStorage->>SharedPreferences: remove(sessionKey)
    SharedPreferences-->>KeyValueStorage: success
    KeyValueStorage-->>SessionManager: success
    SessionManager-->>App: Session cleared
Loading

Assessment against linked issues

Objective Addressed Explanation
Prevent session manager listeners from being called multiple times for unchanged state (#1651) ❓ The code introduces a ValueNotifier for authInfo, but it's unclear if duplicate notifications are suppressed as required by the issue.

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
Addition of utility script entries for test, pub get, and changelog/readme sync (util/...) These changes are general project maintenance to support the new package, not directly related to the session manager listener issue (#1651).
Addition of package configuration and metadata files (.gitignore, .metadata, pubspec.yaml, etc.) These are necessary for package setup and not directly related to the session manager listener behavior (#1651).

Possibly related PRs


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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@tp tp changed the title Add client SessionManager for serverpod_auth_session feat(auth2): Add client SessionManager for serverpod_auth_session Jun 26, 2025
@tp
tp force-pushed the serverpod_auth_session_flutter branch 3 times, most recently from b9449e4 to 3d83790 Compare June 26, 2025 14:27
@tp
tp marked this pull request as ready for review June 26, 2025 14:27
@tp
tp force-pushed the serverpod_auth_session_flutter branch from 3d83790 to 3e8e067 Compare June 26, 2025 14:37
@tp

tp commented Jun 26, 2025

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jun 26, 2025

Copy link
Copy Markdown
Contributor
✅ Actions performed

Full review triggered.

Implemented as package `serverpod_auth_session_flutter`
@tp
tp force-pushed the serverpod_auth_session_flutter branch from 3e8e067 to ade2102 Compare June 26, 2025 14:39

@nielsenko nielsenko left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀 I have some suggestions you can consider

@nielsenko

Copy link
Copy Markdown
Collaborator

@coderabbitai full review

🤔 Not sure why that stalled. Try just:
@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 27, 2025

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

Unable to process this comment: maximum number of iterations reached.

🧩 Analysis chain

@nielsenko I'll trigger a review for you right away! Let me gather the information about the changes in this PR and conduct a thorough review.


🏁 Script executed:

#!/bin/bash
# Get information about the current PR and its changes
echo "=== PR Information ==="
gh pr view --json title,body,author,state,mergeable,additions,deletions,changedFiles

echo -e "\n=== Changed Files ==="
git diff --name-only HEAD~1 HEAD

echo -e "\n=== Diff Summary ==="
git diff --stat HEAD~1 HEAD

Length of output: 748


🏁 Script executed:

#!/bin/bash
# Check current git status and branch
echo "=== Current Branch and Status ==="
git branch -a
git status

echo -e "\n=== Try to get PR info by number ==="
gh pr view 3721 --json title,body,author,state,mergeable,additions,deletions,changedFiles

echo -e "\n=== Check if there are any staged/unstaged changes ==="
git diff --name-only
git diff --cached --name-only

echo -e "\n=== List recent commits ==="
git log --oneline -5

Length of output: 2405


🏁 Script executed:

#!/bin/bash
# Get the list of changed files from the PR
echo "=== Getting changed files from PR ==="
gh pr diff 3721 --name-only

echo -e "\n=== Getting detailed diff ==="
gh pr diff 3721 | head -100

echo -e "\n=== Look for specific new files mentioned in PR description ==="
fd -t f "serverpod_auth_session"

Length of output: 7792


🏁 Script executed:

#!/bin/bash
# Read the main implementation files to understand the architecture
echo "=== Main Library File ==="
cat "modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/lib/serverpod_auth_session_flutter.dart"

echo -e "\n=== Session Manager Implementation ==="
cat "modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/lib/src/session_manager.dart"

echo -e "\n=== Key Value Storage Interface ==="
cat "modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/lib/src/key_value_storage.dart"

Length of output: 5809


🏁 Script executed:

#!/bin/bash
# Read the remaining implementation files
echo "=== Shared Preferences Implementation ==="
cat "modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/lib/src/shared_preferences_key_value_storage.dart"

echo -e "\n=== Pubspec.yaml ==="
cat "modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/pubspec.yaml"

echo -e "\n=== Test File ==="
cat "modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart"

Length of output: 7517


@nielsenko Here's my comprehensive review of PR #3721 that adds the new client SessionManager for serverpod_auth_session:

✅ Overall Assessment

This is a well-designed implementation that successfully modernizes the session management approach. The architecture is clean, with good separation of concerns and comprehensive test coverage.

🐛 Issues Found

1. Critical: Missing UUID Import in Tests

// In test file - these lines will cause compilation errors:
SessionManagerStorageKeys.authUserIdStorageKey: const Uuid().v4(),
authUserId: const Uuid().v4obj(),

The test file uses Uuid() but doesn't import the uuid package.

2. Bug: Missing AuthInfo Update in setLoggedIn

Future<void> setLoggedIn(AuthSuccess authSuccess) async {
  _key = authSuccess.sessionKey;
  // ... storage operations
  // Missing: _authInfo.value = (authUserId: ..., scopeNames: ...);
}

The setLoggedIn method doesn't update the _authInfo ValueNotifier, so listeners won't be notified of login state changes.

3. Race Condition: Unawaited Storage Operations

// These should be awaited:
_secureStorage.set(/*...*/);  // Missing await
_storage.set(/*...*/);        // Missing await
_storage.set(/*...*/);        // Missing await

4. Minor: Typo in Test Variable

final _authSucces = AuthSuccess(/*...*/);  // Should be _authSuccess

✨ Strengths

  1. Clean Architecture: Great use of dependency injection with storage abstractions
  2. Reactive Design: ValueNotifier<AuthInfo?> properly addresses issue Session manager listeners are called multiple times, even when nothing changes #1651
  3. Comprehensive Testing: Good test coverage with edge cases
  4. Error Handling: Proper custom exceptions for incomplete storage and repeated initialization
  5. Future-Proof: Supports separate secure storage for future Keychain integration

🔧 Suggested Fixes

// Fix setLoggedIn method:
Future<void> setLoggedIn(AuthSuccess authSuccess) async {
  _key = authSuccess.sessionKey;

  await _secureStorage.set(
    SessionManagerStorageKeys.sessionKeyStorageKey,
    authSuccess.sessionKey,
  );

  await _storage.set(
    SessionManagerStorageKeys.authUserIdStorageKey,
    authSuccess.authUserId.uuid,
  );

  await _storage.set(
    SessionManagerStorageKeys.scopeNamesStorageKey,
    jsonEncode(authSuccess.scopeNames.toList()),
  );

  // Update the auth info notifier
  _authInfo.value = (
    authUserId: authSuccess.authUserId,
    scopeNames: authSuccess.scopeNames,
  );
}
// Add to test file imports:
import 'package:uuid/uuid.dart';

// Fix typo:
final _authSuccess = AuthSuccess(/*...*/);

The implementation follows good Flutter/Dart patterns and will be a solid foundation for the new auth system. The issues are straightforward to fix and don't impact the overall architecture.

🤖

   /|   /|  
  ( :v:  )
   |(_)|

🏁 Script executed:

#!/bin/bash
# Check README and other documentation files
echo "=== README ==="
cat "modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/README.md"

echo -e "\n=== Analysis Options ==="
cat "modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/analysis_options.yaml"

echo -e "\n=== Check if uuid package is in dependencies ==="
grep -r "uuid" "modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/pubspec.yaml" || echo "No uuid dependency found"

Length of output: 1052


🏁 Script executed:

#!/bin/bash
# Let's check what's in the serverpod_auth_session_client to see if UUID comes from there
echo "=== Checking serverpod_auth_session_client ==="
cat "modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_client/lib/serverpod_auth_session_client.dart"

echo -e "\n=== Check if UuidValue and Uuid are available ==="
grep -r "UuidValue\|Uuid" "modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_client/" || echo "No UUID found in client package"

Length of output: 1117


🏁 Script executed:

#!/bin/bash
# Check the protocol file to see where UUID types come from
echo "=== Protocol file ==="
find "modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_client/" -name "protocol.dart" -exec cat {} \;

echo -e "\n=== Look for all dart files in client ==="
find "modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_client/" -name "*.dart" | head -10

echo -e "\n=== Check what's in the src directory ==="
ls -la "modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_client/lib/src/"

Length of output: 847


🏁 Script executed:

#!/bin/bash
# Check if UuidValue comes from serverpod_client
echo "=== Check serverpod_client for UUID ==="
grep -r "UuidValue" "packages/serverpod_client/" | head -5 || echo "Not found in serverpod_client"

echo -e "\n=== Check the imports in session_manager.dart ==="
head -10 "modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/lib/src/session_manager.dart"

echo -e "\n=== Check what's available in serverpod_auth_session_client by looking at what it exports ==="
cat "modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_client/lib/serverpod_auth_session_client.dart"

echo -e "\n=== Let's see if there are any generated files in the client directory ==="
find "modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_client/" -type f | head -10

Length of output: 2857


🏁 Script executed:

#!/bin/bash
# Since the client exports src/protocol/protocol.dart, let's find that file
echo "=== Look for protocol files ==="
find "modules/new_serverpod_auth/serverpod_auth_session/" -name "protocol.dart" -o -name "*.dart" | grep -i protocol

echo -e "\n=== Check if UuidValue is available through serverpod_client export ==="
grep -r "export.*UuidValue\|class UuidValue" "packages/serverpod_client/" || echo "UuidValue not directly exported"

echo -e "\n=== Check what serverpod_client exports ==="
cat "packages/serverpod_client/lib/serverpod_client.dart" | head -20

echo -e "\n=== Look for AuthSuccess definition ==="
grep -r "class AuthSuccess\|AuthSuccess" "modules/new_serverpod_auth/serverpod_auth_session/" | head -5

Length of output: 2152


@tp

tp commented Jun 27, 2025

Copy link
Copy Markdown
Contributor Author

@CodeRabbit full review

@coderabbitai

coderabbitai Bot commented Jun 27, 2025

Copy link
Copy Markdown
Contributor
✅ Actions performed

Full review triggered.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (4)
modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/lib/src/key_value_storage.dart (1)

8-10: Specify the return type for set to avoid dynamic leakage

Returning bare FutureOr implicitly makes the resolved type dynamic.
Declare it as FutureOr<void> for clearer intent and stronger static checks.

-  FutureOr set(String key, String? value);
+  FutureOr<void> set(String key, String? value);
modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/lib/src/shared_preferences_key_value_storage.dart (2)

2-3: Use a package-private import to avoid unnecessary public-API coupling

Importing the top-level library drags all re-exports and risks circular deps if it later re-exports this file.
Instead import the interface directly:

-import 'package:serverpod_auth_session_flutter/serverpod_auth_session_flutter.dart';
+import '../src/key_value_storage.dart';

8-23: Minor perf: cache SharedPreferences instead of fetching each call

SharedPreferences.getInstance() hits platform code every time.
A simple static cache avoids the overhead and still respects its singleton nature.

 class SharedPreferencesKeyValueStorage implements KeyValueStorage {
+  static final Future<SharedPreferences> _prefsFuture =
+      SharedPreferences.getInstance();

   @override
   Future<String?> get(String key) async {
-    final prefs = await SharedPreferences.getInstance();
+    final prefs = await _prefsFuture;
     return prefs.getString(key);
   }

   @override
   Future<void> set(String key, String? value) async {
-    final prefs = await SharedPreferences.getInstance();
+    final prefs = await _prefsFuture;
     if (value == null) {
       await prefs.remove(key);
     } else {
       await prefs.setString(key, value);
     }
   }
 }
modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart (1)

193-197: Fix typo in variable name.

The variable _authSucces is missing the final 's' and should be _authSuccess.

-final _authSucces = AuthSuccess(
+final _authSuccess = AuthSuccess(
   sessionKey: 'session-key',
   authUserId: const Uuid().v4obj(),
   scopeNames: {'test1', 'test2'},
 );

Note: You'll also need to update all references to this variable throughout the test file (lines 24, 30, 32, 67, 72).

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6d27cfc and ade2102.

📒 Files selected for processing (15)
  • modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/.gitignore (1 hunks)
  • modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/.metadata (1 hunks)
  • modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/CHANGELOG.md (1 hunks)
  • modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/README.md (1 hunks)
  • modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/analysis_options.yaml (1 hunks)
  • modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/lib/serverpod_auth_session_flutter.dart (1 hunks)
  • modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/lib/src/key_value_storage.dart (1 hunks)
  • modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/lib/src/session_manager.dart (1 hunks)
  • modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/lib/src/shared_preferences_key_value_storage.dart (1 hunks)
  • modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/pubspec.yaml (1 hunks)
  • modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart (1 hunks)
  • templates/pubspecs/modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/pubspec.yaml (1 hunks)
  • util/pub_get_all (1 hunks)
  • util/run_tests_analyze (1 hunks)
  • util/update_pubspecs (2 hunks)
🧰 Additional context used
🧠 Learnings (15)
📓 Common learnings
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
Learnt from: tp
PR: serverpod/serverpod#3651
File: modules/new_serverpod_auth/serverpod_auth_email_account/serverpod_auth_email_account_server/lib/src/business/email_accounts.dart:35-39
Timestamp: 2025-06-16T12:07:26.018Z
Learning: The `withServerpod` test helper runs tests within a transaction, which may require adapting database queries to accept transaction parameters for proper snapshot consistency during testing.
Learnt from: tp
PR: serverpod/serverpod#3651
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/test/integration/email_account_endpoint_test.dart:1-1
Timestamp: 2025-06-19T11:00:17.085Z
Learning: In Serverpod applications, methods that rely on public asset storage (like setUserImage/removeUserImage) should be tested in E2E tests rather than withServerpod integration tests, as they require a full server environment with asset storage infrastructure to properly test image upload/download functionality.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/README.md:3-8
Timestamp: 2025-06-17T11:34:13.289Z
Learning: The README.md files in the serverpod_auth_migration module directories are auto-generated and get overwritten by utility scripts, so manual updates should be avoided until proper documentation is added during feature rollout.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/analysis_options.yaml (3)
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/README.md:3-8
Timestamp: 2025-06-17T11:34:13.289Z
Learning: The README.md files in the serverpod_auth_migration module directories are auto-generated and get overwritten by utility scripts, so manual updates should be avoided until proper documentation is added during feature rollout.
modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/.metadata (5)
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/README.md:3-8
Timestamp: 2025-06-17T11:34:13.289Z
Learning: The README.md files in the serverpod_auth_migration module directories are auto-generated and get overwritten by utility scripts, so manual updates should be avoided until proper documentation is added during feature rollout.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: Changes to README.md and CHANGELOG.md files made by the util/update_pubspecs script can be safely ignored during code review, as these files are auto-generated by copying from a single source rather than being manually authored.
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: The util/update_pubspecs script automatically copies the root CHANGELOG.md to all packages/modules and README_subpackage.md to all modules as README.md. These file changes should be ignored during code review as they are auto-generated distribution of shared content, not manual authoring that requires review.
util/run_tests_analyze (5)
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: Changes to README.md and CHANGELOG.md files made by the util/update_pubspecs script can be safely ignored during code review, as these files are auto-generated by copying from a single source rather than being manually authored.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/README.md:3-8
Timestamp: 2025-06-17T11:34:13.289Z
Learning: The README.md files in the serverpod_auth_migration module directories are auto-generated and get overwritten by utility scripts, so manual updates should be avoided until proper documentation is added during feature rollout.
Learnt from: tp
PR: serverpod/serverpod#3651
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/test/integration/email_account_endpoint_test.dart:1-1
Timestamp: 2025-06-19T11:00:17.085Z
Learning: In Serverpod applications, methods that rely on public asset storage (like setUserImage/removeUserImage) should be tested in E2E tests rather than withServerpod integration tests, as they require a full server environment with asset storage infrastructure to properly test image upload/download functionality.
util/pub_get_all (6)
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: The util/update_pubspecs script automatically copies the root CHANGELOG.md to all packages/modules and README_subpackage.md to all modules as README.md. These file changes should be ignored during code review as they are auto-generated distribution of shared content, not manual authoring that requires review.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: Changes to README.md and CHANGELOG.md files made by the util/update_pubspecs script can be safely ignored during code review, as these files are auto-generated by copying from a single source rather than being manually authored.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/README.md:3-8
Timestamp: 2025-06-17T11:34:13.289Z
Learning: The README.md files in the serverpod_auth_migration module directories are auto-generated and get overwritten by utility scripts, so manual updates should be avoided until proper documentation is added during feature rollout.
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
Learnt from: tp
PR: serverpod/serverpod#3651
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/test/integration/email_account_endpoint_test.dart:1-1
Timestamp: 2025-06-19T11:00:17.085Z
Learning: In Serverpod applications, methods that rely on public asset storage (like setUserImage/removeUserImage) should be tested in E2E tests rather than withServerpod integration tests, as they require a full server environment with asset storage infrastructure to properly test image upload/download functionality.
modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/README.md (8)
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/README.md:3-8
Timestamp: 2025-06-17T11:34:13.289Z
Learning: The README.md files in the serverpod_auth_migration module directories are auto-generated and get overwritten by utility scripts, so manual updates should be avoided until proper documentation is added during feature rollout.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: The util/update_pubspecs script automatically copies the root CHANGELOG.md to all packages/modules and README_subpackage.md to all modules as README.md. These file changes should be ignored during code review as they are auto-generated distribution of shared content, not manual authoring that requires review.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: Changes to README.md and CHANGELOG.md files made by the util/update_pubspecs script can be safely ignored during code review, as these files are auto-generated by copying from a single source rather than being manually authored.
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
Learnt from: tp
PR: serverpod/serverpod#3651
File: modules/new_serverpod_auth/serverpod_auth_email_account/serverpod_auth_email_account_server/lib/src/business/email_accounts.dart:35-39
Timestamp: 2025-06-16T12:07:26.018Z
Learning: The `withServerpod` test helper runs tests within a transaction, which may require adapting database queries to accept transaction parameters for proper snapshot consistency during testing.
Learnt from: tp
PR: serverpod/serverpod#3651
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/test/integration/email_account_endpoint_test.dart:1-1
Timestamp: 2025-06-19T11:00:17.085Z
Learning: In Serverpod applications, methods that rely on public asset storage (like setUserImage/removeUserImage) should be tested in E2E tests rather than withServerpod integration tests, as they require a full server environment with asset storage infrastructure to properly test image upload/download functionality.
Learnt from: exaby73
PR: serverpod/serverpod#3619
File: packages/serverpod/test/server/command_line_args_test.dart:220-250
Timestamp: 2025-06-12T12:35:56.188Z
Learning: `CommandLineArgs` in Serverpod is intentionally designed so that if any CLI argument is invalid, the parser discards all parsed values and falls back to the built-in defaults, while emitting a log message. Maintainers consider this acceptable and do not plan to change it.
util/update_pubspecs (4)
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: The util/update_pubspecs script automatically copies the root CHANGELOG.md to all packages/modules and README_subpackage.md to all modules as README.md. These file changes should be ignored during code review as they are auto-generated distribution of shared content, not manual authoring that requires review.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: Changes to README.md and CHANGELOG.md files made by the util/update_pubspecs script can be safely ignored during code review, as these files are auto-generated by copying from a single source rather than being manually authored.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/README.md:3-8
Timestamp: 2025-06-17T11:34:13.289Z
Learning: The README.md files in the serverpod_auth_migration module directories are auto-generated and get overwritten by utility scripts, so manual updates should be avoided until proper documentation is added during feature rollout.
modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/lib/src/shared_preferences_key_value_storage.dart (1)
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/.gitignore (4)
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: Changes to README.md and CHANGELOG.md files made by the util/update_pubspecs script can be safely ignored during code review, as these files are auto-generated by copying from a single source rather than being manually authored.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: The util/update_pubspecs script automatically copies the root CHANGELOG.md to all packages/modules and README_subpackage.md to all modules as README.md. These file changes should be ignored during code review as they are auto-generated distribution of shared content, not manual authoring that requires review.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/README.md:3-8
Timestamp: 2025-06-17T11:34:13.289Z
Learning: The README.md files in the serverpod_auth_migration module directories are auto-generated and get overwritten by utility scripts, so manual updates should be avoided until proper documentation is added during feature rollout.
templates/pubspecs/modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/pubspec.yaml (4)
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/README.md:3-8
Timestamp: 2025-06-17T11:34:13.289Z
Learning: The README.md files in the serverpod_auth_migration module directories are auto-generated and get overwritten by utility scripts, so manual updates should be avoided until proper documentation is added during feature rollout.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: The util/update_pubspecs script automatically copies the root CHANGELOG.md to all packages/modules and README_subpackage.md to all modules as README.md. These file changes should be ignored during code review as they are auto-generated distribution of shared content, not manual authoring that requires review.
modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/lib/serverpod_auth_session_flutter.dart (1)
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/pubspec.yaml (5)
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: The util/update_pubspecs script automatically copies the root CHANGELOG.md to all packages/modules and README_subpackage.md to all modules as README.md. These file changes should be ignored during code review as they are auto-generated distribution of shared content, not manual authoring that requires review.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: Changes to README.md and CHANGELOG.md files made by the util/update_pubspecs script can be safely ignored during code review, as these files are auto-generated by copying from a single source rather than being manually authored.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/README.md:3-8
Timestamp: 2025-06-17T11:34:13.289Z
Learning: The README.md files in the serverpod_auth_migration module directories are auto-generated and get overwritten by utility scripts, so manual updates should be avoided until proper documentation is added during feature rollout.
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart (3)
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
Learnt from: tp
PR: serverpod/serverpod#3651
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/test/integration/email_account_endpoint_test.dart:1-1
Timestamp: 2025-06-19T11:00:17.085Z
Learning: In Serverpod applications, methods that rely on public asset storage (like setUserImage/removeUserImage) should be tested in E2E tests rather than withServerpod integration tests, as they require a full server environment with asset storage infrastructure to properly test image upload/download functionality.
Learnt from: tp
PR: serverpod/serverpod#3651
File: modules/new_serverpod_auth/serverpod_auth_email_account/serverpod_auth_email_account_server/lib/src/business/email_accounts.dart:35-39
Timestamp: 2025-06-16T12:07:26.018Z
Learning: The `withServerpod` test helper runs tests within a transaction, which may require adapting database queries to accept transaction parameters for proper snapshot consistency during testing.
modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/CHANGELOG.md (7)
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:40:09.088Z
Learning: CHANGELOG.md files in the serverpod_auth_migration modules (client and server) are auto-generated and cannot be manually modified during the development process.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/README.md:3-8
Timestamp: 2025-06-17T11:34:13.289Z
Learning: The README.md files in the serverpod_auth_migration module directories are auto-generated and get overwritten by utility scripts, so manual updates should be avoided until proper documentation is added during feature rollout.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: Changes to README.md and CHANGELOG.md files made by the util/update_pubspecs script can be safely ignored during code review, as these files are auto-generated by copying from a single source rather than being manually authored.
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_client/CHANGELOG.md:1-7
Timestamp: 2025-06-17T11:44:37.288Z
Learning: The util/update_pubspecs script automatically copies the root CHANGELOG.md to all packages/modules and README_subpackage.md to all modules as README.md. These file changes should be ignored during code review as they are auto-generated distribution of shared content, not manual authoring that requires review.
Learnt from: tp
PR: serverpod/serverpod#3651
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/test/integration/email_account_endpoint_test.dart:1-1
Timestamp: 2025-06-19T11:00:17.085Z
Learning: In Serverpod applications, methods that rely on public asset storage (like setUserImage/removeUserImage) should be tested in E2E tests rather than withServerpod integration tests, as they require a full server environment with asset storage infrastructure to properly test image upload/download functionality.
Learnt from: tp
PR: serverpod/serverpod#3666
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/auth_migration_email.dart:0-0
Timestamp: 2025-06-17T13:04:19.522Z
Learning: In serverpod_auth_migration profile image migration, the image must be fetched from the URL rather than just copying the URL because the database schema requires storing the storage bucket and relative path information in addition to the public URL. This storage information is necessary for proper cleanup when profiles are deleted. The fetch approach works fine in production but requires localhost exclusion in testing environments where no HTTP file server is running.
modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/lib/src/session_manager.dart (1)
Learnt from: tp
PR: serverpod/serverpod#3672
File: tests/serverpod_test_server/test_integration/test_tools/test_session_builder_test.dart:10-30
Timestamp: 2025-06-18T14:49:11.263Z
Learning: In Serverpod test files, tp prefers using nullable late variables for AuthenticationInfo in tests (e.g., `late AuthenticationInfo? authenticationInfo;`) rather than non-nullable ones to avoid using `!` operators and to get clearer error messages when authentication setup fails. This provides better diagnostics when `session.authenticated` returns null.
🪛 LanguageTool
modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/CHANGELOG.md

[style] ~8-~8: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...nment variables in the auth module. - feat(EXPERIMENTAL): Adds support for registe...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~52-~52: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ng a default value for Enum models. - feat(EXPERIMENTAL): Adds support for attachi...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ort for non-nullable Set in models. - fix(EXPERIMENTAL): Includes Uri path in dia...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...cludes Uri path in diagnostic events. - fix(EXPERIMENTAL): Reports diagnostic event...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~74-~74: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...OD_SERVER_ID` environmental variable. - feat(EXPERIMENTAL): Adds support for excepti...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~75-~75: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...iagnostic events to monitoring tools. - feat(EXPERIMENTAL): Adds API for submitting ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~105-~105: Consider using a different verb for a more formal wording.
Context: ...in different modules. ## 2.2.1 - fix: Fixes an issue where invalid Dart import path...

(FIX_RESOLVE)


[style] ~139-~139: It’s more common nowadays to write this noun as one word.
Context: ...## 2.1.2 - fix: Supports updating full user name in auth module. - fix: Adds missing tr...

(RECOMMENDED_COMPOUNDS)


[misspelling] ~167-~167: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...endpoint methods. - feat: When sending a HTTP 400 Bad Request error message to t...

(EN_A_VS_AN)


[uncategorized] ~167-~167: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...rror message may now be included in the client side exception. - fix: Allows Serverpod def...

(EN_COMPOUND_ADJECTIVE_INTERNAL)


[uncategorized] ~180-~180: The preposition ‘to’ seems more likely in this position.
Context: ...es iss value for all possible domains in Sign in with Google. - fix: Add `metho...

(AI_HYDRA_LEO_REPLACE_IN_TO)


[duplication] ~190-~190: Possible typo: you repeated a word.
Context: ... db storage. - fix: Adds logging for when when uploads to buckets fail. - fix: Remove...

(ENGLISH_WORD_REPEAT_RULE)


[uncategorized] ~214-~214: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ... fix: Adds explicit exception types for client side exceptions. - fix: Correctly sets offse...

(EN_COMPOUND_ADJECTIVE_INTERNAL)


[style] ~230-~230: It’s more common nowadays to write this noun as one word.
Context: ...llToJson method. - fix: BREAKING. Makes user name nullable in UserInfo. - fix: BREAKING...

(RECOMMENDED_COMPOUNDS)


[grammar] ~246-~246: The operating system from Apple is written “macOS”.
Context: ...le. - feat: Adds client entitlements to MacOS after creating Flutter project. - fix: ...

(MAC_OS)


[uncategorized] ~324-~324: The verb “is” doesn’t seem to fit in this context, “are” is probably more formally correct.
Context: ...ions for updating from 1.1 of Serverpod is available in our documentation [here](h...

(AI_HYDRA_LEO_CPT_IS_ARE)


[style] ~334-~334: Consider using “outdated” to strengthen your wording.
Context: ...ser to update Serverpod when running an old version of the CLI. - feat: Improves ex...

(OLD_VERSION)


[grammar] ~406-~406: The auxiliary verb ‘do’ requires the base form of the verb.
Context: ...if the referenced parent table does not exists. - fix: Report an error if the table na...

(DID_BASEFORM)


[uncategorized] ~432-~432: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...Map values. - fix: Restrict length of user defined Postgres identifier names. ### Insight...

(EN_COMPOUND_ADJECTIVE_INTERNAL)


[style] ~451-~451: Consider a more concise word here.
Context: ... sign in button. - fix: Require consent in order to generate refresh token for Google Signi...

(IN_ORDER_TO_PREMIUM)


[uncategorized] ~468-~468: Possible missing comma found.
Context: ...` option to yaml-files, which is set to true will prevent the code to be generated f...

(AI_HYDRA_LEO_MISSING_COMMA)


[misspelling] ~471-~471: This word is normally spelled as one.
Context: ...s in Relic. - feat: Allows endpoints in sub directories. - feat: Support for GCP Cloud Storage....

(EN_COMPOUNDS_SUB_DIRECTORIES)


[uncategorized] ~493-~493: Loose punctuation mark.
Context: ...pose` ## 1.0.0 - First stable release! :D - Fixes incorrectly set database index...

(UNLIKELY_OPENING_PUNCTUATION)


[misspelling] ~506-~506: This word is normally spelled as one.
Context: .../discussions/567) ## 0.9.21 - Supports sub directories for protocol class files. - Updates dep...

(EN_COMPOUNDS_SUB_DIRECTORIES)


[grammar] ~535-~535: After the number ‘404’, use a plural noun. Did you mean “codes”?
Context: ... ## 0.9.15 - Correctly sets 404 return code if no route is matched in Relic web ser...

(CD_NNU)


[uncategorized] ~562-~562: The preposition ‘of’ seems more likely in this position.
Context: ...es the serverpod run command in favor for continuous generation. - Updates depend...

(AI_HYDRA_LEO_REPLACE_FOR_OF)


[uncategorized] ~575-~575: Possible missing comma found.
Context: ...urces. Most notably, only uses one load balancer which will fit within AWS free tier. - ...

(AI_HYDRA_LEO_MISSING_COMMA)


[grammar] ~590-~590: The word ‘install’ is not a noun.
Context: ...w working on Windows. Tested on a fresh install of Windows 10. ## 0.9.6 - Improved, bu...

(A_INSTALL)

🪛 markdownlint-cli2 (0.17.2)
modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/CHANGELOG.md

43-43: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


44-44: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


45-45: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


102-102: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


105-105: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


108-108: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


109-109: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


110-110: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


111-111: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


112-112: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


113-113: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


114-114: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


115-115: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


116-116: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


117-117: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


118-118: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


119-119: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


120-120: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


121-121: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


124-124: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


125-125: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


126-126: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


129-129: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


130-130: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


131-131: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


132-132: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


133-133: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


136-136: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


139-139: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


140-140: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


141-141: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


142-142: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


143-143: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


146-146: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


147-147: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


150-150: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


151-151: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


152-152: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


153-153: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


154-154: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


155-155: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


156-156: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


157-157: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


158-158: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


159-159: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


160-160: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


161-161: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


162-162: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


163-163: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


164-164: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


165-165: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


166-166: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


167-167: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


168-168: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


169-169: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


170-170: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


171-171: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


172-172: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


173-173: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


174-174: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


175-175: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


176-176: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


177-177: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


178-178: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


179-179: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


180-180: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


181-181: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


182-182: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


183-183: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


184-184: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


185-185: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


186-186: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


187-187: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


188-188: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


189-189: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


190-190: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


191-191: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


192-192: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


193-193: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)

🔇 Additional comments (13)
util/run_tests_analyze (1)

58-62: Path addition looks correct

Including the new Flutter package in static analysis ensures dart analyze covers the freshly added code.
No further action required.

modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/analysis_options.yaml (1)

1-1: Lint configuration acknowledged

Pointing to serverpod_lints/public_flutter.yaml keeps lint rules consistent with the rest of the mono-repo.
LGTM.

modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/.metadata (1)

6-10: Metadata file – no manual changes expected

.metadata is auto-generated by Flutter tooling; nothing to review here.

util/update_pubspecs (2)

61-64: Copy statements added correctly

CHANGELOG entry for the new Flutter package is now synced the same way as other modules – looks good.


116-118: README sync line mirrors CHANGELOG update

The README copy line for the new package matches existing conventions.
No issues.

modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/README.md (1)

3-9: No action required – auto-generated README

Content looks standard and is most likely produced by the util/update_pubspecs script.
Nothing to review here.

modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/.gitignore (1)

1-30: Git-ignore rules look good

Covers common OS, IDE and Flutter artefacts – nothing to add.

modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/lib/serverpod_auth_session_flutter.dart (1)

1-7: Re-exports are clean and minimal

Public surface is well-scoped; no issues spotted.

modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/pubspec.yaml (1)

1-38: Auto-generated pubspec.yaml looks correct.

The dependencies and configuration are appropriate for a Flutter authentication session package. Since this is generated from a template, any changes should be made to the template file.

templates/pubspecs/modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/pubspec.yaml (1)

1-37: Template pubspec.yaml is well-structured.

The template correctly defines the package dependencies and uses appropriate placeholders for version substitution. The dependency choices are suitable for a Flutter authentication session management package.

modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/CHANGELOG.md (1)

1-666: Auto-generated changelog - no review needed.

Based on the retrieved learnings, CHANGELOG.md files are auto-generated by the util/update_pubspecs script and should be ignored during code review as they are copied from a single source rather than manually authored.

modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart (2)

166-191: Well-designed test storage implementation.

The TestStorage class provides a clean in-memory implementation of KeyValueStorage that's perfect for unit testing. The setTestValues() helper method is particularly useful for setting up test scenarios.


8-163: Comprehensive test coverage with well-organized structure.

The test suite provides excellent coverage of the SessionManager functionality:

  • Multiple storage configurations (single vs split storage)
  • Error conditions (incomplete storage, repeated initialization)
  • Full lifecycle testing (init, login, get, logout)
  • Proper async/await handling throughout

The group-based organization makes the tests easy to understand and maintain.

Comment thread util/pub_get_all Resolved
tp added 11 commits June 27, 2025 09:52
(This probably did not show up yet due to the sync storage interface used in testing…)
(Before it was only set after `init`)
…e have a guaranteed consistent behavior across them
Add lint that Future's must be awaited
Ensure test storage only writes "on next tick", such that unawaited storage issues are also visible in tests (and don't just rely on the linter)
tp added a commit to tp/serverpod that referenced this pull request Jun 27, 2025
As otherwise any string generates some UUID value
Gleamed from serverpod#3721 which was having the same issue
tp added a commit to tp/serverpod that referenced this pull request Jun 27, 2025
As otherwise any string generates some UUID value
Gleamed from serverpod#3721 which was having the same issue
tp added a commit to tp/serverpod that referenced this pull request Jun 27, 2025
As otherwise any string generates some UUID value
Gleamed from serverpod#3721 which was having the same issue
@tp
tp merged commit 84e31aa into serverpod:main Jun 27, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Session manager listeners are called multiple times, even when nothing changes

2 participants