Skip to content

Feat/export resource button#556

Merged
dfwgj merged 23 commits intomainfrom
feat/export-resource-button
Mar 6, 2026
Merged

Feat/export resource button#556
dfwgj merged 23 commits intomainfrom
feat/export-resource-button

Conversation

@dfwgj
Copy link
Collaborator

@dfwgj dfwgj commented Mar 6, 2026

📋 Summary

This PR introduces a comprehensive notification center system and upgrades RoleX to version 1.3.0, along with various bug fixes and improvements for V2 roles management.

✨ Key Features

🔔 Notification Center System

  • Sidebar notification button with unread badge indicator
  • Auto-popup on first launch to ensure users see important updates
  • Notification management: mark as read, delete, mark all as read
  • Full i18n support (English & Chinese)
  • Default notifications for v2.2.0 update and RoleX upgrade reminders
  • Local storage persistence for notification data

🚀 RoleX 1.3.0 Upgrade

  • Upgraded RoleX core from v0.11.0 to v1.3.0
  • Complete API migration with all 32 operations support
  • Enhanced organization and position management for V2 roles
  • Improved role structure tab with database migration
  • Added organization tree view for better role hierarchy visualization

🔧 V2 Roles Management

  • Temporarily disabled V2 role export/delete features (pending architecture upgrade)
  • Added role tree list panel for better organization
  • Fixed census parser for organization data
  • Improved role detail panel with better structure display
  • Query V2 roles from RoleX database instead of filesystem

🐛 Bug Fixes

  • Fixed conversation rename bug (changes now persist correctly)
  • Fixed Windows Git link click issue (no longer unresponsive)
  • Fixed directory() to return object instead of JSON string
  • Fixed macOS Dock icon flicker by using Electron Helper binary
  • Added fallback for openExternal in settings window

⚙️ AgentX Configuration Improvements

  • Added preset configurations support
  • Added OpenAI protocol detection
  • Improved configuration management UI
  • Better error handling and validation

📦 Changes by Category

Added

  • Notification center system (apps/desktop/src/view/components/notifications/)
  • Badge UI component for unread indicators
  • Organization tree view for V2 roles
  • AgentX profiles configuration panel
  • Export button for roles and tools

Changed

  • RoleX core upgraded from v0.11.0 to v1.3.0
  • V2 role structure tab migrated to database
  • Improved role detail panel layout
  • Enhanced settings window organization

Fixed

  • Conversation rename persistence
  • Windows Git link click responsiveness
  • macOS Dock icon flicker
  • Directory command return type
  • RoleX API compatibility issues

Removed

  • Bundled MinGit/git-bash (reverted from main branch merge)
  • V2 role export/delete features (temporary, pending upgrade)

🔄 Migration Notes

For V2 Role Users

⚠️ Important: Existing V2 roles need to be upgraded due to RoleX architecture changes.

Action Required: Activate Nuwa (女娲) and ask her to upgrade and migrate your V2 roles.

See upgrade guides:

  • ROLEX_UPGRADE_GUIDE.md - Detailed upgrade instructions
  • ROLEX_UPGRADE_QUICK.md - Quick upgrade guide

🧪 Testing

Notification System

  1. Clear localStorage: promptx_notifications and promptx_notifications_shown
  2. Refresh the app
  3. Notification popup should appear after 500ms
  4. Verify notification button in sidebar footer shows unread badge
  5. Test mark as read, delete, and mark all as read functions

RoleX Upgrade

  1. Check V2 roles display correctly in organization tree
  2. Verify role structure tab shows database-backed data
  3. Test role activation and management operations

Bug Fixes

  1. Rename a conversation and verify it persists after refresh
  2. Click Git links on Windows and verify they open correctly
  3. Check macOS Dock icon doesn't flicker on startup

📊 Statistics

  • 189 files changed
  • 5,477 insertions(+)
  • 1,395 deletions(-)
  • 23 commits from feat/export-resource-button

🔗 Related Issues

  • Fixes conversation rename bug
  • Fixes Windows Git link issue
  • Addresses RoleX architecture upgrade requirements

📸 Screenshots

Notification Center

Notification Button
Notification List

Organization Tree View

Organization Tree

⚠️ Breaking Changes

  • V2 role export/delete features temporarily disabled
  • Existing V2 roles require migration (see Migration Notes above)

🚀 Deployment Notes

  • No database migrations required (RoleX handles internally)
  • No environment variable changes needed
  • Notification data stored in browser localStorage

✅ Checklist

  • Code follows project conventions
  • All tests pass
  • Documentation updated (upgrade guides added)
  • i18n translations added (en/zh-CN)
  • No bundled git dependencies included
  • Commit messages follow conventional commits format

👥 Reviewers

@Deepractice/core-team


Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

dfwgj and others added 23 commits February 26, 2026 22:41
- Add download-mingit.ps1 script to fetch MinGit at CI build time
- Inject bundled git-bash/mingw64/bin into PATH at app startup
- Fall back to system Git for Windows if bundled git not present
- Add CI step in release-desktop.yml to run the download script
- Gitignore resources/win/git-bash/ (binary, downloaded at build time)

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…port

Add export buttons to RoleDetailPanel and ToolDetailPanel for non-system
resources. Fix resources:download handler to resolve v2 role paths from
~/.rolex/roles/<id>/ and wrap v2 ZIP contents in a roleId-prefixed
directory so import correctly restores the original ID.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…n flicker

On macOS, spawning process.execPath (the main Electron binary) as child
processes causes each subprocess to briefly show a Dock icon. Use the
Electron Helper binary instead, which has LSUIElement=true in its
Info.plist and is invisible to the Dock. Also add windowsHide:true to
all spawn calls for Windows.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add window.open fallback when electronAPI.shell.openExternal is not
available (e.g., when running in browser dev mode). Prevents "Cannot
read properties of undefined" error when clicking Git download link.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Upgrade @rolexjs/* packages from 0.11.0 to 1.1.0
- Add @rolexjs/prototype, @rolexjs/system, and resourcexjs dependencies
- Migrate growup command to synthesize throughout codebase
- Add synthesize() method to RolexBridge and RolexActionDispatcher
- Keep growup() as deprecated wrapper for backward compatibility
- Update MCP server action tool to use synthesize operation
- Update dayu role documentation with new API terminology

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Change LocalPlatform import to localPlatform (factory function)
- RoleX 1.1.0 uses factory pattern instead of constructor
- Fixes "LocalPlatform is not a constructor" error

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove bootstrap() call (no longer exists in 1.1.0)
- Use renderState instead of renderFeature/renderFeatures
- Simplify _syncSeedRoles to only track version
- RoleX 1.1.0 no longer auto-manages SEED roles

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- RoleX 1.1.0 stores roles in SQLite database, not files
- Update listV2Roles to query from platform.runtime graph
- Iterate through all 'individual' type nodes
- Extract role info from identity sub-nodes
- Supports both SEED roles and user roles

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implement full RoleX 1.1.0 API support with complete operation coverage.

Core changes:
- Migrate all RolexBridge methods to RoleX 1.1.0 API
- Add 14 new operations: reflect, realize, master, forget, skill,
  retire, die, rehire, train, charter, dissolve, charge, require, abolish
- Fix isV2Role() to query SQLite database instead of filesystem
- Update RoleProtocol to handle v2: prefix for database-backed roles
- Fix listV2Roles() to parse census.list string format

MCP server updates:
- Expand action tool from 18 to 32 operations
- Add v2 role checks to recall/remember tools
- Update inputSchema with new parameters

Operations now supported:
- Learning cycle: reflect → realize → master → skill → forget
- Organization: found → charter → hire → fire → dissolve
- Position: establish → charge → require → appoint → dismiss → abolish
- Individual lifecycle: born → train → retire → rehire → die
- Goal execution: want → plan → todo → finish → achieve/abandon

Dependencies:
- Add @rolexjs/genesis@1.1.0 for world initialization

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… parser

- Add RoleTreeListPanel component with hierarchical organization display
- Parse census.list text output to structured JSON data
- Distinguish between role assignments and position definitions
- Show organizations with expandable/collapsible nodes
- Display role positions as badges
- Group independent roles separately
- Fix V2GoalsTab to handle text-format focus output
- Add rolex:directory IPC handler for organization data
- Add i18n keys for independent roles

Breaking changes:
- V2 role list now shows tree structure instead of flat list
- Organizations without members are not displayed in tree

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Changed V2StructureTab to load identity nodes from RoleX 1.1.0 SQLite
database instead of reading .feature files from filesystem.

Changes:
- Added rolex:getIdentityNodes IPC handler calling RolexBridge.identity()
- Rewrote V2StructureTab to work with database nodes instead of files
- Nodes categorized by name/id patterns (persona/knowledge/voice/experience)
- Viewer displays node.information (Gherkin content) directly
- Removed file editing (database nodes are read-only in UI)

This completes the RoleX 1.1.0 migration for V2 role detail pages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fixed "Cannot read properties of undefined (reading 'getInstance')" error
by using correct import path: core.rolex.RolexBridge instead of
destructuring RolexBridge directly from require('@promptx/core').

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
RolexBridge uses getRolexBridge() function for singleton pattern,
not a static getInstance() method on the class.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
role.project() returns rendered Gherkin text, not structured data.
Added parser to extract nodes from text using ## [type] (id) markers.

Changes:
- Parse identity text by splitting on ## markers
- Extract node type, id, and content from each section
- Categorize nodes by type (identity/procedure → persona/knowledge)
- Display node type badge in UI
- Added debug logging to troubleshoot data format

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
V2 roles use RoleX memory system (reflect/realize/master) instead of
traditional cognition system (remember/recall). Added version check to
prevent V2 roles from using remember/recall commands.

Changes:
- Added isV2Role check in RememberCommand.assembleLayers()
- Added isV2Role check in RecallCommand.assembleLayers()
- Return helpful error message directing users to RoleX commands
- Graceful fallback if version check fails (backward compatibility)

Rationale:
- V2 roles store data in RoleX SQLite database
- V1 roles use ~/.promptx/cognition/ for memory storage
- Mixing systems would cause data inconsistency

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Enhanced discover command to display V2 roles with their organization
and position information from RoleX directory.

Changes:
- Added loadDirectoryData() in DiscoverCommand to fetch org structure
- Added parseDirectoryOutput() to parse directory JSON output
- Modified RoleListArea to accept directoryData parameter
- Added getOrganizationInfo() to lookup role's org and position
- V2 roles now display as: "roleId [V2]: name (org - position)"

Example output:
- `Node全栈工程师` [V2]: Node全栈工程师 (火花堆栈人工智能有限公司 -
  Node全栈工程师岗位) → action({ operation: "activate", ... })

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fixed loadDirectoryData() to handle bridge.directory() correctly.
The method already returns a parsed object, not a JSON string.

Changes:
- Removed JSON.parse() call since data is already an object
- Updated logging to show actual data structure
- Marked parseDirectoryOutput() as deprecated

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- chore(deps): upgrade @rolexjs/genesis from 1.1.0 to 1.3.0
  - Add new procedure features: skill-creator, prototype-management,
    resource-management, version-migration
  - Maintain backward compatibility with existing RoleX 1.1.0 API

- fix(desktop): fix AgentX conversation rename dialog i18n
  - Add missing "cancel" translation key for rename dialog
  - Change hardcoded "Cancel" to use i18n key
  - Fix conversation title display priority (show user-set name first)

- feat(desktop): implement shell.openExternal via IPC
  - Add setupShellIPC() handler to open URLs in Electron browser window
  - Change preload to use IPC instead of direct shell access for security
  - Add error handling for external link opening in settings

- fix(desktop): update AgentX welcome page logo path
  - Change from PromptX-transparent.png to icon.png

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add notification center with auto-popup on first launch
- Add notification button in sidebar footer with unread badge
- Add notification management (mark as read, delete)
- Add i18n support (en/zh-CN)
- Add default notifications for v2.2.0 update and RoleX upgrade
- Add Badge component for UI
- Disable V2 role export/delete features temporarily

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Merged main branch but excluded bundled MinGit/git-bash changes as we won't bundle git internally.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dfwgj dfwgj merged commit 4231bca into main Mar 6, 2026
@dfwgj dfwgj deleted the feat/export-resource-button branch March 6, 2026 05:22
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