Skip to content

Add region management#379

Draft
stphnrdmr wants to merge 1 commit into
zjs81:devfrom
stphnrdmr:sr-regions
Draft

Add region management#379
stphnrdmr wants to merge 1 commit into
zjs81:devfrom
stphnrdmr:sr-regions

Conversation

@stphnrdmr
Copy link
Copy Markdown
Contributor

This adds region management: the user can manage a list of available regions and for each channel pick a region from that list to apply to messages.

Region discovery from nearby repeaters will be done in a separate PR.

This is a part of the work needed for #120.

This adds region management: the user can manage a list of available regions
and for each channel pick a region from that list to apply to messages.

Region discovery from nearby repeaters will be done in a separate PR.

This is a part of the work needed for zjs81#120.
Comment on lines +185 to +199
// TODO(clauwn): add community handling
final isCommunityChannel = false;
final isCommunityPublic = false;

if (isCommunityChannel) {
iconColor = Colors.purple;
bgColor = Colors.purple.withValues(alpha: 0.2);
icon = isCommunityPublic ? Icons.groups : Icons.tag;
} else if (widget.channel.isPublicChannel) {
icon = Icons.public;
iconColor = Colors.green;
bgColor = Colors.green.withValues(alpha: 0.2);
} else if (widget.channel.isHashtagChannel) {
icon = Icons.tag;
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is code from lib/screens/channels_screen.dart, which includes handling for the community channels. How do we want to manage this, other than duplicating it?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Probably just a helper instead of duplicating

Copy link
Copy Markdown
Contributor Author

@stphnrdmr stphnrdmr Apr 14, 2026

Choose a reason for hiding this comment

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

I'm mostly talking about the relationships that are kept in a data structure in the channels screen. It's the part that i mentioned a relational database could be nice for

@stphnrdmr stphnrdmr marked this pull request as draft April 14, 2026 11:18
@446564 446564 self-assigned this Apr 16, 2026
@446564
Copy link
Copy Markdown
Collaborator

446564 commented Apr 16, 2026

Looks good so far. Tested and working as expected.

I think for now just move that community channel stuff into a shared helper until we get into a better database for storage where we can have relationships. Or start storing a bool for community channels in the normal community model and storage.

@zjs81
Copy link
Copy Markdown
Owner

zjs81 commented May 8, 2026

@codex review

Copy link
Copy Markdown

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

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: 0e074fd806

ℹ️ 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".

expectsGenericAck: true,
);
} finally {
await sendFrame(buildSetFloodScopeFrame(''));
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 consuming message ACKs with flood-scope reset

When a channel message is sent, sendFrame(..., expectsGenericAck: true) queues the message ACK, but this finally immediately sends another command that can also produce RESP_CODE_OK/RESP_CODE_ERR and is not tracked separately. If the flood-scope reset response arrives before the channel-send response, _handleOk/_handleErrorFrame will pop the pending channel message entry, marking it sent or clearing it based on the reset ACK rather than the actual message result; this is especially likely on scoped sends or older firmware that responds to the new command with an error. The flood-scope commands need to be serialized/acknowledged without sharing the channel-message ACK queue, or the reset should not run while a channel send ACK is pending.

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.

3 participants