51.5-354 updates
This commit is contained in:
268
docs/READY_TO_TEST.md
Normal file
268
docs/READY_TO_TEST.md
Normal file
@@ -0,0 +1,268 @@
|
||||
# Ready to Test - Deskmeter Task Display
|
||||
|
||||
**Date**: 2025-12-19
|
||||
**Status**: ✅ All updates complete and ready for testing
|
||||
|
||||
---
|
||||
|
||||
## What's Been Updated
|
||||
|
||||
### 1. Task Window (task_window.py) ✅
|
||||
|
||||
**New Features**:
|
||||
- ✅ **No window decorations** - Clean minimal window, no title bar or close button
|
||||
- ✅ **Workspace change detection** - Updates 2.2s after you switch workspaces
|
||||
- ✅ **Auto port detection** - Finds dmweb on port 10001 or 10000 automatically
|
||||
- ✅ **Faster updates** - Polls every 500ms to catch changes quickly
|
||||
- ✅ **Smaller window** - 400x60px (reduced from 400x80)
|
||||
|
||||
**How to Close**:
|
||||
- `Alt+F4` (keyboard)
|
||||
- `pkill -f task_window.py` (command line)
|
||||
- Kill the terminal where you started it
|
||||
|
||||
### 2. GNOME Extension ✅
|
||||
|
||||
**New Features**:
|
||||
- ✅ **Error handling** - Won't crash GNOME Shell if something fails
|
||||
- ✅ **Auto port detection** - Same as window, tries 10001 then 10000
|
||||
- ✅ **Safe enable/disable** - All operations wrapped in try-catch
|
||||
|
||||
**Updated files in**: `~/.local/share/gnome-shell/extensions/deskmeter-indicator@local/`
|
||||
|
||||
---
|
||||
|
||||
## How to Test
|
||||
|
||||
### Option 1: Test Window Now (No Logout Required)
|
||||
|
||||
```bash
|
||||
cd /home/mariano/wdir/dm-gnomeext
|
||||
|
||||
# Run the window
|
||||
python3 task_window.py
|
||||
```
|
||||
|
||||
**Expected behavior**:
|
||||
1. Console shows: `Found dmweb API on port 10001`
|
||||
2. Small window appears showing: **work/own/deskmeter**
|
||||
3. Window has **no title bar** (clean, minimal)
|
||||
4. When you switch workspaces, it updates after ~2 seconds
|
||||
|
||||
**Make it always-on-top** (in another terminal):
|
||||
```bash
|
||||
wmctrl -r "Deskmeter Task" -b add,above,sticky
|
||||
```
|
||||
|
||||
**Position it** where you want (drag with mouse or use wmctrl)
|
||||
|
||||
### Option 2: Test GNOME Extension (Requires Logout)
|
||||
|
||||
```bash
|
||||
# 1. Verify extension is enabled
|
||||
gnome-extensions list --enabled | grep deskmeter
|
||||
|
||||
# 2. Check extension files are updated
|
||||
ls -la ~/.local/share/gnome-shell/extensions/deskmeter-indicator@local/
|
||||
|
||||
# 3. Log out and log back in
|
||||
|
||||
# 4. After login, check panel for task indicator (left side)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## What You'll See
|
||||
|
||||
### Task Window
|
||||
```
|
||||
┌────────────────────────┐
|
||||
│ work/own/deskmeter │
|
||||
└────────────────────────┘
|
||||
```
|
||||
- No borders, no title bar, just the task text
|
||||
- Clean minimal display
|
||||
- Position anywhere, stays on top
|
||||
|
||||
### GNOME Extension
|
||||
```
|
||||
[Activities] [deskmeter] [detecting...] → [work/own/deskmeter]
|
||||
└─ Panel indicator
|
||||
```
|
||||
- Shows in panel (left side)
|
||||
- "detecting..." while finding port
|
||||
- Then shows current task
|
||||
|
||||
---
|
||||
|
||||
## Testing Checklist
|
||||
|
||||
### Window Testing
|
||||
- [ ] Window appears without title bar/decorations
|
||||
- [ ] Shows current task: "work/own/deskmeter"
|
||||
- [ ] Can be moved by dragging
|
||||
- [ ] Can close with Alt+F4
|
||||
- [ ] Updates when you switch workspaces (wait ~2s after switch)
|
||||
- [ ] Can be set always-on-top with wmctrl
|
||||
- [ ] Auto-detects port 10001 (check console output)
|
||||
|
||||
### Extension Testing (after logout/login)
|
||||
- [ ] Extension shows in panel (left side)
|
||||
- [ ] Shows "detecting..." briefly
|
||||
- [ ] Shows current task after detection
|
||||
- [ ] Updates when switching workspaces (wait ~2s)
|
||||
- [ ] If extension fails, GNOME Shell still works (doesn't crash)
|
||||
- [ ] Can disable extension: `gnome-extensions disable deskmeter-indicator@local`
|
||||
|
||||
---
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Window shows "offline - dmweb not running"
|
||||
|
||||
```bash
|
||||
# Check if dmweb is running
|
||||
ps aux | grep dmweb
|
||||
|
||||
# Check what's on port 10001
|
||||
curl http://localhost:10001/api/current_task
|
||||
|
||||
# Should show: {"task_id":"8f797adb","task_path":"work/own/deskmeter"}
|
||||
```
|
||||
|
||||
### Window doesn't update on workspace change
|
||||
|
||||
```bash
|
||||
# Test wmctrl is working
|
||||
wmctrl -d
|
||||
|
||||
# Should show workspaces with * marking current one
|
||||
```
|
||||
|
||||
### Window won't stay on top
|
||||
|
||||
```bash
|
||||
# After starting window, in another terminal:
|
||||
wmctrl -r "Deskmeter Task" -b add,above,sticky
|
||||
|
||||
# Verify it worked:
|
||||
wmctrl -l -x | grep -i deskmeter
|
||||
```
|
||||
|
||||
### Extension doesn't appear in panel after logout/login
|
||||
|
||||
```bash
|
||||
# Check if enabled
|
||||
gnome-extensions list --enabled | grep deskmeter
|
||||
|
||||
# Check for errors
|
||||
journalctl --user -u org.gnome.Shell@wayland.service --since "5 minutes ago" | grep -i deskmeter
|
||||
|
||||
# Try manually enabling
|
||||
gnome-extensions enable deskmeter-indicator@local
|
||||
# Then logout/login again
|
||||
```
|
||||
|
||||
### Extension shows "detecting..." forever
|
||||
|
||||
dmweb is not running on any of the tried ports (10001, 10000). Start dmweb:
|
||||
|
||||
```bash
|
||||
cd ~/wdir/dm/dmapp/dmweb # or wherever your dmweb is
|
||||
python3 run.py
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Performance Notes
|
||||
|
||||
### Task Window
|
||||
- Checks workspace every 200ms (lightweight wmctrl call)
|
||||
- Updates task every 500ms when no workspace change
|
||||
- After workspace change: waits 2200ms before updating (gives dmcore time)
|
||||
- Minimal CPU usage: ~0.1-0.2%
|
||||
|
||||
### GNOME Extension
|
||||
- Only updates on workspace switch + periodic refresh
|
||||
- Uses debounce delay of 2200ms
|
||||
- Minimal overhead, integrated with GNOME Shell event loop
|
||||
|
||||
---
|
||||
|
||||
## Commands Quick Reference
|
||||
|
||||
```bash
|
||||
# Start task window
|
||||
cd /home/mariano/wdir/dm-gnomeext
|
||||
python3 task_window.py
|
||||
|
||||
# Make window always-on-top + sticky (all workspaces)
|
||||
wmctrl -r "Deskmeter Task" -b add,above,sticky
|
||||
|
||||
# Position window (example: top-right corner)
|
||||
wmctrl -r "Deskmeter Task" -e 0,1500,0,400,60
|
||||
|
||||
# Close window
|
||||
pkill -f task_window.py
|
||||
# OR
|
||||
Alt+F4 (when window has focus)
|
||||
|
||||
# Check extension status
|
||||
gnome-extensions list --enabled | grep deskmeter
|
||||
|
||||
# View extension logs
|
||||
journalctl --user -u org.gnome.Shell@wayland.service -f | grep deskmeter
|
||||
|
||||
# Test API manually
|
||||
curl http://localhost:10001/api/current_task
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Next Steps
|
||||
|
||||
1. **Test the window now** - No logout required, immediate feedback
|
||||
2. **When satisfied with window behavior** - Log out/in to test extension
|
||||
3. **Choose your preference**:
|
||||
- Use window for now (quick to start/stop)
|
||||
- Use extension after logout (cleaner, integrated into panel)
|
||||
- Use both (why not?)
|
||||
|
||||
---
|
||||
|
||||
## File Locations
|
||||
|
||||
```
|
||||
/home/mariano/wdir/dm-gnomeext/
|
||||
├── task_window.py ← Updated window app
|
||||
├── run_task_window.sh ← Helper script (can also use directly)
|
||||
├── gnome-extension/
|
||||
│ └── deskmeter-indicator@local/ ← Source (updated)
|
||||
│ ├── extension.js ✅ Error handling added
|
||||
│ ├── metadata.json ✅ GNOME 49 support
|
||||
│ └── stylesheet.css
|
||||
└── ~/.local/share/gnome-shell/extensions/
|
||||
└── deskmeter-indicator@local/ ← Installed (updated)
|
||||
├── extension.js ✅ Error handling added
|
||||
├── metadata.json ✅ GNOME 49 support
|
||||
└── stylesheet.css
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Documentation
|
||||
|
||||
- `INSTALL_STATUS.md` - Extension installation troubleshooting
|
||||
- `PORT_DETECTION_README.md` - How auto port detection works
|
||||
- `TASK_WINDOW_README.md` - Task window usage guide
|
||||
- `READY_TO_TEST.md` - This file
|
||||
|
||||
---
|
||||
|
||||
**Everything is ready! Start with the window test - it's the quickest way to verify everything works.**
|
||||
|
||||
```bash
|
||||
python3 task_window.py
|
||||
```
|
||||
|
||||
Then when you're ready, log out/in to test the extension.
|
||||
Reference in New Issue
Block a user