Skip to content

fix(gazzodown): render timestamp inside strikethrough text#39256

Open
Khizarshah01 wants to merge 1 commit intoRocketChat:developfrom
Khizarshah01:fix/timestamp-strikethrough
Open

fix(gazzodown): render timestamp inside strikethrough text#39256
Khizarshah01 wants to merge 1 commit intoRocketChat:developfrom
Khizarshah01:fix/timestamp-strikethrough

Conversation

@Khizarshah01
Copy link
Contributor

@Khizarshah01 Khizarshah01 commented Mar 2, 2026

Proposed changes (including videos or screenshots)

Timestamps inside strikethrough text were not rendering, they silently vanished. The parser grammar explicitly supports timestamps inside strikethrough (StrikethroughContent includes TimestampRules), and StrikeSpan type already included MessageParser.Timestamp, but the render switch had no case for it.

This PR adds the missing TIMESTAMP case to StrikeSpan.

Note: This fix resolves the vanishing issue, timestamps now render inside strikethrough. However, since timestamps render as formatted badges, the <del> strikethrough line is not visually applied to them (similar to how emojis inside strikethrough do not display a line through them)

Before

Screencast.from.2026-03-03.00-44-25.mp4

After (Fix)

Screencast.from.2026-03-03.00-59-37.mp4

Issue(s)

Fixes #39255

Summary by CodeRabbit

  • Bug Fixes
    • Fixed rendering of timestamp elements within strikethrough text. Timestamps now display correctly when included in struck-through content blocks.

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Mar 2, 2026

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Mar 2, 2026

⚠️ No Changeset found

Latest commit: 47edaec

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 2, 2026

Walkthrough

Adds missing TIMESTAMP rendering support to the StrikeSpan component. Imports the Timestamp component and extends the conditional rendering logic to handle block.type === 'TIMESTAMP' blocks within strikethrough text, fixing silent null returns when timestamps appear in strikethrough markup.

Changes

Cohort / File(s) Summary
TIMESTAMP rendering in StrikeSpan
packages/gazzodown/src/elements/StrikeSpan.tsx
Added Timestamp import and extended conditional rendering to treat TIMESTAMP blocks as inline-markup elements wrapped in <del>. Added new render case for TIMESTAMP type.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested labels

type: bug

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding timestamp rendering support inside strikethrough text in the gazzodown component.
Linked Issues check ✅ Passed The PR directly addresses issue #39255 by adding the missing TIMESTAMP render case to StrikeSpan component, enabling timestamps to render inside strikethrough text.
Out of Scope Changes check ✅ Passed All changes are scoped to fixing the timestamp rendering issue in StrikeSpan; no out-of-scope modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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 and usage tips.

Copy link
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 1 file

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
packages/gazzodown/src/elements/StrikeSpan.tsx (1)

35-36: Minor inconsistency with EMOJI handling.

The PR notes that timestamps "appear as formatted badges, so the <del> strikethrough line is not visually applied to them (same behavior as emojis inside strikethrough)." However, EMOJI is intentionally excluded from the <del> wrapper (handled on line 40), while TIMESTAMP is being wrapped here.

This works correctly and achieves the goal, but for consistency with EMOJI, you could move TIMESTAMP out of this condition. That said, wrapping in <del> is semantically correct even if not visually rendered, so the current approach is also reasonable.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/gazzodown/src/elements/StrikeSpan.tsx` around lines 35 - 36, The
condition that excludes block types from the <del> wrapper currently lists
TIMESTAMP alongside INLINE_CODE; to match the EMOJI handling move TIMESTAMP out
of that exclusion so TIMESTAMP is not treated as a non-del-wrapped inline here.
Locate the check on block.type in StrikeSpan (the expression containing
INLINE_CODE and TIMESTAMP) and remove TIMESTAMP from it, ensuring TIMESTAMP is
handled the same way EMOJI is (the separate logic referenced around the EMOJI
handling near the other conditional on line ~40).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@packages/gazzodown/src/elements/StrikeSpan.tsx`:
- Around line 35-36: The condition that excludes block types from the <del>
wrapper currently lists TIMESTAMP alongside INLINE_CODE; to match the EMOJI
handling move TIMESTAMP out of that exclusion so TIMESTAMP is not treated as a
non-del-wrapped inline here. Locate the check on block.type in StrikeSpan (the
expression containing INLINE_CODE and TIMESTAMP) and remove TIMESTAMP from it,
ensuring TIMESTAMP is handled the same way EMOJI is (the separate logic
referenced around the EMOJI handling near the other conditional on line ~40).

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5518503 and 47edaec.

📒 Files selected for processing (1)
  • packages/gazzodown/src/elements/StrikeSpan.tsx
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: cubic · AI code reviewer
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation

Files:

  • packages/gazzodown/src/elements/StrikeSpan.tsx
🔇 Additional comments (1)
packages/gazzodown/src/elements/StrikeSpan.tsx (1)

8-8: LGTM!

Import is correctly added and follows the existing pattern for sibling element components.

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.

Timestamp not rendered inside strikethrough text in gazzodown

1 participant