fix(V2): keep primary worksheet first in xlsx exports#1560
Merged
Conversation
Ensure the renamed main V2 worksheet is always emitted first in generated XLSX files so the primary entity tab opens first for users.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
xlsSheetNameprojectsandunitsare first tabsTest plan
eval "$(fnm env)" && fnm use && bash tests/run-tests.sh npx cross-env NODE_ENV=test USE_SIMULATOR=true CW_PORT=31311 mocha --loader node_modules/extensionless/src/register.js tests/v2/integration/v2-xls.spec.js --reporter spec --exit --timeout 300000Note
Low Risk
Low risk: changes only worksheet ordering during XLSX build and adds assertions in integration tests. No changes to parsing, staging, or data transformation logic.
Overview
V2 XLSX exports now preserve a deterministic sheet order by explicitly building the workbook with the main sheet (e.g.
projects/units) first, avoiding object key reordering side effects after renaming the model sheet.Integration tests for
createV2Xlsare updated to assert the main worksheet is the first tab for bothProjectV2andUnitV2exports.Written by Cursor Bugbot for commit c8a57c5. This will update automatically on new commits. Configure here.