Skip to content

feat: Major UI improvements for Link.Calculator#46

Merged
konard merged 7 commits intomainfrom
issue-44-2e8fe384578e
Jan 27, 2026
Merged

feat: Major UI improvements for Link.Calculator#46
konard merged 7 commits intomainfrom
issue-44-2e8fe384578e

Conversation

@konard
Copy link
Contributor

@konard konard commented Jan 27, 2026

Summary

This PR implements comprehensive UI improvements as requested in #44:

Branding Updates

  • New header: SVG logo + "Link.Calculator" title with updated tagline "Free open-source calculator dedicated to public domain"
  • Updated footer to use "Link.Calculator" brand name

Input Section Improvements

  • Removed "Expression" label for cleaner UI
  • Moved interpretation section before result and renamed to "Input"
  • Added calculate button (=) in the input field
  • Enter key now triggers calculation
  • Disabled reactive updates - calculation only happens on button click or Enter press
  • Removed manual resize indicator (auto-resize only)
  • Added window resize handler for textarea

Settings Improvements

  • Renamed "System" theme to "Auto" for clarity
  • Added "Automatic" as first option in language selector
  • Added preferred currency setting with:
    • 12 major fiat currencies (USD, EUR, GBP, JPY, CNY, INR, RUB, BRL, CHF, CAD, AUD, KRW)
    • Top 10 cryptocurrencies (BTC, ETH, USDT, BNB, SOL, XRP, USDC, ADA, DOGE, AVAX)
  • Currency auto-detected from browser locale

Display Improvements

  • Computation time shown in result header (from Rust worker)

Examples Section (NEW)

  • Examples are now loaded from data/examples.lino file
  • 6 random examples shown from different categories for variety
  • Categories: arithmetic, currency, datetime, functions, integration

Testing (NEW)

  • Added 23 new React unit tests for App.tsx component
  • Added 13 unit tests for examples module
  • Updated E2E tests to use explicit calculation trigger (Enter key)
  • Added screenshot generation tests for documentation

Documentation (NEW)

  • Created docs/USE-CASES.md with screenshots of all major features
  • Added 7 screenshots covering: initial state, simple arithmetic, currency conversion, symbolic integration, definite integrals, math functions, and dark theme
  • Each use case includes direct links to try the examples

CI/CD (NEW)

  • Added workflow for auto-updating screenshots when web code changes

Translations

  • Updated all 7 locale files (en, ru, de, fr, zh, hi, ar) with new translation keys

Test Plan

  • Run TypeScript type check (npx tsc --noEmit)
  • Run all tests (npm test -- --run) - 118 tests passing
  • Run E2E tests (npm run test:e2e) - 36 tests passing
  • Run Rust clippy checks
  • Manual testing of new UI features in browser
  • Verify logo displays correctly in both light and dark themes
  • Test Enter key calculation trigger
  • Test calculate button functionality
  • Verify currency preference persistence

Fixes #44


🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #44
@konard konard self-assigned this Jan 27, 2026
- Rebrand to "Link.Calculator" with SVG logo and public domain tagline
- Remove "Expression" label from input field for cleaner UI
- Move interpretation section before result and rename to "Input"
- Add calculate button (=) and Enter key support for on-command calculation
- Replace reactive updates with explicit calculation trigger
- Rename "System" theme to "Auto" for clarity
- Add "Automatic" as first language option
- Add preferred currency setting with fiat and crypto currencies
- Show computation time from Rust worker
- Handle window resize for textarea auto-resize
- Disable manual resize (auto-resize only)
- Update all locale files with new translations

Fixes #44

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@konard konard changed the title [WIP] UI improvements feat: Major UI improvements for Link.Calculator Jan 27, 2026
@konard konard marked this pull request as ready for review January 27, 2026 10:08
@konard
Copy link
Contributor Author

konard commented Jan 27, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $7.272293 USD
  • Calculated by Anthropic: $5.632160 USD
  • Difference: $-1.640133 (-22.55%)
    📎 Log file uploaded as Gist (1170KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Contributor Author

konard commented Jan 27, 2026

Please make sure we have React.js unit tests for each updated component, and we have e2e tests (using https://github.com/link-foundation/browser-commander) for each and every typical example of input from our logic unit tests, and also section with examples in the bottom shows random 6 examples, on how our system can be used, and these examples are collected from tests, and saved as .lino document in the repository, so we can update it separately to take effect on the website.

I want to establish base line for the best possible quality on the planet for expressions calculations. Also we can use our CI/CD on push and our e2e tests, to actually automatically update screenshots in README.md, also we should have USE-CASES.md with all typical use cases from .lino document to be rendered as screenshot, for our users to see and understand, also we should attach direct links for them to see each screenshot live.

@konard konard marked this pull request as draft January 27, 2026 10:14
@konard
Copy link
Contributor Author

konard commented Jan 27, 2026

🤖 AI Work Session Started

Starting automated work session at 2026-01-27T10:14:39.417Z

The PR has been converted to draft mode while work is in progress.

This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback.

- Add React unit tests for App.tsx (23 new tests)
- Create data/examples.lino with categorized calculator examples
- Add examples module to parse examples.lino and display 6 random examples
- Update E2E tests to use explicit calculation trigger (Enter key)
- Create USE-CASES.md with screenshots of various calculator features
- Add CI/CD workflow for auto-updating screenshots

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@konard konard marked this pull request as ready for review January 27, 2026 10:35
@konard
Copy link
Contributor Author

konard commented Jan 27, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $13.305156 USD
  • Calculated by Anthropic: $9.584932 USD
  • Difference: $-3.720224 (-27.96%)
    📎 Log file uploaded as Gist (10831KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Contributor Author

konard commented Jan 27, 2026

In all screenshots I see the same examples on bottom, not random.

Ensure all changes are correct, consistent and fully meet all discussed requirements.

@konard
Copy link
Contributor Author

konard commented Jan 27, 2026

🤖 AI Work Session Started

Starting automated work session at 2026-01-27T12:07:30.040Z

The PR has been converted to draft mode while work is in progress.

This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback.

@konard konard marked this pull request as draft January 27, 2026 12:07
The examples.lino file was using a YAML-like format that the links-notation
parser couldn't correctly parse for nested structures. This caused the
parsing to fail silently and fall back to DEFAULT_EXAMPLES, resulting in
all screenshots showing the same 6 examples.

Changes:
- Convert examples.lino to use proper S-expression format that
  links-notation parser handles correctly
- Update parseExamplesLino() to parse the flat S-expression format
- Now correctly loads 45 examples from 5 categories (arithmetic,
  currency, datetime, functions, integration)
- Random examples are now properly selected from the full pool

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@konard konard marked this pull request as ready for review January 27, 2026 12:15
@konard
Copy link
Contributor Author

konard commented Jan 27, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $6.501213 USD
  • Calculated by Anthropic: $4.222916 USD
  • Difference: $-2.278297 (-35.04%)
    📎 Log file uploaded as Gist (1244KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Contributor Author

konard commented Jan 27, 2026

🔄 Auto-restart 1/3

Detected uncommitted changes from previous run. Starting new session to review and commit them.

Uncommitted files:

?? node_modules/

Auto-restart will stop after changes are committed or after 2 more iterations. Please wait until working session will end and give your feedback.

Regenerate all USE-CASES screenshots to show random examples
from examples.lino instead of the fallback DEFAULT_EXAMPLES.

Each screenshot now displays a unique set of 6 random examples
from the full pool of 45 examples across 5 categories.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@konard
Copy link
Contributor Author

konard commented Jan 27, 2026

🔄 Auto-restart 1/3 Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $8.552688 USD
  • Calculated by Anthropic: $5.259059 USD
  • Difference: $-3.293629 (-38.51%)
    📎 Log file uploaded as Gist (3363KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Contributor Author

konard commented Jan 27, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $8.552688 USD
  • Calculated by Anthropic: $5.259059 USD
  • Difference: $-3.293629 (-38.51%)
    📎 Log file uploaded as Gist (3367KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Contributor Author

konard commented Jan 27, 2026

Make sure also to update main README.md to include links to new docs, and also make sure we have CI/CD to automatically update screenshots there as wall.

Ensure all changes are correct, consistent and fully meet all discussed requirements (check issue description and all comments in issue and in pull request).

@konard konard marked this pull request as draft January 27, 2026 12:42
@konard
Copy link
Contributor Author

konard commented Jan 27, 2026

🤖 AI Work Session Started

Starting automated work session at 2026-01-27T12:42:32.213Z

The PR has been converted to draft mode while work is in progress.

This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback.

- Regenerated all screenshots to show new Link.Calculator UI
- Screenshots now display different random examples (not static)
- Added datetime and parentheses screenshot tests
- Updated README.md with link to USE-CASES.md documentation
- Updated USE-CASES.md with DateTime and Parentheses sections
- Updated CI/CD workflow to copy screenshots to docs/screenshots/

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@konard konard marked this pull request as ready for review January 27, 2026 12:54
@konard
Copy link
Contributor Author

konard commented Jan 27, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $5.206931 USD
  • Calculated by Anthropic: $3.136426 USD
  • Difference: $-2.070504 (-39.76%)
    📎 Log file uploaded as Gist (1827KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard konard merged commit 111831e into main Jan 27, 2026
12 checks passed
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.

UI improvements

1 participant