Skip to content

Treat non-formula lines as text instead of erroring - #6

Merged
ccakes merged 3 commits into
mainfrom
claude/line-parsing-eagerness-swcs8j
Jun 27, 2026
Merged

Treat non-formula lines as text instead of erroring#6
ccakes merged 3 commits into
mainfrom
claude/line-parsing-eagerness-swcs8j

Conversation

@ccakes

@ccakes ccakes commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Elo is a notepad first and a calculator second, but the parser was eager:
every non-empty line was parsed and evaluated, so ordinary prose ("buy some
milk", "groceries") surfaced "unknown identifier" errors on the right side.
Previously only bare-identifier list items were swallowed.

Each line is now classified into LineKind::Formula or LineKind::Text. A line
falls back to Text only when it both errors and doesn't look like a deliberate
calculation: the parser left tokens unconsumed (trailing prose) or the whole
line is a single bare identifier. This preserves the intentional eagerness
from the earlier markdown/list work — genuine mistakes like foo(10) or
1 / bogus still report errors, and a lone known variable name still recalls
its value.

Evaluation is also split from committing side effects: prose lines no longer
pollute prev, the running block (sum/avg), or variables.

  • parser: expose at_end() so the session can detect partial parses
  • session: add LineKind, classify(), unify list-marker handling, defer
    record_result/variable insertion to confirmed formulas
  • tauri: surface is_text on LineResult

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_018drjRsrfVJ8479qvrqPjNR

claude added 3 commits June 27, 2026 02:22
Elo is a notepad first and a calculator second, but the parser was eager:
every non-empty line was parsed and evaluated, so ordinary prose ("buy some
milk", "groceries") surfaced "unknown identifier" errors on the right side.
Previously only bare-identifier list items were swallowed.

Each line is now classified into LineKind::Formula or LineKind::Text. A line
falls back to Text only when it both errors and doesn't look like a deliberate
calculation: the parser left tokens unconsumed (trailing prose) or the whole
line is a single bare identifier. This preserves the intentional eagerness
from the earlier markdown/list work — genuine mistakes like foo(10) or
1 / bogus still report errors, and a lone known variable name still recalls
its value.

Evaluation is also split from committing side effects: prose lines no longer
pollute prev, the running block (sum/avg), or variables.

- parser: expose at_end() so the session can detect partial parses
- session: add LineKind, classify(), unify list-marker handling, defer
  record_result/variable insertion to confirmed formulas
- tauri: surface is_text on LineResult

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018drjRsrfVJ8479qvrqPjNR
The released Elo.app failed to launch because Elo.app/Contents/MacOS/Elo
had lost its executable bit. Root cause: actions/upload-artifact does not
retain Unix file permissions. The build-macos job uploaded the raw Elo.app
directory; by the time the release job downloaded and zipped it, +x was
gone (the .dmg was unaffected since its filesystem image is opaque to the
artifact mechanism).

Zip the bundle on the macOS runner with `ditto -c -k --keepParent`, which
preserves permissions and symlinks, and ship that archive through to the
release unchanged instead of re-zipping the permission-stripped download.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018drjRsrfVJ8479qvrqPjNR
Switch the macOS release artifact from Elo-macos.app.zip to the universal
.dmg, which Homebrew casks mount natively. The build previously passed
`--bundles app`, so no DMG was ever produced (the dmg cp silently no-opped);
build `--bundles dmg` so the universal disk image is created and shipped.

The DMG is a single opaque image, so upload-artifact's permission stripping
can't touch the executable bit inside it — this also removes the need for the
ditto-zip workaround, which is dropped.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018drjRsrfVJ8479qvrqPjNR
@ccakes
ccakes merged commit 1136482 into main Jun 27, 2026
5 checks passed
@ccakes
ccakes deleted the claude/line-parsing-eagerness-swcs8j branch June 27, 2026 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants