Skip to content

chore: remove 1-19 upgrade commands and navigation menu item feature flags#19083

Merged
charlesBochet merged 8 commits intomainfrom
remove-1-19-commands-and-nav-flags
Mar 30, 2026
Merged

chore: remove 1-19 upgrade commands and navigation menu item feature flags#19083
charlesBochet merged 8 commits intomainfrom
remove-1-19-commands-and-nav-flags

Conversation

@charlesBochet
Copy link
Copy Markdown
Member

@charlesBochet charlesBochet commented Mar 29, 2026

Summary

  • Deletes the entire 1-19 upgrade version command directory (7 files, ~1500 lines) and removes all references from the upgrade module and command runner.
  • Removes IS_NAVIGATION_MENU_ITEM_ENABLED and IS_NAVIGATION_MENU_ITEM_EDITING_ENABLED feature flags from the enum, seed data, generated schema files, and test mocks. These flags had no remaining feature-gated code — navigation menu items are now always enabled.

…flags

Removes the entire 1-19 upgrade version command directory and its
references from the upgrade module and command runner. Also removes
IS_NAVIGATION_MENU_ITEM_ENABLED and IS_NAVIGATION_MENU_ITEM_EDITING_ENABLED
feature flags from enum, seeds, generated schemas, and test mocks.

Made-with: Cursor
Copilot AI review requested due to automatic review settings March 29, 2026 11:19
Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 15 files

Copy link
Copy Markdown
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

Removes legacy upgrade scaffolding for version 1.19 and retires two navigation-menu-related feature flags now that navigation menu items are always enabled.

Changes:

  • Deleted the entire upgrade-version-command/1-19 command set and removed it from the upgrade command/module wiring.
  • Removed IS_NAVIGATION_MENU_ITEM_ENABLED and IS_NAVIGATION_MENU_ITEM_EDITING_ENABLED from the shared feature-flag enum and all related seed/test/generated artifacts.
  • Regenerated client/front GraphQL schema types to reflect the feature flag removal.

Reviewed changes

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

Show a summary per file
File Description
packages/twenty-shared/src/types/FeatureFlagKey.ts Removes the two navigation menu item feature flags from the shared enum.
packages/twenty-server/src/engine/workspace-manager/dev-seeder/core/utils/seed-feature-flags.util.ts Stops seeding the removed feature flags.
packages/twenty-server/src/engine/twenty-orm/entity-manager/workspace-entity-manager.spec.ts Updates test mock feature flag map to match the enum changes.
packages/twenty-server/src/database/commands/upgrade-version-command/upgrade.command.ts Removes 1.19 command wiring; keeps only 1.20 command set in allCommands.
packages/twenty-server/src/database/commands/upgrade-version-command/upgrade-version-command.module.ts Drops the Nest module import for the removed 1.19 command module.
packages/twenty-server/src/database/commands/upgrade-version-command/1-19/1-19-upgrade-version-command.module.ts Deleted: 1.19 upgrade command Nest module.
packages/twenty-server/src/database/commands/upgrade-version-command/1-19/1-19-seed-server-id.command.ts Deleted: 1.19 upgrade command implementation.
packages/twenty-server/src/database/commands/upgrade-version-command/1-19/1-19-fix-invalid-standard-universal-identifiers.command.ts Deleted: 1.19 upgrade command implementation.
packages/twenty-server/src/database/commands/upgrade-version-command/1-19/1-19-backfill-system-fields-is-system.command.ts Deleted: 1.19 upgrade command implementation.
packages/twenty-server/src/database/commands/upgrade-version-command/1-19/1-19-backfill-missing-standard-views.command.ts Deleted: 1.19 upgrade command implementation.
packages/twenty-server/src/database/commands/upgrade-version-command/1-19/1-19-backfill-message-channel-message-association-message-folder.command.ts Deleted: 1.19 upgrade command implementation.
packages/twenty-server/src/database/commands/upgrade-version-command/1-19/1-19-add-missing-system-fields-to-standard-objects.command.ts Deleted: 1.19 upgrade command implementation.
packages/twenty-front/src/generated-metadata/graphql.ts Removes the two flags from the generated front-end GraphQL enum.
packages/twenty-client-sdk/src/metadata/generated/schema.ts Updates generated SDK types/constants to remove the two flags.
packages/twenty-client-sdk/src/metadata/generated/schema.graphql Updates generated SDK GraphQL schema enum to remove the two flags.

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

