René's URL Explorer Experiment


Title: SettingsActivity: render ui_options label instead of raw pref value by bitcoin3us · Pull Request #137 · MicroPythonOS/MicroPythonOS · GitHub

Open Graph Title: SettingsActivity: render ui_options label instead of raw pref value by bitcoin3us · Pull Request #137 · MicroPythonOS/MicroPythonOS

X Title: SettingsActivity: render ui_options label instead of raw pref value by bitcoin3us · Pull Request #137 · MicroPythonOS/MicroPythonOS

Description: Summary Settings rows with ui: "radiobuttons" (or "dropdown") render the raw stored pref value in the secondary text beneath the title. So a row with: {"title": "Hero Image", "key": "hero_image", "ui": "radiobuttons", "ui_options": [("Lightning Piggy", "lightningpiggy"), ("Lightning Penguin", "lightningpenguin"), ("None", "none")]} …displays "lightningpiggy" (internal value, no space) in the row, even though the picker activity itself correctly shows "Lightning Piggy" on the radio button. The label-to-value mapping only ever existed inside the picker; the list-view row had no access to it. Same gap on the post-save path — when the user picks an option, the framework writes new_value directly to the value_label, so even a freshly-saved row reverts to "lightningpiggy". Fix Adds a small helper in settings_activity.py: def _value_label_for(setting, stored_value): ui_options = setting.get("ui_options") if ui_options: for label, value in ui_options: if value == stored_value: return label return stored_value Routed through in two places: settings_activity.py list-view render — instead of value_text = stored_value, use value_text = _value_label_for(setting, stored_value). Default-value branch also routed through. setting_activity.py post-save — instead of value_label.set_text(new_value), look up the label from ui_options first. Case Before After ui_options matches stored value "lightningpiggy" "Lightning Piggy" No ui_options (textarea, etc.) raw value raw value (unchanged) Stored value not in current ui_options (stale pref) raw value raw value (visible, recoverable, not collapsed to "(not set)") default_value rendered with "(defaults to X)" raw default_value mapped label Tests tests/test_settings_activity_label_mapping.py — 6 unit tests in one class on the new helper: Matched value returns label Unmatched value passes through (recoverable display for stale prefs) No ui_options passes through (textarea / freeform settings unaffected) Empty ui_options list passes through None value passes through (defensive — caller handles "(not set)" elsewhere) First-match-wins precedence with duplicate values (documents behavior) $ bash tests/unittest.sh tests/test_settings_activity_label_mapping.py Ran 6 tests OK Motivating case in the wild LightningPiggyApp PR #26 (multi-wallet) adds a per-slot Hero Image setting with values "lightningpiggy" / "lightningpenguin" / "none". Without this framework fix, the Customise menu showed those raw values with no space ("lightningpiggy" instead of "Lightning Piggy"). I shipped a local closure-callback workaround there as a stopgap; once this PR lands, that workaround can come out and the row will be consistent on both initial display and post-save. Hardware verification (this commit unchanged — verification done on existing tree) Captured on a live device running multi-wallet LP with the unpatched (frozen) framework, then with the patched framework injected via exec(src, mpos.ui.settings_activity.__dict__) at the REPL. Before — lightningpiggy raw value visible in the Hero Image row of Customise → exactly the bug this PR fixes: ┌──────────────────────────────────────┐ │ Balance Denomination │ │ ₿ symbol │ ├──────────────────────────────────────┤ │ Hero Image │ │ lightningpiggy ← raw │ ├──────────────────────────────────────┤ │ Theme │ │ Dark │ └──────────────────────────────────────┘ After (label re-rendered with _value_label_for applied to the live widget): ┌──────────────────────────────────────┐ │ Balance Denomination │ │ ₿ symbol │ ├──────────────────────────────────────┤ │ Hero Image │ │ Lightning Piggy ← mapped │ ├──────────────────────────────────────┤ │ Theme │ │ Dark │ └──────────────────────────────────────┘ PNG screenshots: /tmp/lp_customise_before_137.png and /tmp/lp_customise_after_137_simulated.png on the development host — see follow-up comment for the verification log. Test plan All 6 unit tests pass on desktop No regression in existing settings rows that have no ui_options (textarea / freeform) — verified by the "passes through" tests Visual smoke-test on device: Lightning Piggy's Customise → Hero Image row currently shows raw "lightningpiggy" with the frozen framework, switches to "Lightning Piggy" after the patched _value_label_for is applied to the same widget (see screenshots in the verification comment below) Confirm-once-released: the simulated-after screenshot exercises the same code path that the framework patch will run (label.set_text(_value_label_for(...))); a single end-to-end "open Customise on a fresh boot of firmware that includes this PR" check will tick once #137 is in a release build 🤖 Generated with Claude Code

Open Graph Description: Summary Settings rows with ui: "radiobuttons" (or "dropdown") render the raw stored pref value in the secondary text beneath the title. So a row with: {"title": "...

X Description: Summary Settings rows with ui: "radiobuttons" (or "dropdown") render the raw stored pref value in the secondary text beneath the title. So a row with: {&quot...

Opengraph URL: https://github.com/MicroPythonOS/MicroPythonOS/pull/137

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:ef03453d-7854-21f3-18e2-f2f3ebcafc0a
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD7B8:25305:B376D9:10160DF:6A4E4795
html-safe-nonce36000e43489a0cf453d88f1a8f7aebe74efd7420e23542a8f2be5001cc3f3026
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEN0I4OjI1MzA1OkIzNzZEOToxMDE2MERGOjZBNEU0Nzk1IiwidmlzaXRvcl9pZCI6IjIyOTkzNDQ2ODY4MjM2NTUzMTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac55acb69d8b9ae5011b3fa9fc3d9627bddc41a18678975445f51b7a8425e37780
hovercard-subject-tagpull_request:3677237317
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/MicroPythonOS/MicroPythonOS/pull/137/files
twitter:imagehttps://avatars.githubusercontent.com/u/115934595?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/115934595?s=400&v=4
og:image:altSummary Settings rows with ui: "radiobuttons" (or "dropdown") render the raw stored pref value in the secondary text beneath the title. So a row with: {"title": "...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/MicroPythonOS/MicroPythonOS git https://github.com/MicroPythonOS/MicroPythonOS.git
octolytics-dimension-user_id213598128
octolytics-dimension-user_loginMicroPythonOS
octolytics-dimension-repository_id975472483
octolytics-dimension-repository_nwoMicroPythonOS/MicroPythonOS
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id975472483
octolytics-dimension-repository_network_root_nwoMicroPythonOS/MicroPythonOS
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasee8506f6d0538364886e3f0153c154c410965e70d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/MicroPythonOS/MicroPythonOS/pull/137/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FMicroPythonOS%2FMicroPythonOS%2Fpull%2F137%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FMicroPythonOS%2FMicroPythonOS%2Fpull%2F137%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=MicroPythonOS%2FMicroPythonOS
Reloadhttps://github.com/MicroPythonOS/MicroPythonOS/pull/137/files
Reloadhttps://github.com/MicroPythonOS/MicroPythonOS/pull/137/files
Reloadhttps://github.com/MicroPythonOS/MicroPythonOS/pull/137/files
Please reload this pagehttps://github.com/MicroPythonOS/MicroPythonOS/pull/137/files
MicroPythonOS https://github.com/MicroPythonOS
MicroPythonOShttps://github.com/MicroPythonOS/MicroPythonOS
Notifications https://github.com/login?return_to=%2FMicroPythonOS%2FMicroPythonOS
Fork 82 https://github.com/login?return_to=%2FMicroPythonOS%2FMicroPythonOS
Star 737 https://github.com/login?return_to=%2FMicroPythonOS%2FMicroPythonOS
Code https://github.com/MicroPythonOS/MicroPythonOS
Issues 23 https://github.com/MicroPythonOS/MicroPythonOS/issues
Pull requests 6 https://github.com/MicroPythonOS/MicroPythonOS/pulls
Discussions https://github.com/MicroPythonOS/MicroPythonOS/discussions
Actions https://github.com/MicroPythonOS/MicroPythonOS/actions
Projects https://github.com/MicroPythonOS/MicroPythonOS/projects
Security and quality 0 https://github.com/MicroPythonOS/MicroPythonOS/security
Insights https://github.com/MicroPythonOS/MicroPythonOS/pulse
Code https://github.com/MicroPythonOS/MicroPythonOS
Issues https://github.com/MicroPythonOS/MicroPythonOS/issues
Pull requests https://github.com/MicroPythonOS/MicroPythonOS/pulls
Discussions https://github.com/MicroPythonOS/MicroPythonOS/discussions
Actions https://github.com/MicroPythonOS/MicroPythonOS/actions
Projects https://github.com/MicroPythonOS/MicroPythonOS/projects
Security and quality https://github.com/MicroPythonOS/MicroPythonOS/security
Insights https://github.com/MicroPythonOS/MicroPythonOS/pulse
Sign up for GitHub https://github.com/signup?return_to=%2FMicroPythonOS%2FMicroPythonOS%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FMicroPythonOS%2FMicroPythonOS%2Fissues%2Fnew%2Fchoose
ThomasFarstrikehttps://github.com/ThomasFarstrike
MicroPythonOS:mainhttps://github.com/MicroPythonOS/MicroPythonOS/tree/main
bitcoin3us:feature/settings-ui-options-labelshttps://github.com/bitcoin3us/MicroPythonOS/tree/feature/settings-ui-options-labels
Conversation 3 https://github.com/MicroPythonOS/MicroPythonOS/pull/137
Commits 1 https://github.com/MicroPythonOS/MicroPythonOS/pull/137/commits
Checks 5 https://github.com/MicroPythonOS/MicroPythonOS/pull/137/checks
Files changed https://github.com/MicroPythonOS/MicroPythonOS/pull/137/files
Please reload this pagehttps://github.com/MicroPythonOS/MicroPythonOS/pull/137/files
SettingsActivity: render ui_options label instead of raw pref value https://github.com/MicroPythonOS/MicroPythonOS/pull/137/files#top
Show all changes 1 commit https://github.com/MicroPythonOS/MicroPythonOS/pull/137/files
422b1c1 SettingsActivity: render ui_options label instead of raw pref value May 13, 2026 https://github.com/MicroPythonOS/MicroPythonOS/pull/137/commits/422b1c1c1cf74188e7c680bbf843001275876875
Clear filters https://github.com/MicroPythonOS/MicroPythonOS/pull/137/files
Please reload this pagehttps://github.com/MicroPythonOS/MicroPythonOS/pull/137/files
Please reload this pagehttps://github.com/MicroPythonOS/MicroPythonOS/pull/137/files
CHANGELOG.md https://github.com/MicroPythonOS/MicroPythonOS/pull/137/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
setting_activity.py https://github.com/MicroPythonOS/MicroPythonOS/pull/137/files#diff-5c5a8c5e2cdbf86fd8d092f7c21b360b8dcb1206945d84dc51c8b3dc930dafbc
settings_activity.py https://github.com/MicroPythonOS/MicroPythonOS/pull/137/files#diff-5789d72976fefadc630f1438237fe8186a4dd8801ff7e1b317d9b6218d3247bd
test_settings_activity_label_mapping.py https://github.com/MicroPythonOS/MicroPythonOS/pull/137/files#diff-a8d4cdcb880d39138aadb97ed9fbbdf81b15ea2fbbdcb28b8f8cbf19ab9bc83b
CHANGELOG.mdhttps://github.com/MicroPythonOS/MicroPythonOS/pull/137/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
View file https://github.com/bitcoin3us/MicroPythonOS/blob/422b1c1c1cf74188e7c680bbf843001275876875/CHANGELOG.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/MicroPythonOS/MicroPythonOS/pull/137/{{ revealButtonHref }}
https://github.com/MicroPythonOS/MicroPythonOS/pull/137/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
https://github.com/MicroPythonOS/MicroPythonOS/pull/137/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
internal_filesystem/lib/mpos/ui/setting_activity.pyhttps://github.com/MicroPythonOS/MicroPythonOS/pull/137/files#diff-5c5a8c5e2cdbf86fd8d092f7c21b360b8dcb1206945d84dc51c8b3dc930dafbc
View file https://github.com/bitcoin3us/MicroPythonOS/blob/422b1c1c1cf74188e7c680bbf843001275876875/internal_filesystem/lib/mpos/ui/setting_activity.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/MicroPythonOS/MicroPythonOS/pull/137/{{ revealButtonHref }}
https://github.com/MicroPythonOS/MicroPythonOS/pull/137/files#diff-5c5a8c5e2cdbf86fd8d092f7c21b360b8dcb1206945d84dc51c8b3dc930dafbc
https://github.com/MicroPythonOS/MicroPythonOS/pull/137/files#diff-5c5a8c5e2cdbf86fd8d092f7c21b360b8dcb1206945d84dc51c8b3dc930dafbc
internal_filesystem/lib/mpos/ui/settings_activity.pyhttps://github.com/MicroPythonOS/MicroPythonOS/pull/137/files#diff-5789d72976fefadc630f1438237fe8186a4dd8801ff7e1b317d9b6218d3247bd
View file https://github.com/bitcoin3us/MicroPythonOS/blob/422b1c1c1cf74188e7c680bbf843001275876875/internal_filesystem/lib/mpos/ui/settings_activity.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/MicroPythonOS/MicroPythonOS/pull/137/{{ revealButtonHref }}
https://github.com/MicroPythonOS/MicroPythonOS/pull/137/files#diff-5789d72976fefadc630f1438237fe8186a4dd8801ff7e1b317d9b6218d3247bd
https://github.com/MicroPythonOS/MicroPythonOS/pull/137/files#diff-5789d72976fefadc630f1438237fe8186a4dd8801ff7e1b317d9b6218d3247bd
https://github.com/MicroPythonOS/MicroPythonOS/pull/137/files#diff-5789d72976fefadc630f1438237fe8186a4dd8801ff7e1b317d9b6218d3247bd
https://github.com/MicroPythonOS/MicroPythonOS/pull/137/files#diff-5789d72976fefadc630f1438237fe8186a4dd8801ff7e1b317d9b6218d3247bd
tests/test_settings_activity_label_mapping.pyhttps://github.com/MicroPythonOS/MicroPythonOS/pull/137/files#diff-a8d4cdcb880d39138aadb97ed9fbbdf81b15ea2fbbdcb28b8f8cbf19ab9bc83b
View file https://github.com/bitcoin3us/MicroPythonOS/blob/422b1c1c1cf74188e7c680bbf843001275876875/tests/test_settings_activity_label_mapping.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/MicroPythonOS/MicroPythonOS/pull/137/{{ revealButtonHref }}
Please reload this pagehttps://github.com/MicroPythonOS/MicroPythonOS/pull/137/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.