Skip to content

feat: add set-as-my-location from map long-press, connector and UI #293

Merged
zjs81 merged 3 commits into
mainfrom
map-set-location-and-connector-improvements
Mar 14, 2026
Merged

feat: add set-as-my-location from map long-press, connector and UI #293
zjs81 merged 3 commits into
mainfrom
map-set-location-and-connector-improvements

Conversation

@zjs81

@zjs81 zjs81 commented Mar 14, 2026

Copy link
Copy Markdown
Owner

improvements

Add "Set as my location" option to the map long-press bottom sheet, allowing users to set their device position directly from the map. Includes connector, chat, contacts, and message retry service improvements.

…provements

Add "Set as my location" option to the map long-press bottom sheet,
allowing users to set their device position directly from the map.
Includes connector, chat, contacts, and message retry service improvements.

@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: 71f59d23df

ℹ️ 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 lib/services/message_retry_service.dart Outdated
Comment on lines +368 to +370
final queuesToSearch = targetContactKey != null
? {targetContactKey: _pendingMessageQueuePerContact[targetContactKey]}
: _pendingMessageQueuePerContact;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Search all contact queues when hash fallback is needed

In updateMessageFromSent, the queue fallback now limits lookup to a single contact queue chosen from the first _activeMessages entry. If two contacts have in-flight sends and hash-based matching misses (the exact condition this fallback is meant to recover), a RESP_CODE_SENT for the other contact will return no match, so no _ackHashToMessageId mapping is recorded and the later send-confirm ACK cannot be correlated. This causes false retries/failed delivery tracking in concurrent chats.

Useful? React with 👍 / 👎.

Comment thread lib/services/notification_service.dart Outdated
Comment on lines +357 to +358
for (final id in contactIds) {
await _notifications.cancel(id: id.hashCode);

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 Separate advert cancellation IDs from message notification IDs

This advert-clear path cancels notifications by contactId.hashCode, but message notifications are also posted with contactId.hashCode in _showMessageNotificationImpl (and adverts use the same pattern in _showAdvertNotificationImpl). Because Contacts now calls this clear path on open, opening the Contacts screen can unintentionally clear active unread message notifications for the same contacts. Advert notifications need a distinct ID namespace so only advert toasts are removed.

Useful? React with 👍 / 👎.

@zjs81

zjs81 commented Mar 14, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@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: 91608ff09e

ℹ️ 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 on lines +186 to +188
_activeMessages.add(messageId);
_attemptSend(messageId);
return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Handle _attemptSend failures before marking message active

_sendNextForContact adds the message to _activeMessages and then fire-and-forgets _attemptSend, but _attemptSend awaits path callbacks that can throw (for example on transport/write failures). If that happens, _onMessageResolved is never reached, so the message stays active forever and later queued messages for that contact never get sent.

Useful? React with 👍 / 👎.

Comment thread lib/screens/map_screen.dart Outdated
Comment on lines +1523 to +1525
await connector.refreshDeviceInfo();
if (!mounted) return;
messenger.showSnackBar(SnackBar(content: Text(message)));

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 Avoid showing location-updated success when not connected

This handler always shows settings_locationUpdated after calling setNodeLocation/refreshDeviceInfo, but both connector methods are no-ops when disconnected. If the device is disconnected (or disconnects while the sheet is open), users get a false success message even though no location update was sent.

Useful? React with 👍 / 👎.

@zjs81 zjs81 merged commit 8b280b3 into main Mar 14, 2026
6 checks passed
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