Skip to content

Conversation

kushagra0902
Copy link

@kushagra0902 kushagra0902 commented Oct 1, 2025

Screenshot 2025-10-01 173227

#369

In the containers table on the frontend, date was coming up as 1 Jan irrespective of creation date despite of correct date coming from the backend. Also made container cell column position dynamic.

Summary by CodeRabbit

  • Refactor

    • Simplified table rendering while preserving sorting, row navigation, port display, and action behaviors.
  • Style

    • Updated date display to a concise day-month-year format using a short month label.
    • Improved empty-state handling so the placeholder row spans the correct number of columns when an Actions column is present.

Copy link
Contributor

coderabbitai bot commented Oct 1, 2025

Walkthrough

Updated the Containers table rendering in view/app/containers/components/table.tsx: changed created-date formatting to use the raw container.created value with numeric day, short month and year; adjusted the empty-state row colspan to 7 when onAction is present, otherwise 6. No other behavioral changes.

Changes

Cohort / File(s) Summary of changes
Containers table changes
view/app/containers/components/table.tsx
Date formatting now uses the raw container.created value and renders day (numeric), month (short) and year; updated "no containers" table row colSpan to 7 when onAction is truthy, otherwise 6. No changes to row click navigation, ports rendering, or actions.

Sequence Diagram(s)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

nixopus-view

Poem

I nibble at the table's light,
Short months now sparkle, tidy, bright.
Empty rows count columns right,
Ports and actions keep their flight.
A hop, a commit — the view feels light. 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Title Check ✅ Passed The title accurately describes the primary change by indicating a bug fix for incorrect dates on the frontend and matches the updated date formatting in the containers table. It is concise and focused on the main issue without extraneous detail, making the purpose of the PR clear to reviewers. As such, it effectively summarizes the core fix being introduced.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

@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.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6f00276 and 5142cf5.

📒 Files selected for processing (1)
  • view/app/containers/components/table.tsx (3 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
view/app/containers/components/table.tsx (1)
view/components/ui/table.tsx (1)
  • TableCell (92-92)
🔇 Additional comments (2)
view/app/containers/components/table.tsx (2)

145-145: LGTM! Correct colspan calculation.

The colspan correctly accounts for the optional Actions column (7 columns when onAction is present, 6 otherwise), ensuring the empty state message spans all columns properly.


86-90: Verify container.created format for new Date compatibility. The Intl.DateTimeFormat usage is correct, but ensure container.created is an ISO-8601 string or millisecond timestamp. If it’s a seconds-since-epoch value (as a string), convert it (new Date(Number(container.created) * 1000)) before formatting.

@zhravan zhravan changed the title Fixed wrong date coming on the frontend bug: fix wrong date coming on the frontend Oct 3, 2025
Copy link
Collaborator

@zhravan zhravan left a comment

Choose a reason for hiding this comment

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

PR LGTM. We will consider releasing this in coming release cycle.

Thank you @kushagra0902 for considering contributing to the project and look forward for more active participation and contribution.

Happy learning 💚 🙌🏻

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.

3 participants