New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Pythogora constantly tries to create new files (not always) with "changes" instead of correcting files it created before. #916
Comments
hey there, does this happend during troubleshoot or debugging ? |
Not sure what the difference is between "troubleshoot" versus debugging. It certainly happens often when it "asks" me if everything is working and whether I want to change anything. So I describe the problem, and what I want I want to be done. Below is an example of output. I have no idea why it created the app.js when there is already server.js It already has folder "models" but then it creates "src/models" and puts junk there, etc.... I have initialized the mongodb string like 30 times, and from time to time, it just decides to overwrite it, for no reason at all. Sometimes it creates database.js, and sometimes it creates db.js in a different folder. It should INIT the folder structure with npm init (if node is used) and stick with it. The folder structure should be self-consistent. Dev step 202
const mongoose = require('mongoose'); // INPUT_REQUIRED {MongoDB connection string} mongoose.connect(connectionString, { const db = mongoose.connection; db.on('error', (err) => { db.once('open', () => {
|
You see how here it realizes that it created a bunch of unnecessary files, with duplicated code? Dev step 206
After reviewing the task implementation, I found some issues that need to be addressed:
1. In `views/index.ejs`, the register and login tabs are still present, but they should be removed according to the colleague's input (point 2).
2. The `public/forms/registration.js` and `public/forms/login.js` files were created during this task, but they are not being used anywhere in the code.
3. There is some "dead code" in `views/ login.ejs`. The `<!-- Register form fields will be added here -->` comment indicates that the register form was supposed to be implemented, but it's still empty.
4. Duplicating code: In `routes/index.js`, the `/` route renders the `/auth/login` page, which is not necessary since the login functionality should be handled by a separate route.
To fix these issues, I recommend the following changes:
1. Remove the register and login tabs from `views/index.ejs`.
2. Delete the unused files `public/forms/registration.js` and `public/forms/login.js`.
3. Implement the register form fields in `views/login.ejs` or create a separate `views/register.ejs` file to handle registration.
4. Refactor the routes to handle login and registration separately.
After these changes, the implementation should be reviewed again to ensure everything is correct. |
Version
Command-line (Python) version
Operating System
Ubuntu Linux
What happened?
Instead of incrementally improving the files that have already been created, it starts creating new files (often in new directories) while abandoning the old files, instead of correcting them.
Is there any way to overcome this bizarre behavior?
The text was updated successfully, but these errors were encountered: