Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

` in the page object naming the component that lacks the signal.

Open github-actions[bot] opened this issue 2 weeks ago โ€ข 4 comments

๐Ÿ“ Found in apps/meteor/tests/e2e/README.md#L58

Commit: 1c0e41c0f02c6f76b8905fdb7b9be480bed23c52

github-actions[bot] avatar Nov 12 '26 20:11 github-actions[bot]

๐Ÿ”— Related PRs

RocketChat/Rocket.Chat#42966 - chore: clean up after the Item migration [open]


๐Ÿ“ Issue Planner

Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.


๐Ÿงช Issue enrichment is currently in open beta.

You can configure auto-planning by selecting labels in the issue_enrichment configuration.

To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

issue_enrichment:
  auto_enrich:
    enabled: false

๐Ÿ’ฌ Have feedback or questions? Drop into our discord!

coderabbitai[bot] avatar Nov 12 '26 20:11 coderabbitai[bot]

Hi! This looks like a great cleanup task. May I take this up and open a PR?

SigmaSharmaG avatar Nov 13 '26 04:11 SigmaSharmaG

Coding Plan

Summary

  • Treat issue #43700 as a scanner false positive. The cited README line is an existing convention, not a work item for a specific component.
  • Rewrap one README bullet so that the extractor does not match TODO. Keep the guidance unchanged.
  • Use the current diff-based automation to close the issue. The deleted line still matches the open issue title exactly. Do not change the scanner, because a scanner change can block closure.
  • Verify the result locally with extractTodos and matchTodos on in-memory data. Do not run the entry point, which can change GitHub issues.
Design Choices

Design Choice 1: What does the ticket require?

Options Considered:

  1. Treat the issue as a scanner false positive. Change the README so that the line no longer produces an issue.
  2. Apply the README convention to a concrete case. For example, add a page-object TODO for the chats table, which lacks aria-busy.
  3. Add aria-busy to the components that lack it.

Chosen Option: 1

Rationale: The issue body is an automated notice. Its only human comment asks someone to take up the cleanup. It names no component. The cited line is existing documentation, not a request for work, and it names no component.

Design Choice 2: How should the false positive be removed?

Options Considered:

  1. Rewrap the README sentence so that word characters come before TODO on the same line.
  2. Change the extractor in scripts/todo-issue/src/diff.ts to ignore TODOs inside backticks or in Markdown.
  3. Make both changes.

Chosen Option: 1

Rationale: The trigger can be removed in the documentation or in the scanner. Rewrapping is the smallest change. With the current rules, the scanner still extracts the deleted line, so the automation closes #43700. Options 2 and 3 can stop the scanner from recognizing the deletion. They also change behavior for genuine TODOs in every file type.

๐Ÿ’ก User Tips

Regenerate the plan with different choices with @coderabbitai <feedback>.

Implementation Steps

Phase 1: Remove the false-positive trigger from the end-to-end testing guide

Change only the line wrapping of the guidance. Keep the meaning unchanged. After the change, no line in the section starts with non-word characters followed by TODO.

Task 1: Rewrap the out-of-scope UI fix bullet

Move TODO so that word characters come before it on the same line.

  • Update the third bullet in the "Lists that update in place" section of apps/meteor/tests/e2e/README.md, at current lines 57โ€“58.
  • Rewrap the bullet so that the phrase "leave a TODO" stays together on one line. Alternatively, put other leading words before TODO on that line.
  • Keep the wording, inline code formatting, and meaning of the instruction. The bullet must still say to wait for the response, assert something that only the new rows satisfy, and leave a TODO in the page object that names the component that lacks the signal.
  • Keep the line width and the two-space continuation indentation used by adjacent bullets.
  • Do not change other sections or the guidance itself.
Task 2: Check the other `TODO` mentions in the same guide

Confirm that the edit adds no new match and leaves no remaining match in this file.

  • Read the review checklist entry near line 427 in apps/meteor/tests/e2e/README.md. It mentions a TODO that names the missing UI signal. Confirm that TODO appears mid-line after word characters. If it does, do not edit it.
  • Do not edit other documentation files that the scanner can match, such as docs/code-comments.md or scripts/todo-issue/README.md. They have no open issue in this ticket.
Prompt to implement phase

Rewrap the existing end-to-end testing guidance to remove the false-positive
trigger. Keep the guidance and its meaning unchanged.

- In `apps/meteor/tests/e2e/README.md`, rewrap the third bullet in "Lists that
update in place" at current lines 57โ€“58. Keep "leave a `TODO`" on one line, or
put other leading words before `TODO` on that line.
- Preserve the wording, inline code formatting, line width, and two-space
continuation indentation. The bullet must still instruct readers to wait for the
response, assert something that only the new rows satisfy, and leave a `TODO` in
the page object that names the component that lacks the signal.
- Confirm that no line in the section starts with non-word characters followed
by `TODO`. Check the review checklist entry near line 427 and confirm that its
`TODO` appears mid-line after word characters. If it does, do not edit it.
Confirm that the file has no remaining match and that the edit adds no new
match.
- Do not change other sections, other documentation files, the scanner,
workflow, page objects, specs, or UI components. Do not add a changeset.

Phase 2: Verify the scanner result and the issue lifecycle

Confirm locally, without GitHub calls, that the diff closes #43700 and creates no new issue. Follow the pull request conventions and confirm closure after the merge.

Task 1: Run the extractor locally on the README diff

Check extractor output for the actual change.

  • From scripts/todo-issue/, install the package dependencies. Pipe the git diff of the README change into a short Bun script that calls extractTodos from src/diff.ts.
  • Do not run src/index.ts. It requires a token and can change GitHub issues.
  • Expect one item of type delete with the title ` in the page object naming the component that lacks the signal. and the label ["todo"]. Expect no items of type add.
  • Optionally, call matchTodos with an in-memory open issue that has this title. Confirm that the deleted item goes to toClose and that the other result arrays are empty.
  • If an add item appears, change the wrapping and run the check again.
  • Before committing, run extractTodos on the staged diff only. The result must contain one delete item with the issue #43700 title and no add items.
Task 2: Prepare the pull request and confirm issue closure

Follow the contribution conventions and confirm that the false-positive issue closes.

  • Keep the pull request to this one documentation change. Use a documentation or chore prefix. Refer to issue #43700 and explain that the scanner matched an instructional TODO.
  • Do not add a changeset. The change is documentation only and is not visible to users.
  • Do not change scripts/todo-issue/ in the same pull request. If the extractor changes in the same push, the scanner can skip the deleted line and #43700 stays open.
  • After the merge to develop, confirm that the TODO workflow commented on #43700 and closed it. If the workflow did not close it, close it manually and link to the merged pull request.
Prompt to implement phase

Verify the README diff locally and confirm the issue lifecycle. Do not make
GitHub calls during the local verification.

- From `scripts/todo-issue/`, install package dependencies. Pipe the README `git
diff` into a short Bun script that calls `extractTodos` from `src/diff.ts`. Do
not run `src/index.ts`; it requires a token and can change GitHub issues.
- Confirm one `delete` item with the title `` ` in the page object naming the
component that lacks the signal. `` and label `["todo"]`. Confirm that there are
no `add` items. If an `add` item appears, change the wrapping and repeat the
check.
- Optionally, call `matchTodos` with an in-memory open issue with that title.
Confirm that the deleted item goes to `toClose` and that the other result arrays
are empty.
- Before committing, run `extractTodos` on the staged diff only. Confirm one
`delete` item with the issue #43700 title and no `add` items.
- Keep the pull request to the one documentation change. Use a documentation or
chore prefix, refer to #43700, and explain that the scanner matched an
instructional `TODO`. Do not add a changeset or change `scripts/todo-issue/` in
the same pull request; an extractor change in the same push can prevent closure.
- After the merge to `develop`, confirm that the TODO workflow commented on
#43700 and closed it. If the workflow did not close it, close it manually and
link to the merged pull request.
Research

Ticket Summary

Issue #43700 is a TODO-scanner false positive. The scanner extracted an instructional TODO from line 58 of apps/meteor/tests/e2e/README.md as a work item. The plan rewraps the README sentence so that the scanner does not match it. The guidance stays unchanged. The existing diff-based automation closes the issue.

Codebase Summary

The scripts/todo-issue/ tool runs from .github/workflows/todo.yml on pushes to develop. In scripts/todo-issue/src/diff.ts, the tool extracts TODO candidates from added and deleted diff lines. The match is textual. A line matches when it contains only non-word characters and whitespace before a case-insensitive TODO, followed by a nonempty title. The scanner does not treat inline backticks or Markdown differently.

In apps/meteor/tests/e2e/README.md, the "Lists that update in place" section, at lines 45โ€“58, wraps a sentence so that line 58 starts with indentation and a backtick before TODO. The scanner produced the title ` in the page object naming the component that lacks the signal. from that line.

