Skip to content

feat(teacher-evaluation-dashboard): add the teacher evaluation analysis Mini App - #210

Open
salvadorfernandezm wants to merge 4 commits into
MiniMax-AI:mainfrom
salvadorfernandezm:add-teacher-evaluation-dashboard
Open

salvadorfernandezm wants to merge 4 commits into
MiniMax-AI:mainfrom
salvadorfernandezm:add-teacher-evaluation-dashboard

Conversation

@salvadorfernandezm

@salvadorfernandezm salvadorfernandezm commented Dec 4, 2026 •

Copy link
Copy Markdown

Adds Teacher Evaluation Dashboard, a Mini App that turns a teaching-evaluation workbook into an interactive analysis dashboard: the average and the difference against the historical average by teacher, term, programme and item, the participation rate, the students' written comments, and the anomalies the file itself contains. The Node service reads the workbook with a built-in XLSX reader, so the package has no runtime dependencies and nothing leaves the machine.

Teacher Evaluation Dashboard showing the filters, the headline figures and the ranking by teacher with synthetic data

Tested environment and results

  • Minimum client: MiniMax Code 3.1.2 — the package declares surface.window and nothing newer. It declares no permissions and no engines bound.
  • Tested on: MiniMax Code 3.1.22 on Windows 11 (x64).
  • Client acceptance in that session: initial render and structure, cross-filtering by term, programme, teacher, item and free text, the course detail dialog, heatmap navigation, the empty state, the light and dark themes, importing a workbook and restoring the bundled one, the template download, plus console and network checks (no console errors, every request 200).
  • Other periods — a workbook renamed to Promedio 2027A, with an extra column and a declared participation percentage, was imported and rendered: the page showed the 2027A labels, the extra column was listed as a data note, and the participation was counted per (course, teacher) group. A workbook renamed to Promedio actual was rendered with that label and no period; a misspelled romedio 2027A was rejected with a message that names the header and the right spelling.
  • Period field — a Período field next to the title renames the round for the whole page without touching the file; the value is kept in the browser's local storage and survives a reload, and an empty field falls back to the period of the workbook.
  • Data accuracy: the Node service was exercised directly against the bundled workbook and its output was compared record by record with an independent read of the same file.
  • npm run validate: plugins/salvadorfernandezm/teacher-evaluation-dashboard: OK — 0 errors, 0 warnings.

What I did not verify

  • macOS and Linux. The package was only run on Windows 11 x64.
  • Older clients. Only 3.1.22 was tested. The manifest declares no permissions and the code calls no 3.1.20+ API, so the package should load on clients before 3.1.20 as well, but that is not something I could verify here.
  • A real evaluation round. The bundled workbook is synthetic: it keeps the structure and the anomalies of a real evaluation file — a course whose response count exceeds the number of students summoned, courses without a historical baseline, a co-taught course — without carrying real names or comments. It was never run against a production workbook.
  • The repository's own test fixtures. npm test reports two failures on this machine, both in test/files.test.mjs: creating a symlink returns EPERM without Developer Mode or administrator rights on Windows. They fail the same way on an unmodified checkout and are unrelated to this package.

Remaining npm run check warnings

None for this package. npm run validate reports 0 errors and 0 warnings for plugins/salvadorfernandezm/teacher-evaluation-dashboard; the warnings it prints belong to other packages in the repository.

New access and minimum client version

  • New access: none. The package declares no permissions, calls no Host API, opens no network host, starts no child process, runs no Agent turn, reads no conversation, and calls no tool or Connector. The Node service binds only to the Host-assigned loopback port and serves the page plus its own routes.
  • Files written: context.dataDir only — an imported workbook is stored there as imported-source.xlsx, written atomically, and deleted by "Restore original data".
  • Minimum client version: 3.1.2, from surface.window. Not raised above what the package needs, and no engines bound is declared.
Written by MiniMax-M3.1-Flash

The package

plugins/salvadorfernandezm/teacher-evaluation-dashboard/

.minimax-plugin/plugin.json   package.json   icon.png   README.md   LICENSE
docs/preview.png
miniapp/miniapp.json
miniapp/client/{index.html,styles.css,app.js}
miniapp/node/{server.mjs,xlsx.mjs,dataset.mjs,miniapp-api.ts,data/estadistica.xlsx}

Plugin ID teacher-evaluation-dashboard — unique in the repository at the time of the pull request.

What the dashboard shows

  • Headline figures — the average for the current period, the difference against the historical average, the participation rate, and how many written comments the selection contains.
  • By teacher — a ranking whose bars carry the current average and a mark for the historical average; clicking a bar filters the whole page by that teacher.
  • By term and by programme — the same comparison across course terms and specialisms.
  • By item — the profile of the 17-item instrument, current average against historical.
  • Heatmap — every course against every item; selecting a cell opens the course detail with its 17 items, the difference against the historical value and its comments.
  • Comments — the students' free-text answers, verbatim.
  • Data notes — the anomalies the dashboard found in the file itself: courses without a historical baseline, courses whose response count differs from the number of students summoned, co-taught courses, and courses taught by more than one teacher.

Term, programme, teacher, item and a free-text search over teachers, courses and comments apply at once and recompute every section. The page has light and dark themes and keeps the filter and theme choices in local storage.

The workbook contract

The Node service reads the workbook at startup with a small built-in XLSX reader (ZIP plus inflateRaw plus an XML walk), so the package has no runtime dependencies. The instrument is fixed by contract and never inferred from the file; the shape of the file around it is not:

  • Sheet Estadística with one row per course and item, with the items numbered 1 to 17. Reactivo holds the number followed by the item text.
  • The columns ID programa, ID especialidad, ID profesor, Semestre, Reactivo, Histórico, Comentarios, Participaron and Convocados are required; common alternative spellings are accepted.
  • The column with the average of the period is found by shape: any header of the form Promedio <period> (Promedio 2026A, Promedio 2027A, …). The period is read from that header and shown throughout the page, so the same package analyses any round without being edited. A header that names no period — Promedio actual — is accepted too, so a template can be reused every semester without renaming anything; the page then speaks of "Promedio actual". A file with two period columns is rejected with a message naming both, and a header that looks like a misspelling is pointed out with the right spelling.
  • An optional column whose name refers to the participation percentage (for example Participación %) declares the participation of each teacher and is used in place of the calculated one.
  • Extra columns are ignored and listed as a data note, so an edited template imports without being reshaped.
  • Sheet Padrón (optional) with ID, Nombre, Materia, Programa, Especialidad, Semestre. When ID especialidad is empty in the evaluation sheet, the programme from Padrón is used.

A workbook that does not honour the contract is rejected with an explicit message that names what is missing, so a wrong file never silently produces a wrong dashboard. The page shows the period carried by the workbook, and a Período field next to the title renames it for the whole page — headline figure, legends, chart titles and course detail — without touching the file. The value is kept in the browser's local storage. The same contract validates an imported workbook, and Importar Excel reuses the same parser. Descargar plantilla returns the workbook in use as a download, so it can be edited in a spreadsheet and imported back.

How the numbers are computed

  • Average — the mean of the per-item averages, one per course and item, not weighted by the number of responses.
  • Difference against historical — computed only over the records that have a historical baseline, so both sides of the comparison describe the same records.
  • Participation — counted per group of (course, teacher), so a course that is taught by several teachers keeps the students of each one; the groups are then summed over the selection. A course whose responses exceed the number of students summoned is reported as a note rather than silently capped.

The bundled workbook

miniapp/node/data/estadistica.xlsx is synthetic: 23 courses, 24 teachers, 17 items with their own wording, 21 comments, and the same structural anomalies as a real evaluation file. It carries no real teacher name, student comment, absolute path or credential. The same conclusion was checked by scanning every text file in the package against the names and comments of the source workbook: no match.

Accessibility and interface

The interface is in Spanish, matching the workbook and the evaluation context the tool was written for. Charts are inline SVG with no CDN or third-party dependency; the page follows the host's light and dark theme and honours the system preference.

…is Mini App

Adds a Mini App that turns a teaching-evaluation workbook into an interactive
dashboard: the average and the difference against the historical average by
teacher, term, programme and item, the participation rate, the students'
written comments, and the anomalies the file itself contains.

The Node service reads the workbook with a built-in XLSX reader, so the package
has no runtime dependencies and nothing leaves the machine. It ships a synthetic
demo workbook; a workbook that does not match the fixed contract is rejected
with an explicit message instead of being reshaped.

Copy link
Copy Markdown
Collaborator

Thanks for the Teacher Evaluation Dashboard PR. I can't merge this version.

The built-in XLSX reader calls inflateRawSync(raw) in xlsx.mjs with no maxOutputLength. There is also no application-level cap on decompressed entry size, or on how large a worksheet can be materialized. The 25MB limit in server.mjs only applies to the upload body. It does not stop a small compressed file from expanding into a much larger buffer, or a tiny workbook with a far-away cell reference (for example A8000000) from building a dense grid and exhausting memory.

I reproduced this on the current head 008ed50142e1bef9571d08645544b4716f4f47a0. A ~98KB deflate ZIP expanded to 96MiB. A 947-byte workbook with cell A8000000, and a similarly small workbook with a 280-letter column reference, each drove the process to be killed around 250 to 280MB RSS, including through POST /api/import. In the import cases the process died before a response, and no file was left in dataDir, because the write happens only after buildDataset succeeds. The process still goes down. Passing { maxOutputLength: 1048576 } to inflateRawSync (not what the package does today) rejects the 96MiB expansion immediately.

Please add a hard cap on decompressed output, and also cap worksheet materialization (row, column, and total size) so a sparse sheet cannot allocate a huge dense array. The same limits need to apply to GET /api/dataset and /api/reset, which read a previously imported file and then take the same buildDataset path, with no byte limit on readFile.

Root npm run check going green does not cover this path. The package has no tests, and the repo tests do not exercise the parser or import limits.

…tion column

The import was tied to the exact header "Promedio 2026A" and rejected every
other column, so a workbook from another round could not be loaded and an
edited template could not be imported back.

- The column of the period is now found by shape (any "Promedio <period>"
  header) and the period it carries is shown throughout the page.
- Extra columns are ignored and listed as a data note instead of failing the
  import.
- An optional participation-percentage column is used in place of the
  calculated one, and the difference is reported when both exist.
- Participation is counted per group of (course, teacher), so a course that is
  taught by several teachers keeps the students of each one.
- "Descargar plantilla" returns the workbook in use, so it can be edited in a
  spreadsheet and imported back.
A template reused every semester has to be renamed on every round, and a
misspelled header ("romedio 2027A") was rejected with a message that did not
say which header was wrong.

- "Promedio actual" (or a bare "Promedio") is accepted as the column of the
  period; the page then speaks of "Promedio actual" and no period is named.
- A header that is almost "Promedio" is pointed out with the right spelling
  when the period column is missing.
- A specific "Promedio <period>" still wins when a generic one is also
  present, and "Promedio2027A" without a space is accepted too.
A workbook reused every semester names no period, so the page could not say
which round it was showing. A "Período" field next to the title renames it
for the headline figure, the legends, the chart titles and the course detail,
without touching the file. The value is kept in the browser's local storage
and an empty field falls back to the period of the workbook.
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