Skip to content

fix(client): stabilize mobile send, jump recovery, and PWA diagnostics#112

Merged
Just-Insane merged 7 commits into
integrationfrom
codex/fix-mobile-send-jump-freeze-followups
Jun 16, 2026
Merged

fix(client): stabilize mobile send, jump recovery, and PWA diagnostics#112
Just-Insane merged 7 commits into
integrationfrom
codex/fix-mobile-send-jump-freeze-followups

Conversation

@Just-Insane

@Just-Insane Just-Insane commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Description

Fixes the current follow-up set for mobile sending, jump-to-message stability, autocomplete selection highlighting, and Safari/PWA freeze diagnosis.

  • keeps mobile long-press scheduling, but fixes the touch-timer / pointer-cancellation race so the schedule modal only opens on a real sustained press
  • preserves event-targeted jump context through timeline reset / room init / foreground refresh paths until it rejoins the live timeline
  • makes autocomplete suggestion menus select and highlight the top item by default, and keeps arrow-key navigation highlighting in sync for emoji and command suggestions
  • adds service-worker and visibility diagnostics for long-idle PWA freezes, plus a manual QA checklist for #111, #103, and #109

Related repo history checked before opening this PR:

Closes #111
Closes #103
Closes #109
Closes #113
Related to #91

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

AI disclosure:

  • Partially AI assisted (clarify which code was AI assisted and briefly explain what it does).
  • Fully AI generated (explain what all the generated code does in moderate detail).
    This PR keeps mobile schedule-send on long press, but hardens the gesture handling so movement, release, leave, or cancel reliably stop the timer and only a true sustained press opens the scheduling modal. It updates the timeline sync hook so permalink / reply / bookmark jumps keep their event-focused context through room refresh and foreground recovery instead of being replaced early by the live bottom timeline, and it adds regression tests for those guard paths. It also fixes the shared autocomplete menu so suggestion lists always mark a default selected item and keep arrow-key highlighting synchronized with the active choice, covering emoji and command suggestion flows. Finally, it adds service-worker and app-visibility breadcrumbs and metrics around controller changes, claim requests, reload triggers, and client-claim recovery to narrow down long-idle Safari PWA freezes. The new manual QA document lists the browser/device checks still required because those paths could not be exercised end-to-end from Codex.

@github-code-quality

github-code-quality Bot commented Jun 16, 2026

Copy link
Copy Markdown

Code Coverage Overview

Languages: JavaScript

JavaScript / code-coverage/vitest

The overall coverage in the branch remains at 22%, unchanged from the branch.

Show a code coverage summary of the most impacted files.
File aa2c18a 4b1fec1 +/-
src/app/hooks/u...ppVisibility.ts 81% 76% -5%
src/serviceWorkerBootstrap.ts 48% 45% -3%
src/app/feature...m/RoomInput.tsx 1% 1% 0%
src/app/hooks/t...TimelineSync.ts 73% 75% +2%
src/app/utils/keyboard.ts 22% 26% +4%
src/app/compone...ompleteMenu.tsx 0% 70% +70%
src/app/compone...ompleteMenu.tsx 0% 100% +100%

Updated June 16, 2026 16:12 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

Comment thread src/app/hooks/useAppVisibility.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5614e4347b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/app/hooks/timeline/useTimelineSync.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9d41dc8174

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/app/features/room/RoomInput.tsx
Comment thread src/app/hooks/timeline/useTimelineSync.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8779b19db9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/app/hooks/timeline/useTimelineSync.ts Outdated
Comment thread src/app/components/editor/autocomplete/AutocompleteMenu.tsx
@github-actions

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

Status Preview URL Commit Alias Updated (UTC)
✅ Deployment successful! https://pr-112-charm.justin-tech.workers.dev 4b1fec1 pr-112 Tue, 16 Jun 2026 16:12:20 GMT

@Just-Insane Just-Insane merged commit d7e8609 into integration Jun 16, 2026
14 checks passed
@Just-Insane Just-Insane deleted the codex/fix-mobile-send-jump-freeze-followups branch June 16, 2026 16:14

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4b1fec1956

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if (!(target instanceof HTMLButtonElement)) return;
const buttons = Array.from(items.querySelectorAll<HTMLButtonElement>('button'));
const index = buttons.indexOf(target);
if (index >= 0) applySelectedIndex(index);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Prevent first ArrowUp from skipping the last suggestion

When focus is still in the editor and the user presses ArrowUp as the first autocomplete navigation key, the active FocusTrap handles ArrowUp in the capture phase, moves focus to the last button, and this new focusin path immediately updates selectedIndexRef to that last index. The same keydown then reaches RoomInput, dispatches autocomplete-navigate with direction -1, so the selection lands on the second-to-last item (or stays on the first item when there are only two) instead of wrapping to the last suggestion. Avoid updating the selected ref for that focus-trap move, or suppress the duplicate navigation for editor-originated ArrowUp events.

Useful? React with 👍 / 👎.

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.

Suggestion Menu Highlighting Message send button UX issues on mobile PWA hard freezes after a while Jump Buttons Broken

1 participant