In scripts/todo-issue/src/matcher.ts, an extracted deleted line with an exact title match to an open todo issue goes to toClose. The workflow then comments on the issue and closes it. If an extractor rule change makes the scanner skip the deleted line, the issue stays open.

The README line is a general convention. It names no component. Real component follow-ups already exist as TODOs in DepartmentsTable.tsx and SlaTable.tsx.

File-Level Change Summary and Follow-up Instructions

Impacted files

  • apps/meteor/tests/e2e/README.md: Rewrap the third bullet in "Lists that update in place" so that TODO does not follow only indentation and a backtick. Do not change the text or meaning.
  • Do not change scripts/todo-issue/src/diff.ts, matcher.ts, or .github/workflows/todo.yml.
  • Do not change page objects, specs, or UI components.

Instructions for follow-up agents

  • Before committing, run extractTodos on the staged diff only. The result must contain one delete item with the issue #43700 title and no add items.
  • Do not edit the scanner to fix this ticket. Do not add a changeset.
  • These items are out of scope. Track them separately if necessary:
    • A missing aria-busy in the chats table.
    • The response wait without a TODO in omnichannel-contact-center-chats-filters.spec.ts.
    • The empty-state busy TODOs in DepartmentsTable.tsx and SlaTable.tsx.
    • A general scanner rule for Markdown or inline-backtick TODOs.

๐Ÿš€ Next Steps

Prompt to implement full plan

Task: 1

Rewrap the existing end-to-end testing guidance to remove the false-positive
trigger. Keep the guidance and its meaning unchanged.

- In `apps/meteor/tests/e2e/README.md`, rewrap the third bullet in "Lists that
update in place" at current lines 57โ€“58. Keep "leave a `TODO`" on one line, or
put other leading words before `TODO` on that line.
- Preserve the wording, inline code formatting, line width, and two-space
continuation indentation. The bullet must still instruct readers to wait for the
response, assert something that only the new rows satisfy, and leave a `TODO` in
the page object that names the component that lacks the signal.
- Confirm that no line in the section starts with non-word characters followed
by `TODO`. Check the review checklist entry near line 427 and confirm that its
`TODO` appears mid-line after word characters. If it does, do not edit it.
Confirm that the file has no remaining match and that the edit adds no new
match.
- Do not change other sections, other documentation files, the scanner,
workflow, page objects, specs, or UI components. Do not add a changeset.
===============================================================================

Task: 2

Verify the README diff locally and confirm the issue lifecycle. Do not make
GitHub calls during the local verification.

- From `scripts/todo-issue/`, install package dependencies. Pipe the README `git
diff` into a short Bun script that calls `extractTodos` from `src/diff.ts`. Do
not run `src/index.ts`; it requires a token and can change GitHub issues.
- Confirm one `delete` item with the title `` ` in the page object naming the
component that lacks the signal. `` and label `["todo"]`. Confirm that there are
no `add` items. If an `add` item appears, change the wrapping and repeat the
check.
- Optionally, call `matchTodos` with an in-memory open issue with that title.
Confirm that the deleted item goes to `toClose` and that the other result arrays
are empty.
- Before committing, run `extractTodos` on the staged diff only. Confirm one
`delete` item with the issue #43700 title and no `add` items.
- Keep the pull request to the one documentation change. Use a documentation or
chore prefix, refer to #43700, and explain that the scanner matched an
instructional `TODO`. Do not add a changeset or change `scripts/todo-issue/` in
the same pull request; an extractor change in the same push can prevent closure.
- After the merge to `develop`, confirm that the TODO workflow commented on
#43700 and closed it. If the workflow did not close it, close it manually and
link to the merged pull request.
๐Ÿ’ก Iterate on the plan with: @coderabbitai <feedback>
Example Feedback
- @coderabbitai You can skip phase 3. Add a simple unit test case for phase 2.
- @coderabbitai For design choice 1 go ahead with option 3 and replan.

Start Coding โ†’

coderabbitai[bot] avatar Nov 13 '26 07:11 coderabbitai[bot]

@SigmaSharmaG
I've opened a PR for this: #43736. It rewraps the README bullet so the scanner no longer matches the instructional TODO.

swastiksharma45 avatar Nov 13 '26 19:11 swastiksharma45