Some authors' names and parties are not being displayed #11

Closed
opened 2026-01-25 12:01:39 +00:00 by aniram · 1 comment
aniram commented 2026-01-25 12:01:39 +00:00 (Migrated from codeberg.org)

The frontend assumes that a project's main author is the one indexed at 0 on CIDAuthors which is itself already a falsy assumption. The backend has for some reason mixed up CIDAuthor's URLs, as we can see on the terminal's screenshot. The URL of the authors of each project actually contains the authors of the previous project.
For some reason this does not seem to be affecting the author's name displayed on projects whose author's info are actually being displayed, on those projects the author's info seem correct.

On the first screenshot the second project has no author nor party.

The frontend assumes that a project's main author is the one indexed at 0 on `CIDAuthors` which is itself already a falsy assumption. The backend has for some reason mixed up CIDAuthor's URLs, as we can see on the terminal's screenshot. The URL of the authors of each project actually contains the authors of the previous project. For some reason this does not seem to be affecting the author's name displayed on projects whose author's info are actually being displayed, on those projects the author's info seem correct. On the first screenshot the second project has no author nor party.
aniram commented 2026-01-25 15:14:51 +00:00 (Migrated from codeberg.org)

The problem was on the frontend exactly as I described above. My suspicion that the concurrent code messed up the URLs was proven wrong. This code is getting too complicated to reason about. I gotta figure out how to write better entities considering that the API does not give me all the infos I want. My Project entity has properties like URIAuthors, URLDocumentPDF and CurrentState but they only exist on the API when fetching for a project directly.
The problem is that if you fetch projects by keywords you receive a list that has a minimal amount of info on each project and does not contain those properties.

Another pain point is the project's main author, sometimes it's a committee sometimes a collective of members. I want to know the main author of each project when iterating over projects but this property is not found on the items of the list of projects given be the API when you hit .../proposicoes?keywords=..., instead they give you a link to .../proposicoes/.../autores. So I added CIDMainAuthor to Project in order to have direct access to a project's main author on the Project entity.
Does it work? Yes.
Am I happy with it? No.

The problem was on the frontend exactly as I described above. My suspicion that the concurrent code messed up the URLs was proven wrong. This code is getting too complicated to reason about. I gotta figure out how to write better entities considering that the API does not give me all the infos I want. My `Project` entity has properties like `URIAuthors`, `URLDocumentPDF` and `CurrentState` but **they only exist on the API when fetching for a project directly**. The problem is that if you fetch projects by keywords you receive a list that has a minimal amount of info on each project and does not contain those properties. Another pain point is the project's main author, sometimes it's a committee sometimes a collective of members. I want to know the main author of each project when iterating over projects but this property is not found on the items of the list of projects given be the API when you hit `.../proposicoes?keywords=...`, instead they give you a link to `.../proposicoes/.../autores`. So I added `CIDMainAuthor` to `Project` in order to have direct access to a project's main author on the `Project` entity. Does it work? Yes. Am I happy with it? No.
aniram added reference fix/author-name-party-not-displayed 2026-01-27 22:21:55 +00:00
aniram changed title from Some author's name and party are not being displayed to Some authors' names and parties are not being displayed 2026-01-29 19:45:00 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aniram/cidadon#11
No description provided.