[Refactor] use Seed instead of seed_num - #810
Merged
newtonick merged 2 commits intoJul 22, 2026
Merged
Conversation
Chaitanya-Keyal
force-pushed
the
refactor/seed_num-to-seed
branch
from
October 23, 2025 17:51
a1357c3 to
7d20f80
Compare
7 tasks
Chaitanya-Keyal
force-pushed
the
refactor/seed_num-to-seed
branch
2 times, most recently
from
December 16, 2025 04:10
52b74ca to
78982eb
Compare
Chaitanya-Keyal
force-pushed
the
refactor/seed_num-to-seed
branch
from
January 20, 2026 09:37
78982eb to
63327a0
Compare
Chaitanya-Keyal
force-pushed
the
refactor/seed_num-to-seed
branch
from
February 16, 2026 20:52
63327a0 to
8c61c66
Compare
Chaitanya-Keyal
force-pushed
the
refactor/seed_num-to-seed
branch
from
July 21, 2026 11:53
8c61c66 to
65e312c
Compare
newtonick
reviewed
Jul 22, 2026
Collaborator
|
concept ACK. Spent some time reviewing. Only found the one issue above. |
Co-authored-by: Nick Klockenga <127377+newtonick@users.noreply.github.com>
Collaborator
|
@Chaitanya-Keyal when/if I merge this it's going to create a bunch of different merge conflicts for different PRs. One of them being #785. Might not be trivial to resolve but I think merging this one first is the right move. Do you agree? |
Contributor
Author
|
Yeah, that makes sense. This PR touches basically every view, so any PR working on a view would mostly get a conflict. It wouldn't be trivial to resolve but still should be straightforward. Additionally, any PR with new views should then be updated to follow this new pattern. And yes, once this is merged I will rebase #785, it'll allow me to cleanup a bunch of the code in that PR as well. |
kdmukAI-bot
added a commit
to kdmukAI-bot/seedsigner
that referenced
this pull request
Jul 25, 2026
Reconcile the LVGL native views + controller with upstream/dev's seed_num->Seed refactor (SeedSigner#810) after moving the stack base from 0.8.7-78 onto upstream/dev @ 1fb2956: - controller.discard_seed: stringize the Seed annotation (the module drops the runtime Seed import at the defer-imports layer, so a bare annotation NameErrors) - SeedTranscribeSeedQRFormatView: drop a dangling seed_screens import the native migration had already replaced with a string-id screen call - ToolsAddressExplorerAddressTypeView: self.seed_num -> self.seed (__init__ now takes the Seed object; seed_num was never set) - test_flows_seed: capture the Seed returned by finalize_pending_seed() Co-Authored-By: kdmukai <934746+kdmukai@users.noreply.github.com>
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
This PR refactors the seed views to pass the selected
Seedobject directly to the next view instead of usingseed_num.Previously, almost every view would immediately dereference
seed_numto fetch theSeedobject fromSeedStorage, resulting in redundant lookups. Passing theSeedobject itself removes that redundancy and provides a more robust reference to the selected seed, avoiding potential fragility in the future.The motivation for this change came up while I was working on #785. In that context, it became clear that relying on
seed_numis brittle, since it’s only the index of a mutable list. See my comment for details.Benefits:
This pull request is categorized as a:
Checklist
pytestand made sure all unit tests pass before submitting the PRIf you modified or added functionality/workflow, did you add new unit tests?
I have tested this PR on the following platforms/os: