diff --git a/.beads/issues.jsonl b/.beads/issues.jsonl index b034064..bcc9a5b 100644 --- a/.beads/issues.jsonl +++ b/.beads/issues.jsonl @@ -3,7 +3,7 @@ {"id":"wg-admin-11o","title":"Implement backup operations","description":"Create backup functionality that saves WireGuard configs, client configs, and metadata to /etc/wg-admin/backups/ with timestamp. Set proper permissions (600 for sensitive files).","status":"closed","priority":2,"issue_type":"task","owner":"Calmcacil@Raion","created_at":"2026-01-12T17:03:30.288606376+01:00","created_by":"Calmcacil","updated_at":"2026-01-12T18:06:07.405162631+01:00","closed_at":"2026-01-12T18:06:07.405162631+01:00","close_reason":"Backup operations implemented in internal/backup/backup.go. CreateBackup with timestamp, retention policy (last 10). ListBackups, RestoreBackup with validation. ReloadWireGuard after restore. Integration with client operations.","dependencies":[{"issue_id":"wg-admin-11o","depends_on_id":"wg-admin-wf1","type":"blocks","created_at":"2026-01-12T17:04:36.19397874+01:00","created_by":"Calmcacil"}]} {"id":"wg-admin-1b0","title":"Add loading spinners for async operations (client creation, restore, QR generation)","description":"Add visual loading feedback using bubbles/spinner for long-running operations like client creation, backup restore, and QR code generation. Users cannot tell if application is working or frozen during these operations.","status":"closed","priority":0,"issue_type":"feature","owner":"Calmcacil@Raion","created_at":"2026-01-12T21:39:36.103626542+01:00","created_by":"Calmcacil","updated_at":"2026-01-12T23:19:04.643165298+01:00","closed_at":"2026-01-12T23:19:04.643165298+01:00","close_reason":"Added loading spinners for async operations (client creation, restore, QR generation). Users can now see visual feedback during long-running operations."} {"id":"wg-admin-1b9","title":"Update documentation for refactored scripts","description":"Update README.md and all documentation to reflect new architecture. Document: wg-install.sh usage (interactive prompts, WGI_ env vars), wg-client-manager commands (add, remove, list, show, qr), environment variable reference, security hardening features, backup/restore procedures. Update examples with new patterns.","status":"closed","priority":2,"issue_type":"task","owner":"Calmcacil@Raion","created_at":"2026-01-12T16:33:43.749727154+01:00","created_by":"Calmcacil","updated_at":"2026-01-12T17:13:12.828613341+01:00","closed_at":"2026-01-12T17:13:12.828613341+01:00","close_reason":"Documentation updated on main branch. README.md reflects new wg-install.sh and wg-client-manager scripts, WGI_ environment variables, and all usage patterns.","dependencies":[{"issue_id":"wg-admin-1b9","depends_on_id":"wg-admin-slj","type":"blocks","created_at":"2026-01-12T16:33:56.00899014+01:00","created_by":"Calmcacil"}]} -{"id":"wg-admin-2oj","title":"Add screen transition animations for more polished UX","description":"Add brief fade or slide animations when switching screens for more polished feel. Current screen transitions are instant without feedback. Consider lipgloss positioning and tick-based transitions.","status":"in_progress","priority":3,"issue_type":"feature","owner":"Calmcacil@Raion","created_at":"2026-01-12T21:40:48.821352971+01:00","created_by":"Calmcacil","updated_at":"2026-01-12T23:22:39.407954602+01:00"} +{"id":"wg-admin-2oj","title":"Add screen transition animations for more polished UX","description":"Add brief fade or slide animations when switching screens for more polished feel. Current screen transitions are instant without feedback. Consider lipgloss positioning and tick-based transitions.","status":"closed","priority":3,"issue_type":"feature","owner":"Calmcacil@Raion","created_at":"2026-01-12T21:40:48.821352971+01:00","created_by":"Calmcacil","updated_at":"2026-01-12T23:40:10.397813336+01:00","closed_at":"2026-01-12T23:40:10.397813336+01:00","close_reason":"Implemented screen transition animations with fade and slide effects"} {"id":"wg-admin-2pl","title":"Improve nftables firewall configuration","description":"Enhance firewall rules based on best practices: add TCP MSS clamping for MTU issues, add connection tracking bypass (notrack) for WireGuard traffic, implement proper rate limiting, ensure ICMPv6 neighbor discovery is allowed, validate rules before applying with nft check.","status":"closed","priority":2,"issue_type":"task","owner":"Calmcacil@Raion","created_at":"2026-01-12T16:27:53.15783619+01:00","created_by":"Calmcacil","updated_at":"2026-01-12T16:37:11.050440729+01:00","closed_at":"2026-01-12T16:37:11.050440729+01:00","close_reason":"Improved nftables firewall configuration with TCP MSS clamping (1360), connection tracking bypass (notrack) for WireGuard UDP traffic, rate limiting for SSH (3/min) and WireGuard (10/s), ensured ICMPv6 neighbor discovery (including nd-router-* messages), and added nft check validation before applying rules."} {"id":"wg-admin-33z","title":"Standardize TUI formatting and styling across all windows and popups","description":"# Problem\n\nThe TUI application lacks consistent formatting and styling across all screens and components. Each screen defines its own styles independently, leading to:\n\n1. **Inconsistent color usage** - Different screens use different color codes for similar elements\n2. **Duplicated style definitions** - Common styles (titles, help text, borders) are redefined in each file\n3. **Inconsistent modal dimensions** - Hardcoded widths/heights vary across screens\n4. **Visual inconsistency** - Users experience different UI patterns across screens\n5. **Maintenance difficulty** - Changes require updating multiple files\n\n# Current Issues Found\n\n## Color Inconsistencies\n- **Titles**: Mostly Color(62), but variations exist\n- **Help text**: Color(241), Color(243), Color(63) used interchangeably\n- **Status colors**: Different approaches to styling connected/disconnected states\n- **Success messages**: Color(46) used, but not universally\n- **Error messages**: Color(196) used, but styling varies\n\n## Duplicated Style Definitions\nEach screen file has its own style variables:\n- detailTitleStyle, listTitleStyle, addTitleStyle, restoreTitleStyle, etc.\n- Similar styles for help, error, success messages\n- Border styles repeated across multiple files\n\n## Modal Inconsistencies\n- Confirm modal uses 80x24 dimensions\n- Delete confirm modal uses 80x24 dimensions\n- No centralized modal size configuration\n- Different border styles (RoundedBorder vs NormalBorder)\n\n## Table Styles\n- Table styles defined in both list.go and restore.go\n- Same header/selected styles duplicated\n- Should use shared table styling function\n\n# Proposed Solution\n\n## 1. Create Centralized Styles Package\n\nCreate internal/tui/styles/styles.go with:\n\n### Color Palette (Single Source of Truth)\nPrimary colors:\n- ColorPrimary (62) - Titles, primary actions\n- ColorSecondary (241) - Secondary text, labels\n- ColorAccent (57) - Selected items, highlights\n- ColorSuccess (46) - Success messages\n- ColorError (196) - Error messages\n- ColorWarning (226) - Warning messages\n- ColorInfo (243) - Help text, info\n- ColorKey (63) - Keyboard shortcuts\n- ColorBorder (240) - Borders\n- ColorBackground (235) - Modal backgrounds\n\n### Common Style Functions\nCreate reusable style functions:\n- Title() - For all screen titles\n- Help() - For help text and instructions\n- Error() - For error messages\n- Success() - For success messages\n- Warning() - For warning messages\n- Key() - For keyboard shortcuts\n- Modal(width, height) - Consistent modal styling\n- TableHeader() - Table headers\n- TableSelected() - Selected table rows\n- BorderRounded() - Rounded borders\n- BorderNormal() - Normal borders\n\n### Modal Dimensions\nDefine constants:\n- ModalWidth = 80\n- ModalHeight = 24\n\n## 2. Refactor Each Screen to Use Centralized Styles\n\n### Files to Update\n- internal/tui/screens/list.go - Use shared table styles\n- internal/tui/screens/detail.go - Replace local styles with package imports\n- internal/tui/screens/add.go - Use shared title/help styles\n- internal/tui/screens/help.go - Use shared key/label styles\n- internal/tui/screens/qr.go - Use shared title/help/error styles\n- internal/tui/screens/restore.go - Use shared table/modal styles\n\n### Components to Update\n- internal/tui/components/confirm.go - Use shared modal styles\n- internal/tui/components/delete-confirm.go - Use shared modal styles\n- internal/tui/components/search.go - Use shared color palette\n\n## 3. Implementation Approach\n\n### Phase 1: Create Styles Package\n- Create internal/tui/styles/ directory\n- Implement styles.go with color palette and common functions\n- Add table.go for table-specific styles\n\n### Phase 2: Update Components First\n- Update confirm.go and delete-confirm.go to use shared modal styles\n- Update search.go to use shared color palette\n- Test components work correctly\n\n### Phase 3: Update Screens\n- Refactor each screen to import and use styles package\n- Replace local style variables with calls to styles package\n- Test each screen maintains functionality\n\n### Phase 4: Verification\n- Test navigation across all screens\n- Verify consistent visual appearance\n- Check modal sizes and positioning\n- Verify color usage is consistent\n\n# Success Criteria\n\n1. All screens use consistent color palette from single source\n2. No duplicated style definitions across files\n3. Modals have consistent dimensions and styling\n4. Table styling is shared across list and restore screens\n5. Help text, errors, success messages use consistent styles\n6. All keyboard shortcuts use same styling\n7. Code is more maintainable (style changes in one place)\n\n# Files to Create\n- internal/tui/styles/styles.go\n- internal/tui/styles/table.go (optional, could be in styles.go)\n\n# Files to Modify\n- internal/tui/screens/list.go\n- internal/tui/screens/detail.go\n- internal/tui/screens/add.go\n- internal/tui/screens/help.go\n- internal/tui/screens/qr.go\n- internal/tui/screens/restore.go\n- internal/tui/components/confirm.go\n- internal/tui/components/delete-confirm.go\n- internal/tui/components/search.go\n\n# Dependencies\nNone - this is a refactoring task that improves code organization without adding new functionality.","status":"in_progress","priority":1,"issue_type":"task","owner":"Calmcacil@Raion","created_at":"2026-01-12T22:19:57.96243735+01:00","created_by":"Calmcacil","updated_at":"2026-01-12T23:22:49.581885604+01:00"} {"id":"wg-admin-37o","title":"Add security hardening","description":"Implement: client name sanitization with regex, pre-shared key (PSK) support option, proper temporary key cleanup with trap handlers, atomic config file operations (write to temp then mv), chmod 0600 for all key files, verify no hardcoded secrets in generated files.","status":"closed","priority":2,"issue_type":"task","owner":"Calmcacil@Raion","created_at":"2026-01-12T16:27:53.148392501+01:00","created_by":"Calmcacil","updated_at":"2026-01-12T16:44:11.582485544+01:00","closed_at":"2026-01-12T16:44:11.582485544+01:00","close_reason":"Implemented all security hardening features: client name sanitization with regex (validate_client_name function), pre-shared key (PSK) support with --psk option, proper temporary key cleanup with trap handlers (cleanup_handler), atomic config file operations (mktemp + mv), chmod 0600 for all key files, and verified no hardcoded secrets (keys generated dynamically or read from files)"}