Skip to content

Conversation

@JoshFerge
Copy link
Member

@JoshFerge JoshFerge commented Jan 26, 2026

Summary

When creating a new dashboard, the default name "Untitled Dashboard" causes a conflict if the user already has a dashboard with that name, resulting in a "Dashboard title already taken" error due to the unique constraint on (organization, title).

This adds a timestamp to the default dashboard title when creating a new dashboard (e.g., "Untitled Dashboard - Jan 26, 2026 2:30 PM") to prevent naming collisions.

As i am a lazy person, this causes a bit of friction when i go to save my dashboard. Another possible update in the future would be to use the user.name / user.email field as well in the title. "Josh's Untitled Dashboard -- $TIMESTAMP"

Changes

  • Added timestamp generation using user's local timezone
  • Modified baseDashboard to include timestamp in title when creating from EMPTY_DASHBOARD (templates retain their original names)

Tested locally and looks to work.

PR made with claude code

When creating a new dashboard, the default name "Untitled Dashboard"
causes conflicts if a user already has a dashboard with that name.
This adds a timestamp to the default title (e.g., "Untitled Dashboard -
Jan 26, 2026 2:30 PM") to prevent naming collisions.
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jan 26, 2026
@JoshFerge JoshFerge marked this pull request as ready for review January 26, 2026 16:45
@JoshFerge JoshFerge requested a review from a team as a code owner January 26, 2026 16:45
@gggritso
Copy link
Member

🤔 I like this a lot, but this fix should be coordinated with the backend code. We already have some logic that auto-increments dashboard names: #80293

Clearly, that code is not working in your case! On one hand I'd like to know why, but on the other hand, who even cares, the timestamp approach is a lot tidier, maybe we should just go with that?

If you're down, it'd be great if you remove the FE code and instead updated OrganizationDashboardsEndpoint to use timestamps instead of incrementing the dashboard name

@JoshFerge
Copy link
Member Author

🤔 I like this a lot, but this fix should be coordinated with the backend code. We already have some logic that auto-increments dashboard names: #80293

Clearly, that code is not working in your case! On one hand I'd like to know why, but on the other hand, who even cares, the timestamp approach is a lot tidier, maybe we should just go with that?

If you're down, it'd be great if you remove the FE code and instead updated OrganizationDashboardsEndpoint to use timestamps instead of incrementing the dashboard name

ah i didn't realize the name was generated by the backend. good to know. And yeah, I think this problem i'd like to fix is similar, except in my case it's not duplicating dashboards, but creating new ones from no template

@gggritso
Copy link
Member

this problem i'd like to fix is similar, except in my case it's not duplicating dashboards

Ah, understood! That was a good pointer, because it led me to a "tidier" solution here: #107023

@JoshFerge JoshFerge closed this Jan 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants