Skip to content
Back to skills

1010 Workspace Activity Modal Fix 3c599774

ASecurity

**Fixed in version: 0.234.144**

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
developmentjavascriptjavatestingapifrontendbackend

Works with

  • cli
  • api

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 1010-workspace_activity_modal_fix_3c599774 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 1010 Workspace Activity Modal Fix 3c599774?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 1010 Workspace Activity Modal Fix 3c599774
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-1010-workspace-activity-modal-fix-3c599774/badge)](https://www.skillsdirectory.com/skills/tools-only-1010-workspace-activity-modal-fix-3c599774)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
# Workspace Activity Modal Function Fix

**Fixed in version: 0.234.144**

## Issue Description

The Public Workspace Activity Timeline was missing the modal popup functionality when clicking on activity logs, unlike the Group Activity Timeline which had this feature. This prevented users from viewing the raw JSON data of workspace activities.

## Root Cause

The workspace activity modal HTML element existed in `control_center.html`, but the JavaScript function `showRawActivityModal()` was missing from `workspace-manager.js`. The activity items were calling a non-existent function when clicked.

## Technical Details

### Files Modified

1. **workspace-manager.js**
   - Added `showRawActivityModal()` function
   - Added `copyRawWorkspaceActivityToClipboard()` function
   - Functions mirror the group activity modal functionality

### Implementation

#### Added Modal Display Function
```javascript
// Show raw activity modal (matching group modal functionality)
showRawActivityModal: function(activityIndex) {
    if (!WorkspaceManager.currentActivities || activityIndex >= WorkspaceManager.currentActivities.length) {
        alert('Activity data not available');
        return;
    }

    const activity = WorkspaceManager.currentActivities[activityIndex];
    const modalBody = document.getElementById('rawWorkspaceActivityModalBody');
    const modalTitle = document.getElementById('rawWorkspaceActivityModalTitle');
    
    if (!modalBody || !modalTitle) {
        alert('Modal elements not found');
        return;
    }

    // Set title
    const activityType = activity.type || 'Activity';
    const timestamp = new Date(activity.timestamp).toLocaleString();
    modalTitle.textContent = `${activityType} - ${timestamp}`;

    // Display JSON with pretty formatting
    modalBody.innerHTML = `<pre class="mb-0" style="max-height: 500px; overflow-y: auto;">${WorkspaceManager.escapeHtml(JSON.stringify(activity, null, 2))}</pre>`;

    // Show modal
    const modal = new bootstrap.Modal(document.getElementById('rawWorkspaceActivityModal'));
    modal.show();
}
```

#### Added Copy to Clipboard Function
```javascript
// Copy raw activity to clipboard
copyRawWorkspaceActivityToClipboard: function() {
    const rawText = document.getElementById('rawWorkspaceActivityModalBody')?.textContent;
    if (!rawText) {
        alert('No activity data to copy');
        return;
    }

    navigator.clipboard.writeText(rawText).then(() => {
        if (window.controlCenter && window.controlCenter.showToast) {
            window.controlCenter.showToast('Activity data copied to clipboard', 'success');
        } else {
            alert('Activity data copied to clipboard');
        }
    }).catch(err => {
        console.error('Failed to copy:', err);
        alert('Failed to copy to clipboard');
    });
}
```

## Related Fixes

This fix is part of a larger effort to display raw activity data in modals:

1. **Backend Enhancement** (v0.234.143)
   - Updated `api_admin_get_group_activity` to return both formatted and raw activities
   - Updated `api_get_public_workspace_activity` to return both formatted and raw activities
   - Raw activities contain complete original data from Cosmos DB

2. **Frontend Data Storage** (v0.234.143)
   - Group Activity Timeline stores `raw_activities` for modal display
   - Workspace Activity Timeline stores `raw_activities` for modal display
   - This ensures token usage and all other fields show complete data

3. **Modal Function Addition** (v0.234.144 - this fix)
   - Added missing `showRawActivityModal()` function to `WorkspaceManager`
   - Added missing `copyRawWorkspaceActivityToClipboard()` function
   - Workspace Activity Timeline now has full modal functionality

## Testing

To verify the fix:

1. Navigate to Control Center → Public Workspaces tab
2. Click "View Activity Timeline" for any workspace
3. Click on any activity log entry in the timeline
4. Verify that:
   - Modal popup appears with "Activity Details" title
   - Raw JSON is displayed with proper formatting
   - Token usage shows actual values (not 0)
   - Complete activity data is visible
   - "Copy to Clipboard" button works

## User Experience Impact

**Before:**
- Clicking workspace activity logs did nothing
- No way to view raw JSON data for workspace activities
- Token usage showing 0 because only formatted data was available

**After:**
- Clicking workspace activity logs opens modal with raw JSON
- Complete activity data is displayed including all fields
- Token usage shows actual token counts
- Copy to clipboard functionality available
- Consistent behavior between Group and Workspace activity timelines

## Related Files

- **JavaScript**: `static/js/workspace-manager.js` (lines ~1003-1059)
- **HTML**: `templates/control_center.html` (modal: lines ~2626-2651)
- **Backend**: `route_backend_control_center.py` (API endpoints with raw_activities)
- **Version**: `config.py` (updated to 0.234.144)

## Notes

- The modal HTML element was already present from a previous session
- Only the JavaScript functions were missing
- Functions follow the same pattern as GroupManager for consistency
- Raw activities are stored in `WorkspaceManager.currentActivities` for access
- Modal uses Bootstrap 5 modal component

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.