Phase 7: Evaluate Editor migration strategy
Overview
Assess and potentially migrate custom editor support in internal/surveyext/surveyext.go (~242 lines).
Current Custom Features
The GLabEditor has specialized behavior:
- Custom prompt: "(e) or Enter to launch nano, (s) or Esc to skip"
-
BlankAllowedflag for optional editing - Custom key handling (e=edit, s=skip, Esc=skip)
- Respects
GIT_EDITOR,VISUAL,EDITORenv vars - Cross-platform (Windows=notepad, Unix=nano)
- UTF-8 BOM handling for Windows
Files Using Editor
Decision Points
Options: A. Migrate to huh editor (if feature-complete) B. Contribute missing features to huh upstream C. Keep surveyext temporarily alongside huh D. Build custom editor on huh primitives
Questions:
- How critical is the custom editor behavior?
- Can huh provide equivalent functionality?
- Is editor usage frequent enough to justify custom implementation?
- Would upstream huh accept our features?
Recommendation
- Assess huh's editor capabilities
- Test if huh.NewText() with external editor mode works
- If insufficient, evaluate:
- Contribution upstream feasibility
- Cost/benefit of custom implementation
- Option to keep surveyext only for editor
Complexity: 8/10 Effort: 3-5 days (investigation + implementation)