rspace-online/backlog/tasks/task-62 - Tab-bar-persisten...

2.0 KiB

id title status assignee created_date updated_date labels dependencies priority
TASK-62 Tab bar persistence + iframe loading/error states Done
2026-02-26 02:19 2026-02-26 02:19
bugfix
shell
iframe
TASK-61
high

Description

Fix two issues from the iframe shell rollout: (1) tab bar was resetting to a single tab on every page navigation — now persists in localStorage, (2) iframed standalone apps that aren't running showed a blank page — now shows spinner + 12s timeout error panel with retry/open-directly actions. Also converts rSwag to iframe shell (missed in TASK-61).

Acceptance Criteria

  • #1 Tabs persist across full-page navigations via localStorage
  • #2 Opening a new rApp adds it as a tab alongside existing ones
  • #3 Closing active tab navigates to first remaining tab
  • #4 Iframe shows loading spinner while standalone app loads
  • #5 12s timeout shows error panel if standalone app unreachable
  • #6 Error panel has Retry button and Open Directly link
  • #7 rSwag module converted to iframe shell
  • #8 CommunitySync merges with localStorage tabs when connected

Final Summary

Rewrote tab bar initialization in server/shell.ts to use localStorage keyed per space (rspace_tabs_{spaceSlug}). Previously tabBar.setLayers([defaultLayer]) was called with only the current module on every page load, wiping all previous tabs. Now reads from localStorage first, adds the current module if missing, and persists before rendering.\n\nAdded loading/error states to renderIframeShell(): spinner overlay during load, 12s timeout that shows an error panel with the module name, domain that failed, Retry button, and Open Directly link. Iframe fades in on successful load.\n\nConverted modules/swag/mod.ts to use renderIframeShell with swag.mycofi.earth (missed in TASK-61).\n\nCommit: fa6a2ce — merged to main.