Skip to content

Conversation

@RKBoss6
Copy link
Contributor

@RKBoss6 RKBoss6 commented Aug 26, 2025

There is some confusion when updating/adding/removing apps, as sometimes the app ID can be something wildly different than the name. eg: (gallifr --> Time Traveller's Clock).
I thought it would be good if you can see both the App name that you are familiar with, and the id that appears in storage...

Toasts now will show something like:

Time Traveller's Clock (gallifr) uploaded

I also consolidated that into a reusable function that returns the string above, but if the app id and the name are the same, eg: (BackLite, backlite), just return the name.

@RKBoss6
Copy link
Contributor Author

RKBoss6 commented Aug 26, 2025

Btw, how would I test this? Just made code changes, but am not sure how to test this out... I tried changing the path in my fork of BangleApps in .gitmodules to my fork of AppLoaderCore, do I need to do something else as well?

@gfwilliams
Copy link
Member

Thanks! This looks good - it really needs testing though :)

But yes, I'd have thought that changing the path in .gitmodules should do it? Or you can try and download it and run it locally as well.

@RKBoss6
Copy link
Contributor Author

RKBoss6 commented Aug 27, 2025

@gfwilliams I tried changing the path again, could you just pop in and check if I have done it right? https://github.com/RKBoss6/BangleApps/blob/AppLoaderUpdateTest/.gitmodules

Maybe I forgot something...

@gfwilliams
Copy link
Member

@gfwilliams I tried changing the path again, could you just pop in and check if I have done it right? https://github.com/RKBoss6/BangleApps/blob/AppLoaderUpdateTest/.gitmodules

It looks ok to me!

https://rkboss6.github.io/BangleApps/core/js/index.js isn't the right one, but then it seems like if you're serving off master, that's not got the change in? https://github.com/RKBoss6/BangleApps/blob/master/.gitmodules

Otherwsie I'm not sure what to suggest I'm afraid

@RKBoss6
Copy link
Contributor Author

RKBoss6 commented Aug 27, 2025

https://rkboss6.github.io/BangleApps/core/js/index.js isn't the right one,

@gfwilliams What do you mean? Master doesn't have the changes, instead I put it on a separate branch. Should I try moving it to master?Otherwise is it possible for you to test this out, if you have a fork as well?

@gfwilliams
Copy link
Member

Well, I assume you're serving https://rkboss6.github.io/BangleApps off of your master branch which doesn't have the changes?

If you change GitHub settings to serve off of the separate branch you have then you can test online.

And yes, I could clone your branch locally and test here, but ideally you'd do some testing yourself first.

@RKBoss6
Copy link
Contributor Author

RKBoss6 commented Aug 28, 2025

No, my fork is serving off of the AppLoaderUpdatesTest Branch... Still no changes, I have no idea what's happening. In the apploader core fork, I have the changes both on master and a seperate branch, so that shoulnt be an issue. Is there a setting sayinng which branch the module comes from?

@gfwilliams
Copy link
Member

Is there a setting sayinng which branch the module comes from?

You know as much as me I'm afraid. you could try just putting your changes on your master branch and serving off that and see if it works any better?

@RKBoss6
Copy link
Contributor Author

RKBoss6 commented Sep 19, 2025

Update as of now: Still no fix for testing this out, as far as I can tell, both fork and actual repo lock the apploadercore submodule to a specific commit, and I can't figure out how to update that for a new commit. How does the bangleapps repo update to use the latest commit available?

@gfwilliams
Copy link
Member

How does the bangleapps repo update to use the latest commit available?

We do have a depandabot thing, but usually I update it myself. Maybe you can just download it to your PC and host it locally? It'll work fine off localhost

@RKBoss6
Copy link
Contributor Author

RKBoss6 commented Sep 19, 2025

Alright, I'll try that. Out of curiosity, how do you update it manually?

@gfwilliams
Copy link
Member

I git pull in webtools, then in BangleApps I git add webtools and git commit

@RKBoss6
Copy link
Contributor Author

RKBoss6 commented Sep 19, 2025

Is webtools a folder, or a repo?

@RKBoss6
Copy link
Contributor Author

RKBoss6 commented Sep 19, 2025

I've tried running it locally, and it showed this error in a toast at the bottom: apps.json doesn't exist and cannot do directory listing on this server

@gfwilliams
Copy link
Member

apps.json doesn't exist and cannot do directory listing on this server

Ok, ideally enable directory listing on the server - it's default on Apache usually? So 'http://localhost/apps' should return a list of the apps on it. Or bin/create_apps_json.sh might work for you if not

@RKBoss6
Copy link
Contributor Author

RKBoss6 commented Sep 20, 2025

Is webtools a seperate repo, like apploadercore? I've managed to get the apps.json working, how do I update the AppLoaderCore module?

@gfwilliams
Copy link
Member

Is webtools a seperate repo, like apploadercore?

yes, it is - but you don't need to update that one as you haven't changed it?

how do I update the AppLoaderCore module?

I git pull in core, then in BangleApps I git add core and git commit

I think above I gave you the wrong folder (webtools not core?)

@RKBoss6
Copy link
Contributor Author

RKBoss6 commented Sep 24, 2025

Alright, I have tried everything you said (and some research of my own), and for some reason, I just can't get it to work, no matter what I try. Could you try testing this out on your end to see if the code works? As far as I can tell it should, but it definitely needs to be tested. Thank you for all your help! Try it out, maybe, and see if it works...

@gfwilliams
Copy link
Member

Just checked and it's broken :(

[error] Update App failed, RangeError: Maximum call stack size exceeded

function formatAppName(app){
  //check if id is the same as the name, in which case we can just return the name...
  if(app.name.trim().toLowerCase()===app.id.trim().toLowerCase()){
    return app.name;
  }else{
    return formatAppName(app);
  }
}

Just calls itself if the app name isn't the same as the ID?

I really can't understand why you can't get this to work if you're hosting locally? If core/js/index.js on your PC has the changes you want, it should be running that code?

gfwilliams added a commit that referenced this pull request Sep 25, 2025
@gfwilliams gfwilliams merged commit 9cc7224 into espruino:master Sep 25, 2025
@gfwilliams
Copy link
Member

Just fixed this and merged it in

@RKBoss6
Copy link
Contributor Author

RKBoss6 commented Sep 25, 2025

Thank you so much! As for why it wasn't working, I couldn't get the submodule to update, I tried all sorts of things, and it wouldn't update no matter what. Thanks for your patience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants