Skip to content

fix: remove debug logs and dead modal controls - #260

Merged
antiv merged 2 commits into
antiv:mainfrom
sourabh65mehta:fix/243-cleanup-debug-logs
Oct 17, 2026
Merged

antiv merged 2 commits into
antiv:mainfrom
sourabh65mehta:fix/243-cleanup-debug-logs

Conversation

@sourabh65mehta

Copy link
Copy Markdown
Contributor

Summary

Remove debug console.log statements from agent forms and tools.

Remove nonfunctional minimize/restore buttons and drag handle from the memory block modal.

Testing

Ran git diff --check successfully.

Manually reviewed the changes.

Closes #243

@antiv

antiv commented Oct 15, 2026

Copy link
Copy Markdown
Owner

Thanks, this does what #243 asks: all six console.log calls are gone from agent-forms.js and agent-tools.js (the warn/error ones stay), and the minimize/restore buttons and the drag handle are out of the Edit Memory Block dialog, with nothing in static/js referring to them.

Two things before merging:

  1. Most of the diff is trailing-whitespace removal: only 15 of the ~180 changed lines are real changes (git diff -w shows them). Please revert the whitespace-only changes so the PR touches just the lines it means to. It keeps the review and git blame readable, and Clean-up: leftover console.log and dead buttons in the memory block modal #243 asked not to change anything else.
  2. The removed lines were replaced with blank lines instead of being deleted, which leaves stray empty lines (two in a row in setupToolListeners, two in the modal header). Please delete them outright.

Optional: the <!-- Modal Header with Window Controls --> comment no longer fits; <!-- Modal Header --> would.

@antiv antiv mentioned this pull request Oct 16, 2026
45 of 47 tasks

@antiv antiv left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIce. Approved

@antiv
antiv merged commit c63bcdd into antiv:main Oct 17, 2026
2 checks passed
antiv added a commit that referenced this pull request Oct 17, 2026
* RBAC: refuse when the check can't decide

rbac_before_model_callback let a model call through, with a warning, when
the context had no user id or no agent name, or when no enabled
agents_config row was found for the agent. get_root_agent_by_name returns
None on a query error too, so a database error also became an allow. All
three now refuse, as the exception path already did, and the
mate.rbac_check span records allowed=false for them. The LangGraph hook
refuses an agent without a config the same way.

Eval and Playground runs (is_eval_run) and the system agents in
_should_skip_rbac_check still skip the check; agents built in code get no
MATE callbacks.

Also the CHANGELOG entry for #260.

* RBAC: the callback chain refuses when the check fails to run; docs on plugin mode

From the security review of the previous commit:
- combined_user_profile_and_rbac_callback caught an exception from the RBAC
  check, logged a warning and went on to the model. It now refuses.
- With MATE_PLUGINS_ENABLED=true the check runs for every LLM agent in the
  app, so an agent built in code without an agents_config row is now
  refused. The guide and CHANGELOG say so instead of claiming code-built
  agents never reach the check, and the LangGraph line says what its hook
  actually adds.
- Tests: system agents and eval runs still pass without a config row, and
  the chain refuses when the check raises.

---------

Co-authored-by: Claude <[email protected]>
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.

Clean-up: leftover console.log and dead buttons in the memory block modal

2 participants