Repository navigation
feat(editor): extract every label/value pair the scan can find - #15
Merged
Merged
Conversation
The scan skipped most of a worksheet form: rows that list their answers as label/value pairs side by side, pairs whose label is merged across the columns it spans, and single-row blocks were all dropped, and the queue stopped at 24 suggestions. A lab worksheet yielded 8 fields where 36 are extractable. - A row that alternates labels and values is a form row: every pair in it is a field, instead of the first pair hiding the rest behind a "table row" guard. - A label merged across columns pairs with the value after the merge, so "PBS aliquoted for Blank and NPC as per PRDSOP | (merged) | Yes" is one field. - A merged value counts once: the cells a merge repeats are not extra columns, so "Incubator | 21LAB421" (merged across B:D) is no longer read as a table row. - Sentence-length labels are allowed next to their value, and a lone pair in a form row no longer needs a second row to qualify. - The cover-block reading accepts a single value column, so a merged label row with one answer underneath is extracted. - The queue caps rise from 24 to 80 suggestions, 40 per kind, so the ranked tail is available instead of truncated.
Two shapes were still missed on the calculation sheets, and accepting a table
retired unrelated suggestions.
- A one-row table whose values are formulas ("MQCN NTC,Ψ | MQCN NTC,RPPH1" over
"=IFERROR(..) | =IFERROR(..)") now counts as structured, so the titled table is
suggested instead of nothing.
- A table whose data fills only its first column ("Extract. Assay ID | IPC-EX
Sample ID | TqM-Int-Dup-XXX" with just the IDs below) is measured on that column
when the rest of the row is empty.
- Accepting a table no longer retires every card below it. An open-ended field
("A23:F") runs to the bottom of the sheet, and containment pruning treated that
as covering everything underneath; a field and a suggestion now have to start
inside each other.
Accepting a card removes it by suggestion id, which only covers the drawer path that started from that card. A field carrying the suggestion's name answers it wherever it points, so the list is pruned by name as well as by region.
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.
Why the change
The scan skipped most of a worksheet form — rows that list their answers as label/value pairs side by side, pairs whose label is merged across the columns it spans, single-row blocks, one-row tables of formulas, and tables whose data fills only the first column — so a lab worksheet yielded 8 fields where 36 are extractable, and accepting a table retired every suggestion below it.
Special things to note
Version number | 6still comes back as a discriminator rather than a field, so the two never overlap.Change outline
The pair scan walks each row in both directions. Four guards decided what a pair is, and each one was dropping real form content.
The table paths gained two measurements, and the pruning rule was wrong for open-ended fields:
The shapes that were being missed, from the reported worksheets:
editor/src/ └── lib/ ├── suggestions.ts # pair, merge, single-row, formula and first-column rules └── suggestions.test.ts # 8 new cases