Skip to content

View: Chrome-style project tab groups + session persistence - #1047

Open
dhingora-amd wants to merge 4 commits into
mainfrom
dhingora/project-tab-groups
Open

dhingora-amd wants to merge 4 commits into
mainfrom
dhingora/project-tab-groups

Conversation

@dhingora-amd

Copy link
Copy Markdown
Contributor

Motivation

Working with several traces at once meant a flat row of unrelated tabs with
no way to organize them, and nothing was remembered between runs. This adds
Chrome-style tab groups (called projects) and restores your open
workspace on the next launch.

Technical Details

  • Rename: the per-tab bundle ProjectProjectItem
    (rocprofvis_project_item.*); new Project class is a named, colored,
    ordered tab group (rocprofvis_project.*).
  • Custom tab strip: TabContainer now hand-draws tabs (replacing ImGui's
    tab bar) to support group chips (click to collapse/expand), tinted/underlined
    members, drag-to-reorder, and dragging a whole group as a unit.
  • Group management: create/assign/remove/ungroup/recolor/rename via the
    tab & chip right-click menus and the File > Projects submenu; opening
    multiple files together auto-groups them.
  • Save/load: a .rpv is now always a project — it embeds each item's full
    view settings (track order/heights, bookmarks, annotations). Old single-item
    .rpv files still load (as a one-tab project). Unified scope-aware
    Save / Save As.
  • Session persistence: the whole workspace is snapshotted to
    <config>/last_session.json on shutdown and reopened on a plain launch
    (no file arg); missing traces are skipped silently.
  • Docs: .agents/UI.md updated for the rename, the new group model, and
    the custom strip.

Introduce a "Project" as a named, colored, collapsible group of tabs
(Chrome tab-group style), and rename the per-tab unit to ProjectItem.

- Rename per-tab Project -> ProjectItem (+ the ProjectItemSetting
  family); rocprofvis_project.{h,cpp} -> rocprofvis_project_item.{h,cpp}.
- Add Project (rocprofvis_project.{h,cpp}): an ordered group of
  ProjectItems with a name, color, and remembered closed items.
- Replace the ImGui tab bar with a custom tab strip: inline group chips,
  collapse/expand, drag-to-reorder tabs, and dragging a whole group via
  its chip (collapse-on-drag) with a floating drag ghost.
- Group management via tab and chip right-click menus and a
  File > Projects submenu: create / add / move / remove / ungroup,
  rename, recolor, reopen closed items, close group; auto-group when
  multiple files are opened together.
- A .rpv is always a project now. Saving embeds each item's full
  per-view settings (track order/heights, bookmarks, annotations), and
  Save / Save As are unified to operate on the whole project. Old
  single-item .rpv files still parse and open as a one-tab project.
- Reuse SettingsManager::GetColorWheel() for group colors (theme-aware)
  instead of a duplicate palette.
Snapshot the whole workspace (all tab groups + ungrouped tabs, each with
its full per-view settings) to <config>/last_session.json on graceful
shutdown, and reopen it on the next plain launch (no file argument).
Missing traces are skipped silently. Factor the per-item open path out of
OpenProjectGroupFile into a shared OpenItemFromSettings helper reused by
both the project loader and session restore.
Drop comments that restate the code or duplicate the header docs, and
condense the rest to one line.
}

void
AppWindow::RestoreSession()
Comment on lines +148 to +150
/*
* Writes the item settings into m_project_file_path;
*/
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.

2 participants