Skip to content

Show upload times and filenames in work item attachment history - #10483

Open
Bharath-K-Shetty wants to merge 1 commit into
makeplane:previewfrom
Bharath-K-Shetty:fix/work-item-attachment-history
Open

Bharath-K-Shetty wants to merge 1 commit into
makeplane:previewfrom
Bharath-K-Shetty:fix/work-item-attachment-history

Conversation

@Bharath-K-Shetty

@Bharath-K-Shetty Bharath-K-Shetty commented Dec 5, 2026 •

Copy link
Copy Markdown

Description

When two versions of a file have the same name and size, it is hard to tell which one was uploaded last. Both attachment views now show the creation date and time in the viewer's local time zone. The newest attachment appears first immediately after upload and after refreshing.

Upload entries in Activity now show the filename. Older entries with an unrecognized or missing storage key retain their generic upload message.

Type of Change

  • Feature

Test Scenarios

  • Ran pnpm check across the workspace. All 56 tasks passed.
  • Added two serializer tests for the original creation timestamp and two frontend tests for filename rendering and fallback text. All four passed.
  • Verified both attachment views in Chrome with a simulated upload service. Two identically named files retained their order after refresh, and an upload near midnight displayed the correct local date and time.

References

Closes #10472

Summary by CodeRabbit

  • New Features
    • Attachment activity messages now include the filename when available.
    • Attachment lists and details show when each file was uploaded and identify its creator.
  • Bug Fixes
    • Attachments are consistently ordered by upload date, with duplicates prevented when new uploads are added.
    • Attachment timestamps now reflect their original upload time, even if the attachment was updated later.

@coderabbitai

coderabbitai Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Attachment data now exposes creation timestamps. Attachment lists sort by creation time and display upload timestamps. Created-attachment activity messages include the filename when it can be extracted from the asset key.

Changes: Attachment upload details

Layer / File(s) Summary
Creation timestamp contract
packages/types/src/issues/issue_attachment.ts, apps/api/plane/app/serializers/issue.py, apps/api/plane/tests/unit/serializers/test_attachment_timestamp.py
TIssueAttachment and the lite serializer expose created_at. Tests check that both serializers return the creation time when it differs from updated_at.
Attachment ordering and metadata
apps/web/store/issue/issue-details/attachment.store.ts, apps/web/components/issues/attachment/attachment-detail.tsx, apps/web/components/issues/attachment/attachment-list-item.tsx
Attachment IDs are deduplicated and sorted by creation time, newest first. Attachment detail and list views display the creation timestamp and use it in uploader tooltips.
Filenames in upload activity
apps/web/helpers/attachment-activity.ts, apps/web/helpers/attachment-activity.test.mjs, apps/web/components/core/activity.tsx, apps/web/components/issues/issue-detail/issue-activity/activity/actions/attachment.tsx
Created-attachment activity messages use a helper to extract filenames from matching asset keys. The helper returns generic upload wording for other inputs. Tests cover both cases.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature · Severity of issue fixed: Low

Merge Risk: Minimal · up to 69bc5

Attachment rows now show upload date and time, the newest attachment appears first, and upload activity entries include the filename. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the two main user-visible changes: upload times in attachment history and filenames shown in attachment activity entries. The changeset adds created_at to attachment serializers and vi…
Description check Passed The description follows the repository template in substance. It explains the change, marks the Type of Change as Feature, and gives test scenarios with commands and manual verification. It lists the …
Linked Issues check Passed Issue #10472 has three coding objectives. (1) Show upload date and time on each attachment row. The PR adds created_at to IssueAttachmentLiteSerializer (apps/api/plane/app/serializers/issue.py), a…
Out of Scope Changes check Passed All changed files map to the objectives in #10472. Serializer, type, and store changes provide the timestamp data and ordering. The attachment list and detail components render date and time and the c…
Full details: Title check

Explanation

The title names the two main user-visible changes: upload times in attachment history and filenames shown in attachment activity entries. The changeset adds created_at to attachment serializers and views, and getAttachmentUploadMessage to Activity rendering. The title is specific and matches the primary change, so it passes.

Full details: Description check

Explanation

The description follows the repository template in substance. It explains the change, marks the Type of Change as Feature, and gives test scenarios with commands and manual verification. It lists the sections Description, Type of Change, Test Scenarios, and References. It omits the Screenshots and Media section, which is optional. Its References section links issue #10472. The description is clear and specific, so it passes.

Full details: Linked Issues check

Explanation

Issue #10472 has three coding objectives. (1) Show upload date and time on each attachment row. The PR adds created_at to IssueAttachmentLiteSerializer (apps/api/plane/app/serializers/issue.py), adds created_at: string to TIssueAttachment, and renders the formatted creation time in a <time> element in attachment-list-item.tsx. attachment-detail.tsx also shows the creation timestamp. Serializer tests check that created_at equals the attachment creation value even when updated_at is later. (2) Show the file name in Activity. getAttachmentUploadMessage in apps/web/helpers/attachment-activity.ts extracts the filename from the storage key. activity.tsx and actions/attachment.tsx use it for created-attachment entries. Frontend tests cover filenames with spaces, punctuation, and non-ASCII characters. (3) Fix inconsistent ordering so the newest upload appears first after upload and after refresh. attachment.store.ts now merges IDs uniquely and sorts by created_at descending, and successful uploads use addAttachments. The issue does not state a required sort direction. The PR chose newest first, which resolves the reported inconsistency. Fallback behavior for null, empty, or unrecognized keys matches the issue. Evidence comes from the PR summary and the linked issue text. The summary was not checked against full diff hunks; the verdict relies on that summary.

Full details: Out of Scope Changes check

Explanation

All changed files map to the objectives in #10472. Serializer, type, and store changes provide the timestamp data and ordering. The attachment list and detail components render date and time and the creator tooltip. Activity components and the helper render the filename. The helper test file covers the new helper. The min-w-0 layout change in attachment-list-item.tsx supports the added timestamp line and filename truncation. The change of the uploader tooltip from updater to creator with creation time directly serves the requirement to identify which version was uploaded last. No unrelated changes appear in the summary.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: adb3961e-41b9-4c6b-826d-c4f6bd264478
Commits

Reviewing files that changed from the base of the PR and between 3ad2c27 and 69bc52a.

Files selected for processing: 10

  • apps/api/plane/app/serializers/issue.py
  • apps/api/plane/tests/unit/serializers/test_attachment_timestamp.py
  • apps/web/components/core/activity.tsx
  • apps/web/components/issues/attachment/attachment-detail.tsx
  • apps/web/components/issues/attachment/attachment-list-item.tsx
  • apps/web/components/issues/issue-detail/issue-activity/activity/actions/attachment.tsx
  • apps/web/helpers/attachment-activity.test.mjs
  • apps/web/helpers/attachment-activity.ts
  • apps/web/store/issue/issue-details/attachment.store.ts
  • packages/types/src/issues/issue_attachment.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

This branch has not been deployed

No deployments
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.

[feature]: Show upload date and time in the attachment list, and the file name in Activity

1 participant