Skip to content

[#2528] Add YAML configuration file wizard#2557

Draft
ashmitahaldar wants to merge 11 commits intoreposense:masterfrom
ashmitahaldar:add-config-wizard
Draft

[#2528] Add YAML configuration file wizard#2557
ashmitahaldar wants to merge 11 commits intoreposense:masterfrom
ashmitahaldar:add-config-wizard

Conversation

@ashmitahaldar
Copy link
Contributor

@ashmitahaldar ashmitahaldar commented Mar 12, 2026

Fixes #2528

Proposed commit message

  Creating report-config.yaml currently requires users to manually
  edit files with exact schema knowledge, which is error-prone and
  has a steep learning curve for new users.

  Add an interactive web-based Configuration Wizard that guides
  users through creating a report-config.yaml file via a multi-step
  form with live YAML preview, launched via:

    java -jar RepoSense.jar --config-wizard

Other information

The wizard opens at http://localhost:9000/config-wizard and walks users through four steps:
1. Report Settings (title)
2. Repos & Branches (repo URL, per-branch config, authors)
3. Groups (per-repo file grouping)
4. Review & Generate (YAML preview, write to generated-configs/)

Backend changes:

  • Add ConfigWizardServer: embedded HTTP server serving the Vue.js SPA and REST API (/api/validate, /api/generate, /api/preview, /api/quit)
  • Add ConfigFileWriter: writes report-config.yaml via Jackson
  • Add --config-wizard flag to ArgsParser and route in RepoSense.main()

Frontend changes (frontend/config-wizard/):

  • 4-step wizard with YAML-shaped store mirroring the report-config.yaml hierarchy
  • Two-pane layout: form on the left, live YAML preview on the right with a draggable resizer
  • Author fields use correct YAML keys matching ReportAuthorDetails
    @JsonProperty annotations (author-git-host-id, author-emails, author-display-name, author-git-author-name)
  • Quit button in header and Close Wizard button on success screen, both calling /api/quit to stop the server cleanly

- Added App.vue as the main component for the wizard, integrating Bootstrap for styling and a stepper for navigation.
- Created individual components for each step: RepoStep, AuthorStep, GroupStep, ReportStep, and ReviewStep.
- Implemented a reactive store to manage the wizard's state and configuration data.
- Developed a backend API to validate repository locations and generate configuration files in CSV and YAML formats.
- Added functionality to dynamically add and remove repositories, authors, and groups within the wizard.
- Included validation for required fields in each step to ensure proper configuration.
- Created tests for the ConfigFileWriter to verify correct CSV and YAML generation.
- Added ReviewStep component for reviewing configuration before generation.
- Created WizardStep component to standardize step layout and navigation.
- Introduced index.html and main.ts for the new configuration wizard entry point.
- Developed store.ts to manage the state of the configuration wizard.
- Updated Vite configuration to include the new config-wizard entry.
- Removed legacy wizard components and their associated files.
- Enhanced ConfigWizardServer to handle quit requests gracefully.
@github-actions github-actions bot requested a deployment to dashboard-2557 March 12, 2026 02:35 Abandoned
@github-actions github-actions bot requested a deployment to docs-2557 March 12, 2026 02:35 Abandoned
- Added new API endpoint `/api/validate-config` for parsing config via RepoSense parser.
- Updated `/api/validate-glob` to validate glob pattern syntax.
- Implemented TagChipInput component for reusable multi-value input fields.
- Enhanced validation feedback for glob patterns and email addresses in GroupsStep and ReposStep components.
- Introduced loading states for YAML preview and validation processes.
- Improved user experience with inline validation messages and success screens.
- Updated ReviewStep to handle tier 3 validation and provide user feedback.
- ConfigFileWriter now omits null fields when writing YAML.
- ConfigWizardServer handles new validation endpoints and error escaping for JSON responses.
@github-actions github-actions bot requested a deployment to dashboard-2557 March 12, 2026 04:28 Abandoned
@github-actions github-actions bot requested a deployment to docs-2557 March 12, 2026 04:28 Abandoned
@github-actions github-actions bot requested a deployment to dashboard-2557 March 12, 2026 05:12 Abandoned
@github-actions github-actions bot requested a deployment to docs-2557 March 12, 2026 05:12 Abandoned
@github-actions github-actions bot requested a deployment to dashboard-2557 March 12, 2026 05:13 Abandoned
@github-actions github-actions bot requested a deployment to docs-2557 March 12, 2026 05:13 Abandoned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add interactive configuration wizard for generating config files

1 participant