Skip to content

FE: Use unique filenames for saved messages - #1895

Open
HurSungYun wants to merge 1 commit into
kafbat:mainfrom
HurSungYun:feat/message-save-filename
Open

FE: Use unique filenames for saved messages#1895
HurSungYun wants to merge 1 commit into
kafbat:mainfrom
HurSungYun:feat/message-save-filename

Conversation

@HurSungYun

@HurSungYun HurSungYun commented Jun 25, 2026

Copy link
Copy Markdown
Contributor
  • Breaking change? (if so, please describe the impact and migration path for existing application instances)

What changes did you make? (Give an overview)

AS-IS

Currently, when users click the "Save as a file" button in the Messages tab, every file has the same name. As a result, users cannot distinguish between multiple saved messages.

스크린샷 2026-06-25 오후 11 15 15

TO-BE

The filename should use the following format:

${sanitizedTopicName}-${partition}-${offset}.json

This ensures that each saved message has a unique filename.

2026-06-25.11.31.37.mov

Is there anything you'd like reviewers to focus on?

None

How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)

  • No need to
  • Manually (please, describe, if necessary)
  • Unit checks
  • Integration checks
  • Covered by existing automation

Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (e.g. ENVIRONMENT VARIABLES)
  • My changes generate no new warnings (e.g. Sonar is happy)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

Check out Contributing and Code of Conduct

A picture of a cute animal (not mandatory but encouraged)

Summary by CodeRabbit

  • New Features
    • “Save as a file” now downloads each message with a unique, readable filename based on the topic name, partition, and offset.
  • Bug Fixes
    • Replaced the generic filename for message exports, making saved files easier to identify and avoid overwriting.

@HurSungYun
HurSungYun requested a review from a team as a code owner June 25, 2026 14:39
@kapybro kapybro Bot added status/triage/manual Manual triage in progress and removed status/triage/manual Manual triage in progress labels Jun 25, 2026
@kapybro

kapybro Bot commented Jun 25, 2026

Copy link
Copy Markdown

AI Summary

The issue describes a problem where saved message files in the Messages tab have identical filenames, making it difficult for users to distinguish between multiple saved messages. The proposed solution is to use a unique filename format combining the sanitized topic name, partition, and offset, ensuring each file is distinct. Manual testing was performed to validate the solution.

@kapybro kapybro Bot changed the title FE: Use unique filenames when saving messages Use unique filenames for saved messages Jun 25, 2026
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The message download filename now includes a sanitized topic name plus partition and offset instead of a fixed filename.

Changes

Message download filename

Layer / File(s) Summary
Per-message filename
frontend/src/components/Topics/Topic/Messages/Message.tsx
useDataSaver now receives a filename derived from topicName with invalid characters replaced by _, together with partition and offset.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

I nibble names to make them neat,
🐰 topic hops to filename street.
Partition, offset—now in tow,
A tidy save for each message flow.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 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 changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly matches the main change: saved message downloads now use unique filenames.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@kapybro kapybro Bot added area/messages scope/frontend Related to frontend changes type/enhancement En enhancement/improvement to an already existing feature labels Jun 25, 2026
@HurSungYun HurSungYun changed the title Use unique filenames for saved messages FE: Use unique filenames for saved messages Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/messages scope/frontend Related to frontend changes type/enhancement En enhancement/improvement to an already existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant