Skip to content

✨ feat(editor,config): add editor integration and config edit command#20

Merged
anIcedAntFA merged 1 commit intomainfrom
feat/add-support-editor
Feb 7, 2026
Merged

✨ feat(editor,config): add editor integration and config edit command#20
anIcedAntFA merged 1 commit intomainfrom
feat/add-support-editor

Conversation

@anIcedAntFA
Copy link
Copy Markdown
Owner

@anIcedAntFA anIcedAntFA commented Feb 7, 2026

  • Add new editor package for interactive content editing

    • Smart editor detection (VISUAL > EDITOR > GOHOME_EDITOR > platform fallback)
    • Cross-platform support (Linux, macOS, Windows)
    • ASCII-only instruction formatting for terminal compatibility
    • Comment-based instructions with auto-removal
    • Content validation and cleaning
    • 100% test coverage (15+ unit tests)
  • Implement --edit/-E flag for report command

    • Opens output in editor before displaying/copying
    • Seamless clipboard integration
    • Clear user feedback messages
    • Fixed duplicate separator issue in output
  • Add 'gohome config edit' command

    • Opens config file in default editor
    • Auto-creates config file if missing
    • Direct editor access without instruction wrapper
    • Added command validation tests
  • Fix formatting issues

    • Remove blank line after instruction separator
    • Remove duplicate separators in edit mode output
    • ASCII-only characters for better terminal compatibility
  • Update documentation

    • README: Add config edit to management section
    • ROADMAP: Mark edit mode features as completed
    • CLI_GUIDE: Comprehensive edit mode usage examples

Related: Editor integration for filtering reports before sharing

📝 Description

This PR adds comprehensive editor integration to gohome, enabling interactive content filtering and direct config file editing. Users can now filter commit reports before sharing (via --edit flag) and edit configuration files directly in their preferred editor (via gohome config edit).

Key Features

  • Interactive Report Editing:
    --edit / -E flag opens report in editor for filtering/customization before display or clipboard copy
  • Config Editor Command:
    gohome config edit opens configuration file directly in editor
  • Smart Editor Detection:
    Respects $VISUAL, $EDITOR, $GOHOME_EDITOR environment variables with platform-specific fallbacks
  • Terminal Compatibility:
    ASCII-only formatting ensures proper rendering in nano/vim
  • Robust Implementation:
    100% test coverage, comprehensive error handling, security-conscious design

🔗 Related Issue

Closes #(issue number)

👥 Reviewers

@anIcedAntFA

🎯 Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update
  • ♻️ Code refactoring (no functional changes)
  • 🎨 Style/UI update
  • ⚡ Performance improvement
  • [] ✅ Test update
  • 🔧 Configuration update (CI/CD, linters, build tools)
  • 🧹 Chore (dependencies, cleanup, maintenance)
  • 🔒 Security fix
  • ♿ Accessibility improvement

🧪 How Has This Been Tested?

  • Unit tests
  • Integration tests
  • Manual testing

Test Configuration:

  • OS: Arch Linux, Cosmic Desktop
  • Go version: Go v1.25.5

📸 Screenshots (if applicable)

✅ Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have run gofumpt -l -w . to format my code
  • I have run golangci-lint run and fixed any issues

📚 Additional Notes

- Add new editor package for interactive content editing
  - Smart editor detection (VISUAL > EDITOR > GOHOME_EDITOR > platform fallback)
  - Cross-platform support (Linux, macOS, Windows)
  - ASCII-only instruction formatting for terminal compatibility
  - Comment-based instructions with auto-removal
  - Content validation and cleaning
  - 100% test coverage (15+ unit tests)

- Implement --edit/-E flag for report command
  - Opens output in editor before displaying/copying
  - Seamless clipboard integration
  - Clear user feedback messages
  - Fixed duplicate separator issue in output

- Add 'gohome config edit' command
  - Opens config file in default editor
  - Auto-creates config file if missing
  - Direct editor access without instruction wrapper
  - Added command validation tests

- Fix formatting issues
  - Remove blank line after instruction separator
  - Remove duplicate separators in edit mode output
  - ASCII-only characters for better terminal compatibility

- Update documentation
  - README: Add config edit to management section
  - ROADMAP: Mark edit mode features as completed
  - CLI_GUIDE: Comprehensive edit mode usage examples

Related: Editor integration for filtering reports before sharing
@anIcedAntFA anIcedAntFA self-assigned this Feb 7, 2026
@anIcedAntFA anIcedAntFA added the enhancement New feature or request label Feb 7, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 7, 2026

Codecov Report

❌ Patch coverage is 56.88623% with 72 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/gohome/cmd/report.go 3.12% 31 Missing ⚠️
cmd/gohome/cmd/config.go 4.34% 22 Missing ⚠️
internal/editor/editor.go 83.03% 15 Missing and 4 partials ⚠️

📢 Thoughts on this report? Let us know!

@anIcedAntFA anIcedAntFA merged commit 214654f into main Feb 7, 2026
7 checks passed
@anIcedAntFA anIcedAntFA deleted the feat/add-support-editor branch February 7, 2026 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant