Repository navigation
Commit f3fa813
committed
refactor(core): fold three copies of the view-state queue call into one helper
No behaviour change. clearPersistedViewState, rebindUnboundViewStateEntry and
rekeyPersistedViewStateEntry each wrote out the same enqueue call - provider: this, generation:
this.viewStateGeneration, run - over five lines. One private helper now makes that identical call,
reading the generation at the same point, and the three call sites are one line each. No log string,
guard, ordering or assertion moved; nothing about which write is serialized behind which changed.
It is also the only honest room in the file: measured with scripts/stryker-diff.mjs's own accounting
against e943530, extension goes from 500 changed executable lines to 494 (ClineProvider.ts 455 ->
449) against the 500 cap. The formatting cost is real - prettier keeps the entry object multi-line, so
the helper is 6 executable lines and the fold nets -6, not the -12 the raw line count suggests.
Lanes: tsc exit 0, eslint --max-warnings=0 exit 0, prettier reports the file unchanged, and
core/webview + core/config + extension/__tests__ pass 517 tests.1 parent e7a09f0 commit f3fa813
1 file changed
Lines changed: 16 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
927 | 927 | | |
928 | 928 | | |
929 | 929 | | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
930 | 943 | | |
931 | 944 | | |
932 | 945 | | |
933 | 946 | | |
934 | 947 | | |
935 | 948 | | |
936 | 949 | | |
937 | | - | |
938 | | - | |
939 | | - | |
940 | | - | |
941 | | - | |
| 950 | + | |
942 | 951 | | |
943 | 952 | | |
944 | 953 | | |
| |||
957 | 966 | | |
958 | 967 | | |
959 | 968 | | |
960 | | - | |
961 | | - | |
962 | | - | |
963 | | - | |
964 | | - | |
| 969 | + | |
965 | 970 | | |
966 | 971 | | |
967 | 972 | | |
| |||
1110 | 1115 | | |
1111 | 1116 | | |
1112 | 1117 | | |
1113 | | - | |
1114 | | - | |
1115 | | - | |
1116 | | - | |
1117 | | - | |
| 1118 | + | |
1118 | 1119 | | |
1119 | 1120 | | |
1120 | 1121 | | |
| |||
0 commit comments