From 071a4b20a8b9fb02feefcb1c690b2154549caf1a Mon Sep 17 00:00:00 2001 From: juliet Date: Fri, 29 May 2026 10:53:51 -0400 Subject: [PATCH] Add root-level create-org proxy to match AGENTS.md (#537) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AGENTS.md tells developers to run `npm run create-org` from the repo root, alongside other proxied scripts (server:start, client:start, db:update, etc.). The proxy was missing — the script only lived in `server/package.json`, so the command in the docs failed. Add the proxy and fix the docs to include the required flags so the example is actually copy-pasteable (the underlying yargs script demands --name, --email, --website, --firstName, --lastName, --password). Co-authored-by: Claude Opus 4.7 (1M context) --- .github/workflows/publish-types.yaml | 6 +- AGENTS.md | 11 +- .../ItemInvestigationRuleResults.tsx | 4 +- .../investigation/ThreadInvestigation.tsx | 7 +- .../item_types/ItemTypeFormCustomField.tsx | 14 +- .../dashboard/item_types/ItemTypePreview.tsx | 28 ++-- .../dashboard/items/ItemActionHistory.tsx | 2 +- .../v2/ManualReviewJobOtherItemsComponent.tsx | 4 +- .../v2/ncmec/NCMECInspectedMedia.tsx | 6 +- .../ManualReviewJobListOfThreadsComponent.tsx | 21 ++- .../ManualReviewJobThreadComponent.tsx | 8 +- .../ManualReviewJobRelatedUserComponent.tsx | 8 +- .../webpages/dashboard/overview/Overview.tsx | 12 +- .../RuleInsightsSampleDetailResults.tsx | 8 +- .../RuleInsightsSampleDetailView.tsx | 26 ++-- .../RuleFormSignalModalSignalDetailView.tsx | 6 +- package.json | 1 + server/condition_evaluator/conditionSet.ts | 15 +- server/graphql/modules/apiKey.ts | 49 ++++-- server/graphql/modules/insights.ts | 4 +- server/routes/action/ActionRoutes.ts | 11 +- server/routes/content/ContentRoutes.ts | 15 +- .../integration_logos/serveIntegrationLogo.ts | 1 - .../serveIntegrationLogoWithBackground.ts | 1 - server/routes/items/submitItems.ts | 70 +++++---- server/routes/policies/PoliciesRoutes.ts | 7 +- server/routes/reporting/ReportingRoutes.ts | 12 +- server/routes/reporting/submitReport.ts | 8 +- server/routes/user_scores/UserScoresRoutes.ts | 7 +- .../AggregationsService.ts | 2 +- .../analyticsLoggers/ContentApiLogger.ts | 4 +- .../analyticsLoggers/RuleExecutionLogger.ts | 2 +- .../analyticsQueries/ItemHistoryQueries.ts | 12 +- .../analyticsQueries/UserHistoryQueries.ts | 2 +- .../services/apiKeyService/apiKeyService.ts | 14 +- .../derivedFieldsService.ts | 146 +++++++++--------- server/services/integrationRegistry/index.ts | 8 +- .../integrationManifests.ts | 55 +++++-- .../loadIntegrationsConfig.ts | 33 +++- .../integrationRegistry/loadPlugins.ts | 29 +++- .../itemInvestigationService.ts | 16 +- .../extractItemDataValues.ts | 4 +- .../makeItemSubmission.ts | 5 +- .../modules/CommentOperations.test.ts | 2 +- .../modules/CommentOperations.ts | 7 +- .../modules/JobRouting.ts | 15 +- .../moderationConfigService/types/actions.ts | 1 - .../types/itemTypes.ts | 6 +- server/services/reportingService/dbTypes.ts | 2 +- .../reportingService/reportingService.ts | 34 ++-- .../detectRulePassRateAnomaliesJob.ts | 6 +- server/services/signalAuthService/dbTypes.ts | 6 +- .../helpers/loadPluginSignals.ts | 15 +- .../ImageSimilarityDoesNotMatch.test.ts | 44 ++++-- .../signals/ImageSimilarityDoesNotMatch.ts | 38 ++--- .../signals/ImageSimilarityMatch.test.ts | 54 ++++--- .../signals/ImageSimilarityMatch.ts | 34 ++-- .../signals/PluginSignalAdapter.ts | 15 +- .../fetchUserSubmissionStatistics.ts | 4 +- .../userStatisticsService.ts | 7 +- .../userStrikeService/userStrikeService.ts | 15 +- .../dataWarehouse/PostgresAnalyticsAdapter.ts | 14 +- .../storage/dataWarehouse/warehouseSchema.ts | 11 +- .../fixtureHelpers/createContentItemTypes.ts | 32 ++-- 64 files changed, 612 insertions(+), 454 deletions(-) diff --git a/.github/workflows/publish-types.yaml b/.github/workflows/publish-types.yaml index ed2acc9..a8ff4c3 100644 --- a/.github/workflows/publish-types.yaml +++ b/.github/workflows/publish-types.yaml @@ -8,7 +8,7 @@ on: workflow_dispatch: permissions: - id-token: write # Required for OIDC i.e. publish package + id-token: write # Required for OIDC i.e. publish package contents: read jobs: @@ -16,10 +16,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - name: Setup Node.js - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version-file: '.nvmrc' registry-url: 'https://registry.npmjs.org' diff --git a/AGENTS.md b/AGENTS.md index d4bfe98..530a9f6 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -27,7 +27,6 @@ Reference files: `README.md` (getting started), `server/bin/README.md` (utility - **GraphQL authoring:** Inline in resolver files with `/* GraphQL */` comment markers — codegen discovers queries this way. Searching for `gql` or `graphql` alone misses most of it. - **GraphQL codegen:** `npm run generate` (from root) regenerates `client/src/graphql/generated.ts` and `server/graphql/generated.ts`. **Never hand-edit** either `generated.ts`. **Never hand-merge** either `generated.ts` during a rebase/merge — pick one side with `git checkout --ours|--theirs `, then run `npm run generate`. Hand-merging produces output that parses but drifts from the schema. - **Adding a new built-in `SignalType`:** the type list is hand-mirrored in four files; missing any one ships a signal that's invisible to the dashboard. Update all of: - 1. `server/services/signalsService/types/SignalType.ts` — the canonical TS enum-like object (`BuiltInExternalSignalType` or `BuiltInThirdPartySignalType`) and the `integrationForSignalType` switch. 2. `server/services/signalsService/types/SignalArgsByType.ts` — both `SignalArgsByType` and `RuntimeSignalArgsByType` (the `Satisfies<>` will fail compile until you do). 3. `server/graphql/modules/signal.ts` — the `enum SignalType { ... }` block inside the SDL string. The `signal.test.ts` coverage test fails if you miss this. @@ -57,8 +56,14 @@ npm run db:update -- --env staging --db api-server-pg npm run db:update -- --env staging --db scylla npm run db:update -- --env staging --db clickhouse -# Create organization and admin user -npm run create-org +# Create organization and admin user (all flags required) +npm run create-org -- \ + --name "Test Org" \ + --email "admin@example.com" \ + --website "example.com" \ + --firstName "Admin" \ + --lastName "User" \ + --password "your-password" # Start dev servers (separate terminals recommended) npm run client:start # React dev server diff --git a/client/src/webpages/dashboard/investigation/ItemInvestigationRuleResults.tsx b/client/src/webpages/dashboard/investigation/ItemInvestigationRuleResults.tsx index 4fe074c..9a6cdb9 100644 --- a/client/src/webpages/dashboard/investigation/ItemInvestigationRuleResults.tsx +++ b/client/src/webpages/dashboard/investigation/ItemInvestigationRuleResults.tsx @@ -174,8 +174,8 @@ export default function ItemInvestigationRuleResults(props: { outcome === GQLConditionOutcome.Passed ? 'soft-red' : outcome === GQLConditionOutcome.Failed - ? 'soft-green' - : 'soft-gray' + ? 'soft-green' + : 'soft-gray' } shapeVariant="rounded" label={getDisplayName(outcome)} diff --git a/client/src/webpages/dashboard/investigation/ThreadInvestigation.tsx b/client/src/webpages/dashboard/investigation/ThreadInvestigation.tsx index 9115598..1ee3406 100644 --- a/client/src/webpages/dashboard/investigation/ThreadInvestigation.tsx +++ b/client/src/webpages/dashboard/investigation/ThreadInvestigation.tsx @@ -17,18 +17,21 @@ import { useGQLGetThreadHistoryQuery, } from '../../../graphql/generated'; import { filterNullOrUndefined } from '../../../utils/collections'; +import { + findFirstIframeUrl, + shouldDisplayUrlFieldInIframe, +} from '../../../utils/contentUrlUtils'; import { getFieldValueForRole, getFieldValueOrValues, getPrimaryContentFields, } from '../../../utils/itemUtils'; import { truncateIdIfNeeded } from '../../../utils/string'; +import IframeContentDisplayComponent from '../mrt/manual_review_job/IframeContentDisplayComponent'; import type { ManualReviewJobAction, ManualReviewJobEnqueuedActionData, } from '../mrt/manual_review_job/ManualReviewJobReview'; -import IframeContentDisplayComponent from '../mrt/manual_review_job/IframeContentDisplayComponent'; -import { findFirstIframeUrl, shouldDisplayUrlFieldInIframe } from '../../../utils/contentUrlUtils'; import FieldsComponent from '../mrt/manual_review_job/v2/ManualReviewJobFieldsComponent'; import ManualReviewJobMagnifyImageComponent from '../mrt/manual_review_job/v2/ManualReviewJobMagnifyImageComponent'; import { ManualReviewJobThreadComponent } from '../mrt/manual_review_job/v2/threads/ManualReviewJobThreadComponent'; diff --git a/client/src/webpages/dashboard/item_types/ItemTypeFormCustomField.tsx b/client/src/webpages/dashboard/item_types/ItemTypeFormCustomField.tsx index 7d36b98..199e0f5 100644 --- a/client/src/webpages/dashboard/item_types/ItemTypeFormCustomField.tsx +++ b/client/src/webpages/dashboard/item_types/ItemTypeFormCustomField.tsx @@ -147,8 +147,8 @@ export default function ItemTypeFormCustomField(props: { a === SchemaFieldRoles.NONE ? -1 : b === SchemaFieldRoles.NONE - ? 1 - : a.localeCompare(b), + ? 1 + : a.localeCompare(b), ) .map((it) => (