feat(settings): add p2p network configuration, theme customizer, live connectivity probing, and fluid ui animations - #2357
Open
alicangnll wants to merge 24 commits into
Open
alicangnll wants to merge 24 commits into
alicangnll wants to merge 24 commits into
Conversation
Add a Network Config settings page and backing Electron APIs to read/write network files, wire it into settings/sidebar/menu, and add a deploy helper. Changes: - electron/ts/api.ts: add readNetworkFiles / writeNetworkFiles for config.json, own-address.json, static-peers.json - src/ts/component/page/main/settings/networkConfig.tsx: new Network Config UI (read/save network files) - src/ts/component/page/main/settings/index.tsx, src/ts/component/sidebar/page/settings/index.tsx, src/ts/lib/util/menu.ts: register the new page in settings/menu/sidebar - scripts/deploy.go: new deploy tool to build/copy dist into an installed Anytype app.asar Enables editing per-account network configs from the app.
This update refreshes the vault/sidebar, toast, button, and settings styling to match the new denser design system. It adds a richer network configuration UI with tabbed config management, import support, peer address parsing, and static/own peer editing, while improving bun auto-install in the Makefile and the ASAR repack flow for macOS reliability.
Add a Theme Customizer settings page with presets, live preview, import/export, save/reset and persistence in localStorage (new component and integration into settings sidebar). Apply stored theme on app startup. Introduce page entrance animation and refine UI interactions (hover/active/transition) for buttons, settings items and cards in SCSS. Display a restart-confirm popup after saving network configuration. Misc: style delete-peer button, set remove icon color, and add menu label for the new Theme Customizer.
Add a new SVG icon component for the settings "style" entry (src/ts/component/util/icons/settings/style.tsx) and register it in src/ts/component/util/icons/settings/index.ts. Exports a React SVG component and registers it as 'settings/style' so the icon can be used by the UI.
Introduce typed theme variables and full typography controls in the Theme Customizer. Adds a `type` field for theme vars, new Font Family & Sizing category, FONT_PRESETS and FONT_SCALE_PRESETS, and UI to apply font families/scale presets. Renames internal state from `colors` to `themeProps`, adjusts apply/import/export/save/reset logic (export version bumped to 2.0), and only shows color pickers for vars typed as 'color'. Also updates live preview copy and layout. Minor SCSS tweaks: caption.alert styling and preset font sample/presetInfo styles.
Standardize and polish UI motion and make config/theme/peer imports more robust. - electron/ts/api.ts: add Api.relaunch helper and normalize exit() params/signals; improve logging and Server.stop call. - scss: introduce unified easing/transition vars and timings (_mixins.scss) and apply smoother shadows, borders, hover/active transforms and transition tuning across menu, popup, sidebar vault, widget (common/object/tree) for subtler, consistent micro-interactions. - src/ts/component/page/main/settings/networkConfig.tsx: make peer JSON import resilient (trim values, accept multiple layouts), merge imported peers/addresses into existing list while deduplicating, and provide clearer toasts. Use 'relaunch' IPC when restarting. - src/ts/component/page/main/settings/themeCustomizer.tsx: merge imported theme with current theme before applying. Reason: smoother UI animations and safer, user-friendly import/merge behavior.
Add a network connectivity checker for peer addresses. Implements electron API checkAddressConnectivity that parses multiaddr/URI (ip4/ip6/dns, tcp/udp, ws/wss, yamux/quic) and attempts a TCP socket connect with a 2.5s timeout, returning reachable/latency/error. Expose usage from renderer and wire UI in networkConfig: support ws/wss, status badges per address, a "Test Connectivity" button, click-to-retest behavior, and live status map. Add styles for .connStatusBadge (.online/.offline/.checking) and a pulsing status animation.
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
Introduce a high-performance image caching utility (src/ts/lib/util/imageCache.ts) that uses CacheStorage, in-memory LRU object-URL caching, pre-decoding and idle-time prefetching. Export ImageCache from util/index.ts and integrate background prefetch calls into CommonStore (fileUrl and imageUrl) so image URLs are warmed automatically. Also tidy up several SCSS files (vault.scss, object.scss, tree.scss) by removing transform/hover animations and replacing some transitions with the $transitionCommon variable to reduce paint/transform effects and rely on simpler opacity/background transitions.
alicangnll
marked this pull request as draft
August 28, 2026 06:35
Added documentation for installing
alicangnll
marked this pull request as ready for review
August 28, 2026 06:43
…fallback verification
Add generated JSON files under dist/lib/json/generated: internalRelations.json, internalTypes.json, systemRelations.json, and systemTypes.json. These files contain lists of internal/system relation and type keys used by the build. Also remove the prior .gitignore entries that excluded the generated JSON and delete the per-folder .gitignore so the new files are tracked in the repository.
…s, macOS and Linux
alicangnll
marked this pull request as draft
August 28, 2026 11:29
alicangnll
marked this pull request as ready for review
August 28, 2026 13:57
Author
|
I have read the CLA Document and I hereby sign the CLA |
Adds a new 'Soft Theme' option to the app theme customizer with a dark, blurple-inspired palette. The preset updates the background, surface, text, and accent colors to match a soft dark aesthetic.
|
This is awesome! Thanks for all the work you're contributing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces a comprehensive set of features and improvements covering P2P Network Configuration, Interactive Mesh Topology Map, Live Socket Connectivity Probing (
yamux,quic,tcp,ws), Background Image Caching with 12h Auto-Eviction, Theme & Typography Customization, Smart JSON Merging, Sidebar UI Refinements, and Cross-Platform Installation Documentation (INSTALL.md):P2P Network Configuration & Node Management (
PageMainSettingsNetworkConfig):HostAddr), network cluster IDs (NetworkId), and discovery timeout/ban parameters stored inconfig.json.Local Listen Addresses(own-addresses.json) andStatic & Bootstrap Peers(static-peers.json).config.json,own-addresses.json, andstatic-peers.jsonin active vault storage directory via Electron IPC.Automaticin the protocol dropdown.Interactive P2P Mesh Topology Map (
NetworkTopologyMap):linkPulseStream) representing live data packets flowing across reachable peer connections.25ms), transport protocol tags (YAMUX,QUIC,TCP,WS), and offline states.ms), and Cluster Isolation ID.All Transports,Yamux,QUIC,TCP,WS,Online Only) and optionalAuto-Ping (30s)background monitoring.Live Peer Connectivity Probing (
yamux,quic,tcp,ws):checkAddressConnectivityIPC method to test live socket reachability and measure round-trip latency to peer multiaddrs and endpoints.yamux://,quic://,tcp://,ws://,wss://, IPv6 bracket notation, and multiaddrs (/ip4/.../tcp/.../yamux).[YAMUX] 18ms).Background Image Caching & 12-Hour Auto-Eviction (
ImageCache):UtilImageCachecombining in-memory object URL caching, browserCacheStorageAPI, and idle pre-decoding to eliminate image loading lag, flickering, and network latency across blocks, covers, and avatars.Sidebar UI & Space Channel Refinements:
border-radius: 50%).Full Application Relaunch & Lifecycle Management:
exitargument routing to properly propagaterelaunchboolean flags.relaunchIPC method ensuring Anytype, its window manager, and backend daemon processes shut down cleanly and reboot automatically upon confirming "Restart Now".Smart Non-Destructive JSON Import & Deduplication:
own-addresses.json&static-peers.jsonimport merges incoming peers with existing ones, appending only new unique addresses without duplicates.config.jsonand theme JSON imports incrementally update new/modified parameters while preserving existing settings.Theme Customizer & Live Typography Controls (
PageMainSettingsThemeCustomizer):Midnight OLED,Nordic Frost,Tokyo Cyberpunk,Forest Moss, etc.).Inter,System Native,SF Pro / Roboto,IBM Plex Sans,JetBrains / Menlo,Georgia Serif).getSystemFontsIPC scanning macOS and Windows font directories.volumeSlider) with-/+step buttons and real-time size badges for font sizes, line heights, and letter spacing.Build Resolution & Documentation (
INSTALL.md):./serviceandsystemRelations.jsonimport errors during build by trackingsrc/ts/lib/api/service.ts,dist/lib/json/generated/*.json, andmiddleware/in git, plus adding fallback verification inbuild-electron.js.What type of PR is this? (check all applicable)
Related Tickets & Documents
Mobile & Desktop Screenshots/Recordings
yamux://,quic://,tcp://, etc.Added tests?
Added to documentation?
[optional] Are there any post-deployment tasks we need to perform?