Skip to content

test: verify reviewer inline comment posting#87811

Closed
kacper-mikolajczak wants to merge 1 commit into
Expensify:mainfrom
kacper-mikolajczak:test-verify-reviewer-comments
Closed

test: verify reviewer inline comment posting#87811
kacper-mikolajczak wants to merge 1 commit into
Expensify:mainfrom
kacper-mikolajczak:test-verify-reviewer-comments

Conversation

@kacper-mikolajczak

Copy link
Copy Markdown
Contributor

Purpose

Test PR to verify the fix from #87803 works correctly on upstream.

Introduces deliberate coding standard violations in Badge.tsx:

  • Magic numbers (CONSISTENCY-2)
  • Unjustified eslint-disable (CONSISTENCY-5)

The claude-review workflow should:

  1. Detect these violations
  2. Post inline comments via github-actions[bot]
  3. Include the SHA footer

This PR will be closed after verification - do not merge.

Introduces magic numbers and unjustified eslint-disable in Badge.tsx
to verify that the claude-review workflow correctly posts inline comments
after the ALLOWED_RULES_FILE fix (Expensify#87803).

This PR should be closed after verification.
@kacper-mikolajczak kacper-mikolajczak requested review from a team as code owners April 13, 2026 22:11
@melvin-bot melvin-bot Bot requested review from flaviadefaria and stitesExpensify and removed request for a team April 13, 2026 22:11
@melvin-bot

melvin-bot Bot commented Apr 13, 2026

Copy link
Copy Markdown

@stitesExpensify Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@kacper-mikolajczak

Copy link
Copy Markdown
Contributor Author

Please disregard this PR, it was created just for testing purposes of one of the fixes to the claude reviewer.

Comment thread src/components/Badge.tsx
);

// TEST: deliberate violations for reviewer comment posting verification
// eslint-disable-next-line no-unused-vars

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.

❌ CONSISTENCY-5 (docs)

The eslint-disable-next-line no-unused-vars directive lacks an accompanying comment explaining why the rule needs to be disabled. The comment on the previous line (// TEST: deliberate violations...) describes the purpose of the test but does not justify why an unused variable is necessary in production code.

Either remove the unused variable badgeOpacity entirely, or add a clear justification comment explaining why the eslint rule must be suppressed. For example:

// eslint-disable-next-line no-unused-vars -- <reason why this unused variable must exist>
const badgeOpacity = isDeleted ? 0.5 : 1;

Reviewed at: 412c9f2 | Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.

Comment thread src/components/Badge.tsx
// TEST: deliberate violations for reviewer comment posting verification
// eslint-disable-next-line no-unused-vars
const badgeOpacity = isDeleted ? 0.5 : 1;
const maxBadgeWidth = 200;

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.

❌ CONSISTENCY-2 (docs)

The number 200 is a magic number representing a pixel width. While it is assigned to a local variable, it should be defined as a descriptive module-level constant to improve clarity and reusability.

Define it as a named constant at the module level:

const MAX_BADGE_WIDTH = 200;

Reviewed at: 412c9f2 | Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.

Comment thread src/components/Badge.tsx

// TEST: deliberate violations for reviewer comment posting verification
// eslint-disable-next-line no-unused-vars
const badgeOpacity = isDeleted ? 0.5 : 1;

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.

❌ CONSISTENCY-2 (docs)

The number 0.5 is a magic number representing opacity for deleted badges. It is not self-explanatory -- why 0.5 rather than another value? It should be extracted to a named constant that documents its purpose.

Define descriptive constants at the module level:

const DELETED_BADGE_OPACITY = 0.5;
const DEFAULT_BADGE_OPACITY = 1;

Reviewed at: 412c9f2 | Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.

@kacper-mikolajczak

Copy link
Copy Markdown
Contributor Author

CC @Julesssss

@Julesssss

Copy link
Copy Markdown
Contributor

Nice, thank you

@kacper-mikolajczak kacper-mikolajczak deleted the test-verify-reviewer-comments branch June 17, 2026 12:18
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