Redesign Sheets export to normalized row format#4
Merged
bradydibble merged 4 commits intomainfrom Apr 7, 2026
Merged
Conversation
The Sheets API requires a full A1 notation range (e.g. 'Tip History'!A:A), not just a quoted sheet name. Appending !A:A satisfies the parser for all sheet names including those with spaces. https://claude.ai/code/session_011LY1ZZDXKuvy13nZQpySZU
!A1 is the idiomatic anchor for values.append — it identifies the sheet and starting cell without implying any column constraint. https://claude.ai/code/session_011LY1ZZDXKuvy13nZQpySZU
Check if the sheet already has data before appending; include the header row only when the sheet is empty. Subsequent exports append the data row only. https://claude.ai/code/session_011LY1ZZDXKuvy13nZQpySZU
Each export now writes one summary row + one row per staff member, all sharing a fixed 20-column schema: Date, Shift, Type, Calc ID, Gross Tips, CC Fee Rate, CC Fees, Net Tips, Kitchen %, Kitchen Pool, Liquor Sales, Bar Liquor %, Bar Pool, FOH Pool, Name, Role, FOH Share, Bar Share, Kitchen Share, Total Type column is 'summary' or 'staff'. Calc ID ties rows together and traces back to the app DB. Header written once on empty sheet only. https://claude.ai/code/session_011LY1ZZDXKuvy13nZQpySZU
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
summaryrow + onestaffrow per employee — fixed 20-column schema that never changes regardless of staffingSchema
Typeissummaryorstaff.Calc IDties rows together and traces back to the app DB — the future-proofing anchor if new fields are added later.Test plan
https://claude.ai/code/session_011LY1ZZDXKuvy13nZQpySZU