feat(desktop): download, update or remove the free city table from Settings #604
No Reviewers
Labels
Clear labels
accessibility
all-platforms
area:agents
area:ai
area:chain
area:ci
area:client
area:daemon
area:p2p
area:project
area:protocol
area:runtime
area:storage
bug
chore
community
dependencies
discussion
discussion/Announcements
discussion/General
discussion/Ideas
discussion/Q&A
discussion/Show and tell
discussion/answered
documentation
duplicate
enhancement
good first issue
help wanted
i18n
infra
invalid
needs:decision
needs:hardware
paired
question
research
security
status:in-review
test
testing
tracking
wontfix
Barrier affecting people with disabilities
Run every platform's packaging and checks on this pull request, not only the three main ones
MCP server, skill, and thinking on the pool
Planner and model providers
Blockchain, SISY, verification
Continuous integration and build workflows
Desktop and web clients
sisyphusd coordinator, worker, scheduler
libp2p hosts, relays, discovery, connections between nodes
Project planning, roadmap, and governance
Protobuf schemas and RPC contracts
Workload execution and environments
Content-addressed storage, IPFS, Kubo, Cluster, S3, names, pinning
Something isn't working
Repository health, templates, Discussions, contributor experience
Updates to actions, Go modules or npm packages
Migrated from GitHub Discussions
GitHub Discussions category: Announcements
GitHub Discussions category: General
GitHub Discussions category: Ideas
GitHub Discussions category: Q&A
GitHub Discussions category: Show and tell
Q&A discussion with an accepted answer
Improvements or additions to documentation
This issue or pull request already exists
New feature or request
Good for newcomers
Extra attention is needed
Translations and right-to-left layouts
Build, CI, releases
This doesn't seem right
Waits on a decision from both owners
Waits on a machine we do not have yet
Built together by both maintainers, with co-authored commits
Further information is requested
Needs investigation or a design decision
Sealing, keys, access control, tokens, the security model
Built and in an open pull request; closes when it merges
Tests, test harnesses and the rehearsal
Roadmap and meta issues
This will not be worked on
type
Feature
A request, idea, or new functionality (GitHub issue type)
type
Task
A specific piece of work (GitHub issue type)
Milestone
No items
No Milestone
V0: prove the loop
Projects
Clear projects
No projects
Sisyphus roadmap
Done
No Assignees
rvnminers-A-and-N
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Sisyphus/Sisyphus#604
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Part of #573.
PR #594 gave the daemon DB-IP's free city table, downloaded only on request, and a
city_estimateinGetNodeInfo. This lets the owner manage it from the app: Settings → This node → City table, next to Where this node is and Location discovery.The card says what the table is (free, about 90 MB, downloaded only when asked, and places the node near its city from its public address). It says that downloading shows db-ip.com this machine's address and that lookups afterwards are local. It also warns that the city is an estimate, often tens of kilometres off. It shows whether the table is there and, if it is, the edition, size and download date. Download (and Update once a table is there) shows a busy state for as long as the daemon takes. Remove deletes the table. Once the table places the node, the card says so, as in "This node looks to be near Louisville, Kentucky, US". If the table can't place the node, the card says why: the node has not found its public address, or the owner's pin is used instead.
The credit the CC BY 4.0 licence asks for, "IP Geolocation by DB-IP", links to https://db-ip.com. The window opens no links itself, so in the desktop the link goes through a new
app:open-db-iphandler with a fixed address, asapp:open-docker-installdoes. In a paired browser it opens a new tab.GetCityTable,DownloadCityTableandRemoveCityTableare added to the desktop's allowed RPCs and to theNodeRpcMethodtype. The pure parts are inlib/city-table.ts: reading either client's replies (strings or bigints, camelCase or snake_case), formatting the edition, size and date for the locale, and naming the place. Unit tests are indev/city-table.test.mjs. All strings are in the seven locale files.The daemon has no flag or environment variable for the table's download address; only its Go tests can point it elsewhere. So the e2e test never downloads. It writes a small table, with no rows, into the test node's data directory in the daemon's own form. It then checks the card's status, the credit link (with
shell.openExternalstubbed) and Remove. The Download button is checked for presence only.docs/user-guide.mdandapps/sisyphus/README.mddescribe the card.Checks:
npm run -s typecheck;npm test(177 pass); and the e2e tests for the city table, the pin and location discovery (3 pass).