Skip to content

Add IP location display for comments and replies - #262

Merged
ruibaby merged 6 commits into
mainfrom
feat/comment-ip-location
Nov 1, 2026
Merged

ruibaby merged 6 commits into
mainfrom
feat/comment-ip-location

Conversation

@ruibaby

@ruibaby ruibaby commented Oct 30, 2026

Copy link
Copy Markdown
Member

Add an opt-in setting to display IP locations for comments and replies before
their timestamps. Locations use province-level labels for mainland China and
country or region labels elsewhere. Missing locations display “Unknown”.

Resolve new comments and replies asynchronously, and backfill existing records
in batches when enabled. Lookups run offline using bundled IPv4 and IPv6
ip2region databases, reduced to country, province, and country code fields.

Location labels are persisted as annotations. Disabling the setting hides them
in the widget but does not remove existing annotations from public responses.
Raw IP addresses are not copied into annotations, and stored locations are not
automatically rewritten when the database changes.

Validation:

  • Gradle build passed with 234 backend tests after database reduction.
  • All 4 targeted browser tests passed after the final display changes.
  • Approximately 2.38 million source-range endpoint lookups retained the same
    country, province, and country code after database reduction.

Accuracy remains dependent on the bundled upstream dataset. External checks
found discrepancies on cloud and enterprise networks; these checks do not
establish accuracy for residential or mobile networks.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T09:08:25.752675Z be75f08 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ruibaby
ruibaby merged commit f94ddeb into main Nov 1, 2026
2 checks passed
@ruibaby
ruibaby deleted the feat/comment-ip-location branch November 1, 2026 14:37
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