Go to file
Ali 8c178524d9 ƏMAS step: surface failure reason on intro, clearer 'cached' state
Symptom: after the second phone tap the wizard appeared to drop the
user back to the ƏMAS intro screen with no indication of what
happened — they couldn't tell if employees had been cached, the
import had run, or anything had failed.

Root cause was a UX bug in the JS layer: every error path in the
ƏMAS sub-flow (connect_amas, change_amas_account, get_employees_
report, cache_selected_employees) did

    this.$wrap.find(".jey-status").text(error_message);
    this.amas_state = "intro";
    this.show_current_step();

but show_current_step() unconditionally calls .jey-status.empty()
at the top of the render, so the message was wiped before the user
could read it. They saw a clean intro screen and assumed nothing
ran or that it silently succeeded.

Fix:

- New persistent fields data.amas_last_error / data.asan_last_error
  that survive show_current_step re-renders. Every ƏMAS error path
  now writes to data.amas_last_error before flipping state.
- intro renderer reads data.amas_last_error and shows a red
  "Previous attempt failed: <message>" banner above the usual
  copy when set. amas_start_auth clears it on retry.
- Added .error callbacks to the four frappe.call sites that didn't
  have one — network errors used to drop the user to intro with no
  message at all.

Also rewrote the success "done" screen so it can't be misread:
heading is now "Cached and ready", body explicitly says "Cached on
the server. Actual import into Employee / ƏMAS Employees runs as a
background job right after you click Finish — you can keep working
in /app while it runs." Same data, just unmistakable.
2026-05-01 16:22:20 +00:00
jey_wizard ƏMAS step: surface failure reason on intro, clearer 'cached' state 2026-05-01 16:22:20 +00:00
.editorconfig feat: Initialize App 2026-04-22 10:00:16 +00:00
.eslintrc feat: Initialize App 2026-04-22 10:00:16 +00:00
.gitignore feat: Initialize App 2026-04-22 10:00:16 +00:00
.pre-commit-config.yaml feat: Initialize App 2026-04-22 10:00:16 +00:00
CLAUDE.md Add FIFO/Moving Average picker; add CLAUDE.md 2026-04-24 13:01:18 +00:00
README.md feat: Initialize App 2026-04-22 10:00:16 +00:00
license.txt feat: Initialize App 2026-04-22 10:00:16 +00:00
pyproject.toml feat: Initialize App 2026-04-22 10:00:16 +00:00

README.md

Jey Wizard

Jey Wizard

Installation

You can install this app using the bench CLI:

cd $PATH_TO_YOUR_BENCH
bench get-app $URL_OF_THIS_REPO --branch main
bench install-app jey_wizard

Contributing

This app uses pre-commit for code formatting and linting. Please install pre-commit and enable it for this repository:

cd apps/jey_wizard
pre-commit install

Pre-commit is configured to use the following tools for checking and formatting your code:

  • ruff
  • eslint
  • prettier
  • pyupgrade

License

unlicense