Skip to content

feat: show synced tabs from other devices on the same profile#39

Open
jatinpandey wants to merge 3 commits into
zarazhangrui:mainfrom
jatinpandey:feat/cross-device-tabs
Open

feat: show synced tabs from other devices on the same profile#39
jatinpandey wants to merge 3 commits into
zarazhangrui:mainfrom
jatinpandey:feat/cross-device-tabs

Conversation

@jatinpandey

Copy link
Copy Markdown

Adds a new "On your other devices" section to the dashboard that fetches synced tabs via chrome.sessions.getDevices() and renders one subsection per device, each with the same domain-grouped layout the local tabs use.

  • manifest: add "sessions" permission
  • app.js: extract groupTabsByDomain() helper; share renderChip(); add remote/read-only mode to renderDomainCard (no close/dedup, chips click through chrome.sessions.restore to open locally); add fetchOtherDeviceTabs / renderDeviceSubsection / renderOtherDevicesSection
  • index.html: add #otherDevicesSection and a sync-off hint
  • style.css: device-subsection header + subtle remote-card background

Note: Chrome exposes no extension API to close a tab on a remote device, so remote cards are intentionally read-only.

Jatin Pandey added 3 commits April 27, 2026 20:54
Adds a new "On your other devices" section to the dashboard that
fetches synced tabs via chrome.sessions.getDevices() and renders one
subsection per device, each with the same domain-grouped layout the
local tabs use.

- manifest: add "sessions" permission
- app.js: extract groupTabsByDomain() helper; share renderChip();
  add remote/read-only mode to renderDomainCard (no close/dedup,
  chips click through chrome.sessions.restore to open locally);
  add fetchOtherDeviceTabs / renderDeviceSubsection / renderOtherDevicesSection
- index.html: add #otherDevicesSection and a sync-off hint
- style.css: device-subsection header + subtle remote-card background

Note: Chrome exposes no extension API to close a tab on a remote
device, so remote cards are intentionally read-only.
- Add an inline-editable "name" label to every chip (local + remote).
  Pencil icon turns the chip text into an input; Enter or blur saves,
  Esc cancels. Persists to chrome.storage.local under siteNames keyed
  by URL, so a rename applies to the same URL anywhere it appears
  (including synced tabs from other devices).
- Add a global search bar at the top of the dashboard. Filters open
  tabs, every other-device subsection, and the saved-for-later list
  in real time. Matches case-insensitively on custom name, page
  title, auto-cleaned label, and URL. Cmd/Ctrl+K focuses, Esc clears.
- Refactor renderStaticDashboard: split fetch from render so search
  keystrokes and rename commits don't re-call chrome.tabs.query or
  chrome.sessions.getDevices. Introduces rerenderTabSections() and
  splits the old async renderOtherDevicesSection into a fetch step
  plus a pure DOM update.
Rename:
- The rename input now starts pre-filled with the current label
  (custom name if set, otherwise the auto-cleaned title) so the user
  can edit instead of retyping from scratch. Submitting an unchanged
  value (or the auto-label verbatim) is treated as a no-op rather
  than locking the auto-label in as a "custom" name.

Drag-and-drop reorder:
- Each local domain card now has a small drag handle (top-right,
  visible on hover). Only the handle is draggable so chips, buttons,
  and the rename input keep normal click/text behavior.
- Dropping splices the card into the new DOM position and persists
  the resulting order to chrome.storage.local under "domainOrder".
- Stored order is applied as a stable primary sort over the natural
  groupTabsByDomain output, so unrenamed/unmoved domains keep their
  default ordering. Reordering while a search filter is active
  preserves the relative order of filtered-out domains.
- Visual cues: faded card while dragging, amber insertion line above
  or below the drop target depending on cursor position.
pintaste added a commit to pintaste/tab-out that referenced this pull request May 19, 2026
Fetches tabs from other Chrome devices via sessions.getDevices(). Renders per-device subsections with tab count and last-active time. Click restores tab locally via sessions.restore() with tabs.create fallback. Adapted from upstream PR zarazhangrui#39 by jatinpandey.
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.

1 participant