Skip to content

feat(nodes): country and note for nodes, note for core configs - #1072

Open
Rerowros wants to merge 17 commits into
PasarGuard:devfrom
Rerowros:feat/node-country-notes
Open

Rerowros wants to merge 17 commits into
PasarGuard:devfrom
Rerowros:feat/node-country-notes

Conversation

@Rerowros

Copy link
Copy Markdown
Contributor

Summary

Adds an optional country and a free-text note to nodes, and a note to core configs.

  • nodes.country_code (ISO 3166-1 alpha-2, stored upper-case, nullable) and nodes.note (≤500 chars); core_configs.note (≤500 chars). Migration e4b7c1d9a2f6.
  • The API accepts and returns the new fields on node/core create, update and list. Saving a core where only the note changed does not restart nodes.
  • Dashboard:
    • a searchable country picker in the node dialog;
    • a flag in the nodes list;
    • the note shown muted under the node or core name;
    • a note field in the core dialog and on the core editor page.
  • The country list is built at runtime from Intl.DisplayNames, so names are localized without a static table. It excludes user-assigned, deprecated (SU, YU, ZR…) and non-country codes (EU, UN…). Where the OS has no flag emoji (Windows), only the code is shown.

Part of splitting #759 into focused PRs.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Refactor / cleanup
  • Documentation
  • Tests / CI

Checklist

  • I tested the change locally or explained why it cannot be tested.
  • I added or updated tests for behavior changes.
  • I updated documentation, translations, or examples if needed.
  • I checked database migrations when models or schema changed.
  • I did not include secrets, tokens, private keys, or unrelated changes.

Testing

uv run pytest tests/api/test_node.py tests/api/test_core.py -q   # 72 passed
cd dashboard && bun test src/utils/countries.test.ts src/features/core-editor/kit/core-editor-change-state.test.ts
bun run build

I also checked these by hand on a local panel (SQLite): the node dialog, the country picker, the nodes list, the core dialog and the core editor note.

Screenshots

Will add in a comment.

Notes for reviewers

  • The migration branches from c8d2e4f6a1b3, as do the migrations of the other PRs in this series. Whichever PR lands second needs an Alembic merge revision, which I can add.
  • Translations: en / fa / ru / zh.

…nfigs

Nodes get an optional ISO 3166-1 alpha-2 country_code (stored uppercase) and
a free-text note; core configs get a note. The simple node list returns the
country for pickers and the node search also matches the note. Saving a core
where only the note changed no longer restarts its nodes.
…nd cores

Node modal gets a searchable country picker (regions discovered at runtime via
Intl.DisplayNames, names in the current language) and a note field. Node cards,
the node list and node selects show the flag emoji with the code next to the
name; notes are shown muted on one line with the full text on hover. The core
config modal gets a note field and the cores list shows it.
The full-page core editor now shows the core note under the name. The note is
part of the draft snapshot, so editing it enables Save and discard restores it;
saving sends it (empty clears it). A note-only save keeps the same config, so
the backend does not restart nodes.
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 33e68403-9fe3-48fe-a43d-2075e318da56

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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