Skip to content

fix(navigation): preserve observer investigation and keyboard return - #87

Open
n30nex wants to merge 12 commits into
MeshCore-Beacon:devfrom
n30nex:codex/beacon-observer-return-navigation
Open

n30nex wants to merge 12 commits into
MeshCore-Beacon:devfrom
n30nex:codex/beacon-observer-return-navigation

Conversation

@n30nex

@n30nex n30nex commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does

Observer quick inspection ignored Escape, advert packets could open behind the observer, and opening a dashboard discarded the originating tab's local state. Reuse the existing panels in opening order and keep one originating screen mounted under its original Router location during a canonical observer-dashboard visit. It stays invisible and inert with unchanged geometry: display:none caused the virtualized packet list to lose its scroll position.

Closes #86. Depends on #85 at b21b8704c7403d7f963dc445de7137b9857e194e. Focused diff.

Escape/Close now dismisses only the active panel and restores its trigger. Advert rows are keyboard buttons and carry the observer's actual observation ID into packet inspection. An embedded analyzer leaves its originating packet URL untouched. Reopening an entity already in the investigation returns to that panel instead of growing a cycle; tab/region/entity changes clear obsolete panels.

A translated return action and browser Back restore the originating filters, sorting, scroll, selected reports and map view. Dashboard period/picker/comparison adjustments replace that visit's history entry. Direct/copied/reloaded dashboard links stay standalone; this does not persist arbitrary UI state across a reload. The Analytics observer leaderboard uses the same return handler and offers keyboard buttons beside its canvas chart. Existing server APIs are reused, with no dependency or database change.

Type of change

  • Bug fix
  • Refactor
  • Tests

Checklist

  • Windows production build passes
  • Lint has no errors (existing virtualizer/compiler warning remains)
  • Final native Pi build/lint and all 929 tests pass (106 files)
  • Regression tests were observed failing before implementation
  • Frontend types still match beacon-server; advert IDs are packet-observation IDs
  • Contribution rules followed; existing issue discussed before implementation

Testing notes

Original feature head 98f820d passes Windows production build/lint, the native Pi build/lint and 929 tests, and exact-head GitHub CI (CodeQL remains skipped). Regression tests were observed failing before the relevant changes. Existing large-chunk/virtualizer compiler warnings remain.

Browser checks cover route filter/sort/720px scroll restoration; exact advert selection among 17 reports; map -> packet -> observer Escape and focus return; identical copied map centre/zoom/layer/node settings; Analytics period/expanded-list/chart restoration via keyboard; directory detours; EN/FR and 390px phone layouts. A real virtualized packet regression was found and fixed before final handoff: final public scroll/viewport measurements stay 442px / 506px before, during and after the dashboard, with the exact report URL unchanged. The retained origin is invisible/inert, not display:none, so its measured geometry stays intact.

Pi preview / changelog and corresponding source initially ran web 98f820d2 on unchanged server 99e623c5. All 18 public assets and both source archives match; both MQTT feeds and public LIVE are verified. No containers restarted. Immediate frontend rollback retains 5a261162; the phase-start 3b3abdcc build and existing database recovery remain separate. Direct/shared/reloaded dashboards remain standalone; physical iPhone Safari is not verified.

Merge after #85. Stable release and production cutover remain owner-managed.

AI-assisted implementation under the author's ongoing project scope. No specific human review of this new diff is claimed. Maintainers retain merge and release control.

Current integration (28 September): the queue is refreshed onto accepted web dev 17f48fb9. Parent b21b8704c7403d7f963dc445de7137b9857e194e, published head be5434a3d4784e26434b5395693896dc7139fd4d. Focused diff. Build/lint/tests pass for this refreshed tree and actual-head build CI passes (repository CodeQL skipped). The full web composition 6b688495 is now deployed on Pi server 2ed2e031, retaining every candidate. Its native build/lint and all 935 tests pass; all 18 public assets and both source archives match. Web assets are byte-identical to the previously geometry-tested build; fresh English desktop/French phone and Public-message packet inspection pass. Current evidence and recovery. Earlier feature-specific validation above is historical. No feature behavior changed in this base refresh.

@n30nex

n30nex commented Sep 27, 2026

Copy link
Copy Markdown
Contributor Author

@MrAlders0n, final head 98f820d2 is ready for your / Claude's review. It follows #85 and closes #86. The focused diff is in the description.

Escape/Close now returns one panel at a time, observer adverts open their exact report, and observer dashboards preserve the originating route, packet, node, map or Analytics view. The Analytics chart also has keyboard observer links. A public packet-list check caught a layout-specific scroll jump; the final fix keeps the origin invisible/inert with stable geometry. The final public test preserved 442px scroll, 506px viewport height and the selected-report URL throughout the visit.

The Pi runs this exact web head on unchanged server 99e623c5, including every previous review candidate. Native build/lint and 929 tests pass; exact-head CI is green (CodeQL skipped). Desktop/phone, EN/FR, Back/Forward, map-camera and selected-report checks pass. Preview/source/changelog match; rollback is retained and no containers restarted. Merges and production release remain yours.

@n30nex
n30nex force-pushed the codex/beacon-observer-return-navigation branch from 98f820d to be5434a Compare September 28, 2026 22:38
@MrAlders0n

Copy link
Copy Markdown
Member

The panel stack and top-only Escape handling look correct, and focus return works. My concern is scope. This is a fix PR, but it also adds the "dashboard visit" mode (App.tsx:297-311), which keeps the original tab mounted and hidden, still running WS updates and queries against the old location. Could you split it into:

  1. the panel stack plus Escape/focus return, and
  2. the dashboard return mode, as its own PR?

Also:

  • MeshTab.tsx:146-156: the "Inspect an observer" keyboard list is new a11y UI. Was that requested in Complete observer quick-inspection keyboard and return navigation #86? If not, please leave it out for now.
  • PacketPathMapModal.tsx:52: the copy-link clears about 15 params listed by hand, so any new param will leak into copied links. An allowlist of the params to keep would be safer.
  • ObserverDetailPanel.tsx:19-47: the advert row <button> contains <div>s. Please use spans.

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.

Complete observer quick-inspection keyboard and return navigation

2 participants