@@ -125,7 +101,6 @@ export class UpgradeCommand extends UpgradeCommandRunner {
];

this.allCommands = {
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

allCommands is typed as AllCommands = Record<UpgradeCommandVersion, VersionCommands>, and UpgradeCommandVersion currently includes '1.19.0' (see UPGRADE_COMMAND_SUPPORTED_VERSIONS). With only '1.20.0' provided here, this should fail type-checking and can also break runtime lookups if APP_VERSION is ever set to 1.19.x. Either include a '1.19.0' entry (e.g. empty commands) or relax AllCommands / UpgradeCommandVersion typing so only the current version key is required (keeping '1.19.0' in the supported versions list if it’s still needed to compute the previous version).

Suggested change
this.allCommands = {
this.allCommands = {
'1.19.0': [],

Copilot uses AI. Check for mistakes.
@FelixMalfait
Copy link
Copy Markdown
Member

FelixMalfait commented Mar 29, 2026

📊 API Changes Report

GraphQL Schema Changes

GraphQL Schema Changes

[error] Error: Unable to read JSON file: /home/runner/work/twenty/twenty/main-schema-introspection.json: Not valid JSON content
at JsonFileLoader.handleFileContent (/opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/json-file-loader/cjs/index.js:147:19)
at /opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/json-file-loader/cjs/index.js:95:43
at async Promise.all (index 0)
at async JsonFileLoader.load (/opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/json-file-loader/cjs/index.js:88:9)
at async /opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/load/cjs/load-typedefs/load-file.js:15:39
at async Promise.all (index 4)
at async loadFile (/opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/load/cjs/load-typedefs/load-file.js:13:9)
at async /opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/load/cjs/load-typedefs/collect-sources.js:200:25
Error: Unable to read JSON file: /home/runner/work/twenty/twenty/main-schema-introspection.json: Not valid JSON content
at JsonFileLoader.handleFileContent (/opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/json-file-loader/cjs/index.js:147:19)
at /opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/json-file-loader/cjs/index.js:95:43
at async Promise.all (index 0)
at async JsonFileLoader.load (/opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/json-file-loader/cjs/index.js:88:9)
at async /opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/load/cjs/load-typedefs/load-file.js:15:39
at async Promise.all (index 4)
at async loadFile (/opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/load/cjs/load-typedefs/load-file.js:13:9)
at async /opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/load/cjs/load-typedefs/collect-sources.js:200:25
⚠️ Breaking changes or errors detected in GraphQL schema

[error] Error: Unable to read JSON file: /home/runner/work/twenty/twenty/main-schema-introspection.json: Not valid JSON content
    at JsonFileLoader.handleFileContent (/opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/json-file-loader/cjs/index.js:147:19)
    at /opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/json-file-loader/cjs/index.js:95:43
    at async Promise.all (index 0)
    at async JsonFileLoader.load (/opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/json-file-loader/cjs/index.js:88:9)
    at async /opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/load/cjs/load-typedefs/load-file.js:15:39
    at async Promise.all (index 4)
    at async loadFile (/opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/load/cjs/load-typedefs/load-file.js:13:9)
    at async /opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/load/cjs/load-typedefs/collect-sources.js:200:25
Error generating diff

GraphQL Metadata Schema Changes

GraphQL Metadata Schema Changes

[error] Error: Unable to read JSON file: /home/runner/work/twenty/twenty/main-metadata-schema-introspection.json: Not valid JSON content
at JsonFileLoader.handleFileContent (/opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/json-file-loader/cjs/index.js:147:19)
at /opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/json-file-loader/cjs/index.js:95:43
at async Promise.all (index 0)
at async JsonFileLoader.load (/opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/json-file-loader/cjs/index.js:88:9)
at async /opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/load/cjs/load-typedefs/load-file.js:15:39
at async Promise.all (index 4)
at async loadFile (/opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/load/cjs/load-typedefs/load-file.js:13:9)
at async /opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/load/cjs/load-typedefs/collect-sources.js:200:25
Error: Unable to read JSON file: /home/runner/work/twenty/twenty/main-metadata-schema-introspection.json: Not valid JSON content
at JsonFileLoader.handleFileContent (/opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/json-file-loader/cjs/index.js:147:19)
at /opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/json-file-loader/cjs/index.js:95:43
at async Promise.all (index 0)
at async JsonFileLoader.load (/opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/json-file-loader/cjs/index.js:88:9)
at async /opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/load/cjs/load-typedefs/load-file.js:15:39
at async Promise.all (index 4)
at async loadFile (/opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/load/cjs/load-typedefs/load-file.js:13:9)
at async /opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/load/cjs/load-typedefs/collect-sources.js:200:25
⚠️ Breaking changes or errors detected in GraphQL metadata schema

[error] Error: Unable to read JSON file: /home/runner/work/twenty/twenty/main-metadata-schema-introspection.json: Not valid JSON content
    at JsonFileLoader.handleFileContent (/opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/json-file-loader/cjs/index.js:147:19)
    at /opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/json-file-loader/cjs/index.js:95:43
    at async Promise.all (index 0)
    at async JsonFileLoader.load (/opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/json-file-loader/cjs/index.js:88:9)
    at async /opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/load/cjs/load-typedefs/load-file.js:15:39
    at async Promise.all (index 4)
    at async loadFile (/opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/load/cjs/load-typedefs/load-file.js:13:9)
    at async /opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/@graphql-inspector/cli/node_modules/@graphql-tools/load/cjs/load-typedefs/collect-sources.js:200:25
Error generating diff

REST API Analysis Error

⚠️ Error occurred while analyzing REST API changes

Error Output

REST Metadata API Analysis Error

⚠️ Error occurred while analyzing REST Metadata API changes

Error Output

⚠️ Please review these API changes carefully before merging.

@FelixMalfait
Copy link
Copy Markdown
Member

FelixMalfait commented Mar 29, 2026

🚀 Preview Environment Ready!

Your preview environment is available at: http://bore.pub:61172

This environment will automatically shut down after 5 hours.

The upgrade runner needs the previous version entry to validate workspace
versions before upgrading to 1.20.0.

Made-with: Cursor
Three issues caused flaky server-integration-test failures:

1. teardown-test.ts did not await destroy()/close(), so Redis and
   Postgres connections closed while async event handlers were still
   running.

2. CacheLockService.withLock had an unprotected releaseLock in its
   finally block — if Redis was already closed, the error became an
   unhandled rejection crashing the process.

3. WorkflowRunEnqueueWorkspaceService had the same unprotected
   releaseWorkflowEnqueueLock in its finally block.

Made-with: Cursor
The metricsService.incrementCounter call inside the catch block also
uses Redis. When Redis is shutting down, this creates a second
unhandled rejection that crashes the process.

Made-with: Cursor
…ises

MetricsService.incrementCounter and batchIncrementCounter both called
metricsCacheService.updateCounter (which uses Redis) without await,
creating floating promises. When Redis closes during shutdown, these
become unhandled rejections that crash the process.

Made-with: Cursor
Copy link
Copy Markdown
Member

@Weiko Weiko left a comment

Choose a reason for hiding this comment

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

LGTM


this.allCommands = {
'1.19.0': commands_1190,
'1.19.0': [],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we have to keep this key?

return await fn();
} finally {
await this.cacheStorageService.releaseLock(key);
try {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggesting a fireAndForget

function fireAndForget(
  promise: Promise<unknown>,
  onError?: (error: unknown) => void,
): void {
  promise.catch((error) => {
    onError?.(error);
  });
}

(which is not exactly what you have, fireAndForget should NOT await the result so maybe the name is not correct)

@charlesBochet charlesBochet added this pull request to the merge queue Mar 30, 2026
Merged via the queue into main with commit 08b0416 Mar 30, 2026
96 checks passed
@charlesBochet charlesBochet deleted the remove-1-19-commands-and-nav-flags branch March 30, 2026 14:29
@twenty-eng-sync
Copy link
Copy Markdown

Hey @charlesBochet! After you've done the QA of your Pull Request, you can mark it as done here. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants