Skip to content

cleaning up the vscode questionnaire#138

Open
pessi-v wants to merge 16 commits into
mainfrom
cleanup-questionnaire
Open

cleaning up the vscode questionnaire#138
pessi-v wants to merge 16 commits into
mainfrom
cleanup-questionnaire

Conversation

@pessi-v
Copy link
Copy Markdown
Collaborator

@pessi-v pessi-v commented Nov 10, 2025

  • Change references to questionnaire to be "Assessment Questionnaire", not "co2 assessment" or anything else
  • Some changes in how the questionnaire is presented in VSCode
  • Some changes to the questionnaire answers
  • Some changes to questions

Pull Request Checklist

Legal Requirements

  • I have read and agree to the Contributor License Agreement
  • I understand that by contributing to this project, I grant the Carbonara team a perpetual, irrevocable license to use my contributions under the BSD license, while the public project remains under AGPL-3.0-or-later

Code Quality

  • My code follows the project's coding style and conventions
  • I have added appropriate tests for my changes
  • All new and existing tests pass
  • I have updated documentation where necessary

Description

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
  • Refactoring (no functional changes)
  • Performance improvement
  • Test improvements

Testing

  • Unit tests
  • Integration tests
  • Manual testing
  • E2E tests (if applicable)

Additional Notes

Comment thread packages/cli/src/commands/assess.ts Outdated
Object.entries(data.categoryBreakdown).forEach(([category, score]) => {
const scoreColor = (score as number) >= 7 ? 'green' : (score as number) >= 4 ? 'yellow' : 'red';
console.log(` ${category}: ${chalk[scoreColor](score + '/10')}`);
const scoreColor =
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@grrrau all of these calculations we might want to check

// Fallback: wait additional time for CLI process to complete
await vscode.window.waitForTimeout(3000);
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pessi-v this test should exist, I just made it pass again on #146

}
}
}
// // Look for the Data & Results section
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same, all the test should exist

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pessi-v the tests are still commented out, do you need something?

if (!foundAnalysisTree) {
dataTree = allTrees.nth(1);
}
// // Click on Data & Results section to ensure it's expanded and active
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test should exist

// // Debug: Let's see what tree sections we have available

const errorMessage = `Expected to find test analysis results in Data & Results tab.
// const allTreeSections = vscode.window.locator(".pane-header");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test should exist

} else {
}
}
// throw new Error(errorMessage);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test should exist

// Create .carbonara directory structure
// Note: Don't create .carbonara directory here - let each test create it
// This ensures the provider doesn't initialize with an empty database
const carbonaraDir = path.join(tempDir, ".carbonara");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

});

test("should load and display data when assessment data exists", async function () {
test.skip("should load and display data when assessment data exists", async function () {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test should exist, see above and #146

import * as fs from "fs";
import { ToolsTreeProvider, ToolItem } from "../../tools-tree-provider";

suite("ToolsTreeProvider Unit Tests", () => {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file looks fine, pls double check if all tests are still there

Copy link
Copy Markdown
Collaborator

@suung suung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but tests have been removed that should be brought back

Copy link
Copy Markdown
Collaborator

@grrrau grrrau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can i get a sshot please, of the state of the changes?

@pessi-v pessi-v force-pushed the cleanup-questionnaire branch from a272d32 to a521977 Compare November 13, 2025 19:21
@pessi-v
Copy link
Copy Markdown
Collaborator Author

pessi-v commented Nov 13, 2025

Screenshot 2025-11-13 at 20 20 12

@pessi-v
Copy link
Copy Markdown
Collaborator Author

pessi-v commented Nov 14, 2025

Ok, I'm going to hand this over to yous now, because I won't be able to work anymore. There's some tests that need fixing, but otherwise it should be good to go.

  • I fixed the initialisation to work with the last few merges and this branch
  • There's a popup after each Questionnaire is completed, and a popup in the end

@grrrau @suung

@pessi-v
Copy link
Copy Markdown
Collaborator Author

pessi-v commented Nov 14, 2025

Uploading Screenshot 2025-11-14 at 10.49.46.png…

@suung
Copy link
Copy Markdown
Collaborator

suung commented Nov 14, 2025

Ok, I'm going to hand this over to yous now, because I won't be able to work anymore. There's some tests that need fixing, but otherwise it should be good to go.

  • I fixed the initialisation to work with the last few merges and this branch
  • There's a popup after each Questionnaire is completed, and a popup in the end

@grrrau @suung

@pessi-v well noted, thanks for your efforts so last minute before holiday.

@pessi-v pessi-v force-pushed the cleanup-questionnaire branch from f2de23c to 60d9003 Compare November 26, 2025 19:00
@pessi-v pessi-v requested a review from suung November 26, 2025 22:45
@pessi-v
Copy link
Copy Markdown
Collaborator Author

pessi-v commented Nov 26, 2025

Dried up, added tests, made sure that the new questions are included in cli and in vscode @suung

@suung suung added this to the November Release milestone Nov 27, 2025
@pessi-v
Copy link
Copy Markdown
Collaborator Author

pessi-v commented Nov 27, 2025

@suung can I merge this?

@suung
Copy link
Copy Markdown
Collaborator

suung commented Nov 27, 2025

@suung can I merge this?
@pessi-v
I didn'f see if all the teste are brought back (see my previous comment). For me it is super important, that the test coverage remains stable from now on. On main there is also quite some updates to the e2e coverage on data loading.

I haven't looked through the code yet.

Copy link
Copy Markdown
Collaborator

@suung suung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests are still commented out

@suung
Copy link
Copy Markdown
Collaborator

suung commented Dec 9, 2025

@grrrau Those changes are now in slightly different form on main, you can check the screenshots above to see if there is something you would want to port, it should be easy, namely

  • main has a folder icon instead of the arrow in the questionnaire
  • maybe something about the data & results style (i am not 100% sure whats the difference between the 2 codescan types there)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants