Skip to content

Commit 9d81d8d

Browse files
therealbradclaude
andauthored
fix: resolve E2E failures, CodeQL warnings, and debug cleanup (#216)
* fix: resolve CodeQL quality warnings - Remove useless comparison (i > 0 always true in loop body) - Remove unused editorNode variable in SlashCommand onUpdate - Add type import for ExtendedIntegration - Fix bare string expressions in test stubs (missing return) - Remove redundant open={var !== null} in 39 admin modal guards - Remove redundant null check after early return in health score calc - Remove redundant open checks in AddTestRunModal useEffect Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor: apply consistent formatting and improve readability in various worker scripts - Standardized console log messages for tenant configuration loading and error handling across multiple worker files. - Enhanced readability by restructuring long lines and ensuring consistent indentation. - Updated error messages to provide clearer context for failures in tenant configuration loading and Elasticsearch operations. This refactor aims to improve code maintainability and clarity without altering functionality. * refactor: improve loading state handling in Select components - Fix session cache not invalidated after user profile update - Fix folder duplicate name error detection for ZenStack error format - Disable submit buttons until async data loads (sessions, milestones, test cases) to prevent race condition with undefined template/workflow - Scope combobox pagination "Next" button selector to avoid wizard button ambiguity in E2E test - Apply prettier formatting to files from main merge Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor: streamline parent and connection handling in milestone and session modals - Simplified the connection logic for parent milestones in AddMilestoneModal. - Enhanced the AddSessionModal by using spread operators for conditional connections, improving readability and maintainability. - Added logging for error responses in the API route handler to aid debugging during create/upsert operations. These changes improve code clarity and error tracking without altering existing functionality. * refactor: apply consistent formatting and improve readability in various worker scripts - Remove debug console.log statements from automationImports, magic-select-cases, test-results import, aiExportActions, testmoImportWorker, and syncWorker - Remove temporary MODEL API ERROR logging from model handler - Fix pagination E2E tests: navigate directly via URL params (?node=ID&pageSize=10) instead of flaky folder-tree clicks - Fix search-filter pagination tests with same URL param approach Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: update E2E tests for prompt config features and step creation - Add missing generate_from_url and generate_from_url_app features to prompt config test data (form validation requires all features to have non-empty systemPrompt) - Switch ACL-06 step creation test from scalar FK to relation connect syntax for ZenStack policy evaluation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor: remove unnecessary console.log statements from syncWorker and testmoImportWorker - Eliminated debug logging related to issue creation and update in syncWorker. - Removed verbose logging for multiple Testmo cases mapping in testmoImportWorker to streamline output and improve code clarity. These changes enhance the maintainability of the worker scripts by reducing clutter in the logs. * fix: resolve session form reset race and step creation policy - Consolidate AddSessionModal form init into single guarded useEffect with formInitRef to prevent async data loading from wiping user input (fixes "Name must be at least 2 characters" on session create with config+milestone) - Add steps to fast-path create models with indirect project resolution via testCase lookup (bypasses ZenStack policy evaluation bug for deep relation chains during create operations) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6257332 commit 9d81d8d

50 files changed

Lines changed: 278 additions & 338 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

testplanit/app/[locale]/admin/app-config/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,14 +215,14 @@ function AppConfigs() {
215215
{editingConfig && (
216216
<EditAppConfig
217217
config={editingConfig}
218-
open={editingConfig !== null}
218+
open={true}
219219
onClose={() => setEditingConfig(null)}
220220
/>
221221
)}
222222
{deletingConfig && (
223223
<DeleteAppConfig
224224
config={deletingConfig}
225-
open={deletingConfig !== null}
225+
open={true}
226226
onClose={() => setDeletingConfig(null)}
227227
/>
228228
)}

testplanit/app/[locale]/admin/configurations/Categories.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ function ConfigCategoriesList() {
557557
{variantToEdit && (
558558
<EditVariantModal
559559
variant={variantToEdit}
560-
open={variantToEdit !== null}
560+
open={true}
561561
onClose={() => setVariantToEdit(null)}
562562
onSave={handleVariantUpdate}
563563
/>
@@ -566,22 +566,22 @@ function ConfigCategoriesList() {
566566
{variantToDelete && (
567567
<DeleteVariantModal
568568
variant={variantToDelete}
569-
open={variantToDelete !== null}
569+
open={true}
570570
onClose={() => setVariantToDelete(null)}
571571
onDelete={handleVariantDelete}
572572
/>
573573
)}
574574
{editingCategory && (
575575
<EditCategory
576576
category={editingCategory}
577-
open={editingCategory !== null}
577+
open={true}
578578
onClose={() => setEditingCategory(null)}
579579
/>
580580
)}
581581
{deletingCategory && (
582582
<DeleteConfigCategory
583583
category={deletingCategory}
584-
open={deletingCategory !== null}
584+
open={true}
585585
onClose={() => setDeletingCategory(null)}
586586
/>
587587
)}

testplanit/app/[locale]/admin/configurations/Configurations.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,14 +253,14 @@ function Configurations(): React.ReactElement | null {
253253
{editingConfiguration && (
254254
<EditConfiguration
255255
configuration={editingConfiguration}
256-
open={editingConfiguration !== null}
256+
open={true}
257257
onClose={() => setEditingConfiguration(null)}
258258
/>
259259
)}
260260
{deletingConfiguration && (
261261
<DeleteConfiguration
262262
configuration={deletingConfiguration}
263-
open={deletingConfiguration !== null}
263+
open={true}
264264
onClose={() => setDeletingConfiguration(null)}
265265
/>
266266
)}

testplanit/app/[locale]/admin/fields/CaseFields.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,14 @@ export default function CaseFields() {
173173
{editingCaseField && (
174174
<EditCaseField
175175
casefield={editingCaseField}
176-
open={editingCaseField !== null}
176+
open={true}
177177
onClose={() => setEditingCaseField(null)}
178178
/>
179179
)}
180180
{deletingCaseField && (
181181
<DeleteCaseField
182182
casefield={deletingCaseField}
183-
open={deletingCaseField !== null}
183+
open={true}
184184
onClose={() => setDeletingCaseField(null)}
185185
/>
186186
)}

testplanit/app/[locale]/admin/fields/ResultFields.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,14 @@ export default function ResultFields() {
173173
{editingResultField && (
174174
<EditResultField
175175
resultfield={editingResultField}
176-
open={editingResultField !== null}
176+
open={true}
177177
onClose={() => setEditingResultField(null)}
178178
/>
179179
)}
180180
{deletingResultField && (
181181
<DeleteResultField
182182
resultfield={deletingResultField}
183-
open={deletingResultField !== null}
183+
open={true}
184184
onClose={() => setDeletingResultField(null)}
185185
/>
186186
)}

testplanit/app/[locale]/admin/fields/Templates.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,14 +263,14 @@ export default function TemplateComponent() {
263263
{editingTemplate && (
264264
<EditTemplate
265265
template={editingTemplate as any}
266-
open={editingTemplate !== null}
266+
open={true}
267267
onClose={() => setEditingTemplate(null)}
268268
/>
269269
)}
270270
{deletingTemplate && (
271271
<DeleteTemplate
272272
template={deletingTemplate}
273-
open={deletingTemplate !== null}
273+
open={true}
274274
onClose={() => setDeletingTemplate(null)}
275275
/>
276276
)}

testplanit/app/[locale]/admin/groups/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,14 +298,14 @@ function GroupList() {
298298
{editingGroup && (
299299
<EditGroup
300300
group={editingGroup}
301-
open={editingGroup !== null}
301+
open={true}
302302
onClose={() => setEditingGroup(null)}
303303
/>
304304
)}
305305
{deletingGroup && (
306306
<DeleteGroup
307307
group={deletingGroup}
308-
open={deletingGroup !== null}
308+
open={true}
309309
onClose={() => setDeletingGroup(null)}
310310
/>
311311
)}

testplanit/app/[locale]/admin/integrations/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import {
4040
usePagination,
4141
} from "~/lib/contexts/PaginationContext";
4242
import { useRouter } from "~/lib/navigation";
43-
import { ExtendedIntegration, getColumns } from "./columns";
43+
import { type ExtendedIntegration, getColumns } from "./columns";
4444

4545
type PageSizeOption = number | "All";
4646

testplanit/app/[locale]/admin/issues/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,14 +433,14 @@ function IssueList() {
433433
{editingIssue && (
434434
<EditIssue
435435
issue={editingIssue}
436-
open={editingIssue !== null}
436+
open={true}
437437
onClose={() => setEditingIssue(null)}
438438
/>
439439
)}
440440
{deletingIssue && (
441441
<DeleteIssue
442442
issue={deletingIssue}
443-
open={deletingIssue !== null}
443+
open={true}
444444
onClose={() => setDeletingIssue(null)}
445445
/>
446446
)}

testplanit/app/[locale]/admin/llm/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,14 +469,14 @@ function LlmIntegrationList() {
469469
currentSpend={
470470
usageByIntegrationIdRef.current.get(editingIntegration.id) ?? 0
471471
}
472-
open={editingIntegration !== null}
472+
open={true}
473473
onClose={() => setEditingIntegration(null)}
474474
/>
475475
)}
476476
{deletingIntegration && (
477477
<DeleteLlmIntegration
478478
integration={deletingIntegration}
479-
open={deletingIntegration !== null}
479+
open={true}
480480
onClose={() => setDeletingIntegration(null)}
481481
/>
482482
)}

0 commit comments

Comments
 (0)