Skip to content

Conversation

@IanCal
Copy link
Contributor

@IanCal IanCal commented Dec 16, 2025

This lets us turn off system cards entirely, and allows a quick way of quieting the tests.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 21 to 25
loggedInAs: '@testuser:localhost',
activeRealms: [testRealmURL],
autostart: true,
systemCardAccountData: { id: null },
});

Choose a reason for hiding this comment

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

P1 Badge Null systemCardAccountData breaks type checks

The new test passes systemCardAccountData: { id: null } into setupMockMatrix, but Config.systemCardAccountData is still typed { id?: string } in tests/helpers/mock-matrix.ts (line 26). With strictNullChecks enabled in packages/host/tsconfig.json, this value is not assignable and pnpm lint:glint/TypeScript compilation of the host tests will fail before runtime. Please allow null in the config type (or avoid passing it) so the test suite continues to type-check.

Useful? React with 👍 / 👎.

@github-actions
Copy link

Preview deployments

@github-actions
Copy link

Host Test Results

    1 files  ± 0      1 suites  ±0   1h 31m 0s ⏱️ + 2m 26s
1 763 tests +49  1 747 ✅ +49  13 💤 ±0  0 ❌ ±0  3 🔥 ±0 
1 777 runs  +49  1 758 ✅ +51  13 💤 ±0  3 ❌  - 1  3 🔥  - 1 

For more details on these errors, see this check.

Results for commit 357b817. ± Comparison against base commit f30d04d.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enables explicit null values for the system card configuration to completely disable system cards, primarily to quiet test output. The change distinguishes between undefined (use default) and null (no system card).

Key Changes:

  • Updated the setSystemCard method to handle null as an explicit signal to remove the system card
  • Modified type signatures to allow id?: string | null in the system card account data configuration
  • Added test configuration to use { id: null } to disable system cards in tests

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/host/app/services/matrix-service.ts Implements null handling in setSystemCard to explicitly disable system cards when null is provided
packages/host/tests/helpers/mock-matrix.ts Updates the Config type to allow null values for the system card id
packages/host/tests/integration/commands/open-workspace-test.gts Configures the test to use systemCardAccountData: { id: null } to disable system cards

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1950 to +1959
private async setSystemCard(systemCardId: string | undefined | null) {
// Set the system card to use
// If there is none, we fall back to the default
// If it is null, we remove any current system card
// If it is undefined, we fall back to the default
if (systemCardId === null) {
// explicit null means no system card
this.store.dropReference(this._systemCard?.id);
this._systemCard = undefined;
return;
}
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

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

The setUserSystemCard function (line 1979) should also accept null as a parameter to allow users to explicitly disable the system card. Currently, it only accepts string | undefined, which is inconsistent with the private setSystemCard function that now accepts null. This creates an API inconsistency where the internal implementation supports null but the public-facing method doesn't expose this capability.

Copilot uses AI. Check for mistakes.
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