Skip to content

rfc: namespace#7001

Merged
epoberezkin merged 25 commits into
stablefrom
ep/namespace
May 28, 2026
Merged

rfc: namespace#7001
epoberezkin merged 25 commits into
stablefrom
ep/namespace

Conversation

@epoberezkin
Copy link
Copy Markdown
Member

No description provided.

@epoberezkin epoberezkin changed the base branch from master to stable May 25, 2026 20:56
Copy link
Copy Markdown
Contributor

@simplex-chat-agent simplex-chat-agent Bot left a comment

Choose a reason for hiding this comment

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

RFC + plumbing for "public namespaces" markdown (#privacy.simplex, @alice.simplex). Adds a SimplexName Format variant, the parser hook, mobile UI to show an "upgrade required" alert when a known-but-unimplemented name reference is seen, and new chat item types across the bot/TypeScript/Python type packages. Also includes an updated mkValidName and a simplexmq bump.

Blocking issues

1. Mobile JSON field-name mismatch on SimplexNameInfo. Haskell emits nameTLD: SimplexTLD (per bots/api/TYPES.md, packages/simplex-chat-client/types/typescript/src/types.ts, packages/simplex-chat-python/.../types/_types.py). iOS (ChatTypes.swift:5142-5147) and Android (ChatModel.kt:4734-4739) declare the field as namespace: SimplexNamespace. Default Decodable / kotlinx.serialization use the property name as the JSON key, so any payload with the new field throws a decode error. Because nameInfo is the non-optional payload of Format.simplexName, the failure bubbles up through FormatFormattedText[FormattedText] → the enclosing ChatItem: any incoming message containing #name.simplex or @alice.simplex won't decode and won't display on either mobile client, and the "Please upgrade the app" alert that this PR adds for that exact case never fires either (parseSimpleXMarkdown returns nil when the format array fails to decode). Suggestions inline rename both type and field to match.

2. scripts/nix/sha256map.nix not updated for the simplexmq bump. The last commit moved cabal.project:24 to tag: 7682999505642de7dc0f407d85b1eea62f3abdf0, but scripts/nix/sha256map.nix:2 still only has the entry for 3e39044c4d8eaa4b1e5aeb705f187165055c5b17. Nix builds will fail until the hash is regenerated and added (no inline suggestion — needs nix-prefetch-git).

Minor

  • src/Simplex/Chat/Library/Commands.hs:5547-5558 — the old mkValidName is left as a commented-out block above the new implementation. Inline suggestion removes it.
  • src/Simplex/Chat/Markdown.hs:69-70 — stray double blank line between Format's deriving clause and mentionedNames. Inline suggestion removes it.

Notes / things ruled out

  • The new mkValidName rewrite is internally consistent with tests/ValidNames.hs. The dual-pass (secretP' <|> nameRefP '#' <|> secretFallback) parser change in Markdown.hs relies on attoparsec's backtracking <|>, which is correct for Data.Attoparsec.Text.Parser. Pre-existing precedence (#secret# still parses as Secret, not as a name) is preserved by the test suite changes.
  • Whether a particular short string like #unformatted actually resolves to a SimplexNameInfo is driven by strDecode in simplexmq, which isn't in this repo — the markdown tests assume it succeeds; if the upstream parser is stricter the assertions change, but that's an upstream coupling, not a defect here.

Comment thread apps/ios/SimpleXChat/ChatTypes.swift
Comment thread apps/ios/SimpleXChat/ChatTypes.swift
Comment thread src/Simplex/Chat/Library/Commands.hs
Comment thread src/Simplex/Chat/Markdown.hs
epoberezkin and others added 7 commits May 27, 2026 16:10
Co-authored-by: simplex-chat-agent[bot] <287173099+simplex-chat-agent[bot]@users.noreply.github.com>
@epoberezkin epoberezkin merged commit 68abd80 into stable May 28, 2026
11 of 13 checks passed
@epoberezkin epoberezkin deleted the ep/namespace branch May 28, 2026 07:44
@github-actions github-actions Bot locked and limited conversation to collaborators May 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants