fix(worksheets): correct scaffolding summary to include all conditional modes
Bug: getScaffoldingSummary() only checked for 'always' or 'whenRegrouping', missing 'whenMultipleRegroups' and 'when3PlusDigits' modes. This caused configs with tenFrames: 'whenMultipleRegroups' to show 'no scaffolding' in the summary, even though ten-frames would appear on problems with multiple regroups. Fix: Changed from whitelist (=== 'always' || === 'whenRegrouping') to blacklist (!== 'never') approach. Now correctly identifies any mode that enables scaffolding, including all conditional modes. Added comprehensive console logging to debug the issue: - ConfigPanel.tsx: getScaffoldingSummary() logs each rule evaluation - typstGenerator.ts: logs config mode and first problem display options - displayRules.ts: logs rule resolution for each problem 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
4973d6dea1
commit
2797038502
|
|
@ -171,7 +171,8 @@
|
|||
"Bash(npx biome lint:*)",
|
||||
"Bash(TZ=America/Chicago date:*)",
|
||||
"Bash(git hash-object:*)",
|
||||
"Bash(git ls-tree:*)"
|
||||
"Bash(git ls-tree:*)",
|
||||
"Bash(git -C /Users/antialias/projects/soroban-abacus-flashcards show HEAD:apps/web/src/app/icon/route.tsx)"
|
||||
],
|
||||
"deny": [],
|
||||
"ask": []
|
||||
|
|
|
|||
|
|
@ -41,19 +41,19 @@ function getScaffoldingSummary(displayRules: any): string {
|
|||
console.log('[getScaffoldingSummary] displayRules:', displayRules)
|
||||
|
||||
const scaffoldingParts: string[] = []
|
||||
if (displayRules.carryBoxes === 'always' || displayRules.carryBoxes === 'whenRegrouping') {
|
||||
if (displayRules.carryBoxes !== 'never') {
|
||||
scaffoldingParts.push('carry boxes')
|
||||
console.log('[getScaffoldingSummary] Adding carry boxes:', displayRules.carryBoxes)
|
||||
}
|
||||
if (displayRules.answerBoxes === 'always' || displayRules.answerBoxes === 'whenRegrouping') {
|
||||
if (displayRules.answerBoxes !== 'never') {
|
||||
scaffoldingParts.push('answer boxes')
|
||||
console.log('[getScaffoldingSummary] Adding answer boxes:', displayRules.answerBoxes)
|
||||
}
|
||||
if (displayRules.placeValueColors === 'always' || displayRules.placeValueColors === 'whenRegrouping') {
|
||||
if (displayRules.placeValueColors !== 'never') {
|
||||
scaffoldingParts.push('place value colors')
|
||||
console.log('[getScaffoldingSummary] Adding place value colors:', displayRules.placeValueColors)
|
||||
}
|
||||
if (displayRules.tenFrames === 'always' || displayRules.tenFrames === 'whenRegrouping') {
|
||||
if (displayRules.tenFrames !== 'never') {
|
||||
scaffoldingParts.push('ten-frames')
|
||||
console.log('[getScaffoldingSummary] Adding ten-frames:', displayRules.tenFrames)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue