feat: add feat 378- MAIDR as react interface, grafana plugin - #501
feat: add feat 378- MAIDR as react interface, grafana plugin#501aarthy2000 wants to merge 2 commits into
Conversation
Pull Request Review - PR #501OverviewThis PR adds significant new functionality:
Overall Assessment: This is a substantial PR with 19,231 additions that successfully implements the requested features. However, there are several important concerns that should be addressed before merging. ✅ Strengths1. Clean Public API Exposure (src/index.ts)
2. Grafana Plugin Architecture
3. Enhanced CI/CD
|
| Category | Rating | Notes |
|---|---|---|
| Code Quality | 6/10 | Good structure, but debug logs and architectural concerns |
| Test Coverage | 3/10 | Tests don't match implementation |
| Documentation | 4/10 | Missing usage examples and API docs |
| Security | 9/10 | No significant concerns |
| Architecture | 7/10 | Some violations of stated principles |
| Overall | 6/10 | Good foundation, needs work before merge |
✅ Approval Status: Changes Requested
This PR implements valuable functionality but requires the following before approval:
- Complete PR checklist
- Fix/rewrite E2E tests
- Remove debug code
- Add basic documentation
- Address the
file:..dependency issue
Great work on the implementation! The core functionality looks solid. With the above changes, this will be ready to merge.
cc: @aarthy2000
Three review points on the report step.
The title guard used includes(), which matches the prefix anywhere in the
title, not at the start. An earlier commit message here claimed that guard
made collision with a human-filed issue "impossible rather than
discouraged". That was wrong: a maintainer issue titled "Investigate: test:
Some e2e tests failed intermittently on Safari" carries the prefix mid-title
and would have been closed with "the suite is green again". startsWith()
anchors it, and the bot's own titles always begin with the prefix, so
nothing this step files stops matching.
The rolling-issue lookup did not exclude pull requests, though the retire
loop below it already did for the same reason. listForRepo returns pull
requests, and one carrying the label and a matching title would have been
adopted as the rolling report and had its title and body overwritten.
The retire loop commented before closing. When the close failed, the comment
was already posted; the issue stayed open, matched again next run, and
collected another "green again" note every cycle. Closing first leaves a
failed close with no trace, so the retry is clean.
Each case verified to fail against the defect it describes:
startsWith -> includes closes the human's #501
PR guard removed adopts PR #999 as the rolling report
comment before close comments on #684 after its close threw
jest 1312 passed across 103 suites; eslint, tsc and actionlint all exit 0.
Pull Request
Description
This pull request adds the feature requested in #378 and provides a plugin to visualize accessible bar charts in grafana (protoype)
Related Issues
#378
Changes Made
The init maidr mechanism is exposed so other applications can use it.
For grafana, it accepts the input from grafana in various format (csv content, raw rows tested for now) and generates the maidr payload, svg.
TODO: Creation of svg should utilize the existing mechanism of py binder.
Notes
Currently, the CSV can be provided as text/ file in Grafana plugin, Bar chart SVG is built by this component: https://github.com/xability/maidr/blob/feat/feat_387/xability-maidr-panel/src/components/MaidrBarChart.tsx
This is not scalable and uniform, we need to use the python maidr package here.
Approach 1: Get the CSV from the plugin -> use py-maidr to construct the SVG -> visualize in Grafana
Method 2 here https://codeop.tech/how-to-run-python-code-in-javascript-a-beginners-guide/ sounds like a possible solution
Screenshots (if applicable)
Checklist
ManualTestingProcess.md, and all tests related to this pull request pass.Additional Notes