WebOS 2 Devlog #18: Debugging session
I swear random bugs keep popping up no matter how much debugging I do. There’s always something that’s wrong or doesn’t work but that’s just how it is. In this session which was longer than expected, i fixed a lot of different bugs. Here is a summary of the changes i did:
-
I spent lots of time rewriting the mathematics for the desktop icon layout, and also changed the strict grid-snapping to free-form placement cus it felt it was quite annoying not to be able to place stuff on the desktop wherever you want. Unfortunately, it took too long and i abandoned the idea and just moved on without making any changes.
-
I also spent some time cleaning up the code and tried to optimizing the code.
Some other bugs I fixed include:
-
Desktop icons were randomly rearranging themselves every time a file was saved. I found out that the reason was that since the localStorage returns keys randomly, everytime i wrote sth to localStorage, the items were randomized so the ordier they appeared on the desktop changed. So i rewrote the logic to sort the stuff alphabetically before displaying.
-
The Notepad app was also blindly overwriting existing files with the same name. I fixed it by adding a localStorage query to intercept matching keys and to display an osConfirm dialog, forcing the user to explicitly authorize the overwrite.
-
The internal browser was throwing captchas all the time and failed to load error screens for blocked domains. Since Google aggressively blocks embeds and flags them as bot traffic, i changed the default browser to Bing, which was much better and i didn’t get captchas everytime i search somehting up
-
I also modified the system daemon engine so that it introduces itself when a user first view the OS.
-
The weather widget was pulling the location not from where the user was but rather where my ISP was routing my traffic through. So if i lived in a village and ISP routes my traffic through like New York, the weather that showed up was that of New York. To fix this, i swapped the logic to request exact hardware GPS coordinates via navigator.geolocation, while falling back to the IP routing API if the user denies the browser prompt. If the location is inaccurate the user can enable the location permission in the browser and the weather widget then shows the correct location.
-
The visualizer widget was working perfectly but i had the idea to add a text container above the bars which shows what the user is playing.
I made way way more changes but many of them conform to the easter eggs and mainly about the theme that gets unlocked (small spoiler there ;)) so i won’t really get too much into it.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.