Repository navigation
fix(band): name the project by its folder and read the model without grep on Windows - #1179
Open
markdconnelly wants to merge 1 commit into
Open
markdconnelly wants to merge 1 commit into
markdconnelly wants to merge 1 commit into
Conversation
…grep on Windows On Windows the repo root and cwd come with backslashes, so base() kept the whole path: the ledger's project column was C:\...\shop and every CSV was named C__..._shop.csv. Split on both separators. readModel shelled out to grep -o only, which Windows lacks, so every row's model stayed empty. Fall back to $.fs.read like readTitle does (transcripts under 4 MiB). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Two Windows defects in what the band records to the ledger and the board.
1. The project name was the whole path.
base()split only on/, but on Windows$.session.repo().rootand$.session.cwd()come back asC:\Development\GitHub\shop. So the ledger'sprojectcolumn held the full path, and every ledger file was named likeC__Development_GitHub_shop.csv.base()now splits on both separators and still trims a trailing one.2. The model column was always empty.
readModelonly shelled out togrep -o, which Windows doesn't have, so every row'smodelstayed''. It now falls back to$.fs.readthe same wayreadTitledoes: it reads transcripts under 4 MiB, and thefindstrnote onreadTitleapplies here too.Existing ledgers: this change doesn't migrate anything. Rows already written on Windows keep their full-path
projectand stay in theirC__…csvfiles, so the board keeps showing them under that name. New tasks go to<folder>.csv. Anyone who wants them merged can delete or rename the old CSVs by hand.Test: a new test in
tests/band.test.tsxuses a backslash repo root with a trailing separator, aprocess.runthat refuses (no grep, no git), and a transcript read throughfs.read. It asserts the ledger is…/band/shop.csvwithproject: shopand the majority model. It fails when either fix is reverted on its own.Note: on a Windows machine,
claude plugin testalready fails 3 band tests before this change (after /ponytail band…,after /clear…,after /resume…). They compare mocked POSIX paths exactly, and the test kit hands paths on with backslashes. That's untouched here, and CI on Linux is unaffected.🤖 Generated with Claude Code