Skip to content

docs(admin): name the mechanism instead of the i18n roadmap label in entry code - #1886

Merged
mobeenabdullah merged 1 commit into
mainfrom
docs/admin-entry-comments-name-the-mechanism
Sep 13, 2026
Merged

mobeenabdullah merged 1 commit into
mainfrom
docs/admin-entry-comments-name-the-mechanism

Conversation

@mobeenabdullah

Copy link
Copy Markdown
Collaborator

What

This is the first batch of the roadmap-label cleanup. AGENTS.md says comments describe the code, never a plan. The comment check (#1869, #1878) blocks new i18n <milestone> labels and records the old ones, which have to be removed file by file.

This PR removes all 44 labels from 17 admin files: the entry form, the entry list and its filters, field wrappers, entry hooks, and the entry API.

How each one was rewritten. In every one of the 44 comments, the sentence already describes what the code does ("Active content locale — saves target this language", "request the per-locale translation-status overview", "render the field right-to-left…"). So the label code is deleted and the sentence stays, with its first word capitalised where the label used to open it. Nothing was reworded beyond that. Two (spec §10) references on lines already being edited were removed too, for the same reason: they point at a document the reader can't open.

Scope and territory

  • Why these 17 files. On origin/main 2510625, 40 files hold 149 recorded labels. I checked every file against each in-flight ledger claim, with globs expanded properly. 25 files are outside every claim.
  • Skipped on purpose:
  • Batches: this PR covers the admin share. The remaining free core files come next as a separate PR.

Change shape

  • 44 in-line substitutions, +44/−44. Every file keeps its line count, so no line moves.
  • Comments only. A filter over git diff -U0 reports no changed line that isn't a comment (JSX {/* … */} included). The same filter flags a code line when given one.
  • Applied by a script with one exact substring per edit. It refused to write unless each substring matched exactly once.
  • Allowlist lowered by a script that can only remove. It refuses if any edited file carries an offence its entry didn't already record.
    • Result: 44 offences removed, and 16 entries removed entirely.
    • One file keeps a smaller entry, because it has other recorded offences.
    • Pins: 244→228 entries and 551→507 offences.

Verification

On origin/main 2510625:

  • Labels gone: no roadmap label remains in the 17 edited files.
  • Real check: node scripts/check-comment-convention.mjs > out.log 2>&1; echo "EXIT=$?" gives EXIT=0 ("507 pre-existing offence(s) still allowlisted"), and it stays 0 after the commit hook. Its shrink check would fail any entry left too high.
  • Allowlist against main: only removals. 0 new entries, 0 raised counts, 0 added digests. 244→228 entries, 551→507 offences.
  • Touched admin tests: localized-serialization.test.ts and entryApi.update-locale.test.ts pass (2 files, 10 tests). pnpm turbo lint --filter=@nextlyhq/admin passes.
  • Suites: check-comment-convention.test.mjs 105 tests. pnpm test:scripts 41 files, 1377 tests.
  • Other checks: pnpm check:docs-claims exit 0. FALLOW_AUDIT_BASE=origin/main fallow audit: pass, 19 files, everything introduced 0.

Changeset

None. Comments and test pins only. No published behaviour changes.

…entry code

Every i18n milestone label in the admin entry form, list, filters, field
wrapper, entry hooks and entry API sat in a sentence that already described
what the code does. Remove the label and keep the sentence; two same-line
references to a spec section go too. In-line only, so no comment changes its
line count and no code changes.

The comment-convention allowlist drops those 44 offences and 16 entries, and
its pins lower to 228 entries and 507 offences.
@mobeenabdullah

Copy link
Copy Markdown
Collaborator Author

@codex review

@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 1 minute.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

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

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: e90fb25e-0a2e-44ea-9550-3796c982642f

📥 Commits

Reviewing files that changed from the base of the PR and between 2510625 and d71aaf0.

📒 Files selected for processing (19)
  • packages/admin/src/components/features/entries/EntryForm/EntryForm.tsx
  • packages/admin/src/components/features/entries/EntryForm/EntrySystemHeader.tsx
  • packages/admin/src/components/features/entries/EntryForm/panels/DocumentPanel.tsx
  • packages/admin/src/components/features/entries/EntryForm/useEntryForm.ts
  • packages/admin/src/components/features/entries/EntryList/EntryList.tsx
  • packages/admin/src/components/features/entries/EntryList/EntryTable.tsx
  • packages/admin/src/components/features/entries/EntryList/EntryTableColumns.tsx
  • packages/admin/src/components/features/entries/EntryList/entryFilters.ts
  • packages/admin/src/components/features/entries/EntryLocaleContext.tsx
  • packages/admin/src/components/features/entries/fields/FieldWrapper.tsx
  • packages/admin/src/hooks/queries/useEntry.ts
  • packages/admin/src/hooks/queries/useUpdateEntry.ts
  • packages/admin/src/hooks/useLocalization.ts
  • packages/admin/src/lib/builder/__tests__/localized-serialization.test.ts
  • packages/admin/src/pages/dashboard/entries/[slug]/[id]/index.tsx
  • packages/admin/src/services/__tests__/entryApi.update-locale.test.ts
  • packages/admin/src/services/entryApi.ts
  • scripts/check-comment-convention.test.mjs
  • scripts/comment-convention-allowlist.json

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-13T19:43:16.910135Z d71aaf0 Manual 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: d71aaf03f1

ℹ️ 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".

@mobeenabdullah
mobeenabdullah merged commit bae7914 into main Sep 13, 2026
10 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Whole-Repository Code Hygiene Summary

Full dead-code, duplication, and complexity report for the PR branch as it stands now. Playground is excluded. Quality gate enforcement on introduced issues is performed by the Changed files job.

🌿 Fallow

Warning

Review needed

⚠️ 73 code issues · ⚠️ 677 clone groups · ⚠️ 1036 health findings

See inline review comments for per-finding details.

Code issues (73)
Category Count
Unused files 2
Unused exports 5
Unused dependencies 19
Unused devDependencies 6
Unresolved imports 2
Unlisted dependencies 1
Circular dependencies 38
Duplication (677 groups · 28396 lines · 3.9%)
Locations Lines Tokens
schemas/_dialect-bundles/mysql.relations.ts:40-134
schemas/_dialect-bundles/postgres.relations.ts:40-134
schemas/_dialect-bundles/sqlite.relations.ts:40-134
95 593
cli/commands/db-sync-demote.ts:70-75
cli/commands/db-sync-promote.ts:38-43
cli/commands/dev-build.ts:100-105
cli/commands/dev-build.ts:179-184
cli/commands/dev-build.ts:299-304
cli/commands/dev-build.ts:411-416
cli/commands/dev-build.ts:552-557
cli/commands/dev-server.ts:575-580
cli/commands/dev-server.ts:840-845
cli/commands/dev-server.ts:1143-1148
cli/commands/migrate-field-groups.ts:110-115
6 70
entries/EntryList/EntryTableSkeleton.tsx:74-98
collection/components/CollectionTableSkeleton.tsx:94-118
field-group/components/FieldGroupTableSkeleton.tsx:90-114
plugins/components/PluginsTableSkeleton.tsx:86-110
singles/components/SinglesTableSkeleton.tsx:77-101
src/components/table-skeleton.tsx:100-124
25 89
collections/config/validate-config.ts:380-433
field-groups/config/validate-field-group.ts:185-238
singles/config/validate-single.ts:190-243
54 152
dispatcher/handlers/collection-dispatcher.ts:925-967
field-groups/services/field-group-table-provisioning.ts:186-236
singles/services/reconcile-single-companion.ts:110-160
51 149

… and 672 more groups.

Across 425 files.

Complexity (1036 functions above threshold)
File Function Severity Cyclomatic Cognitive CRAP Lines
singles/services/single-mutation-service.ts:966 <arrow> critical 246 ! 308 ! 13317.5 ! 1650
collections/services/collection-mutation-service.ts:6366 <arrow> critical 168 ! 155 ! 6264.4 ! 1307
src/init/reload-config.ts:1417 applyReload critical 143 ! 211 ! 4560 ! 1470
shared/lib/entry-validation.ts:245 validateFieldValue critical 109 ! 157 ! 2675.3 ! 432
dynamic-collections/services/dynamic-collection-schema-service.ts:1050 generateAlterTableMigration critical 104 ! 221 ! 2440.3 ! 782

5134 files, 80056 functions analyzed (thresholds: cyclomatic > 20, cognitive > 15, CRAP >= 30)

Codebase health

Metric Value
Maintainability 91.7 / 100
Avg complexity 1.8

Tip

Run fallow fix --dry-run to preview auto-fixes.
Add /** @public */ above exports to preserve them.

@github-actions github-actions Bot added the scope: admin @nextlyhq/admin label Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: admin @nextlyhq/admin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant