Repository navigation
mitmweb: support float options in the Options editor - #8447
Merged
lups2000 merged 1 commit intoOct 1, 2026
Merged
Conversation
2 tasks done
lups2000
approved these changes
Sep 27, 2026
lups2000
left a comment
Member
There was a problem hiding this comment.
Thanks for taking care of this! LGTM 🚀
Member
|
Can you rerun the jobs with the latest change in #8458 ? |
Addon options with typespec float are sent to mitmweb as type "float" but the Options modal had no handler for it and threw "unknown option type float". Add a number input with step="any" that parses with parseFloat, matching the int input. Fixes mitmproxy#3144
cursor
Bot
force-pushed
the
cursor/mitmweb-float-options-29bf
branch
from
October 1, 2026 06:25
977d2c2 to
fe2c328
Compare
lups2000
pushed a commit
to lups2000/mitmproxy
that referenced
this pull request
Oct 31, 2026
Addon options with typespec float are sent to mitmweb as type "float" but the Options modal had no handler for it and threw "unknown option type float". Add a number input with step="any" that parses with parseFloat, matching the int input. Fixes mitmproxy#3144 Co-authored-by: Julio César Suástegui <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
mitmweb's Options modal throws
unknown option type floatfor addon options whosetypespecisfloat.optmanager.dump_dictsalready serializes that typespec as"float"viatypespec_to_str, but the web client had no handler for it.This adds a float number input (
step="any",parseFloat), matching the existing int input. Invalid input parses toNaN, the same asparseInton the int input.OptionMeta.typeis already astringand the modal renders throughOptions[type], so no other UI or type changes are needed.The change is web-only. The console-side float handling discussed in #4926 / #4927 is untouched.
Fixes #3144
Checklist
Testing
cd web && npm test(eslint,tsc --noEmit, Jest): 82 suites, 340 tests passing.AI-assisted; reviewed and tested by me.