Skip to content

🚧 wip: chatbot#830

Closed
kaljarv wants to merge 188 commits intomainfrom
messy-chatbot-dev
Closed

🚧 wip: chatbot#830
kaljarv wants to merge 188 commits intomainfrom
messy-chatbot-dev

Conversation

@kaljarv
Copy link
Contributor

@kaljarv kaljarv commented Nov 13, 2025

WHY:

Fixes [Issue link]

What has been changed (if possible, add screenshots, gifs, etc. )

Check off each of the following tasks as they are completed

  • I have reviewed the changes myself in this PR. Please check the self-review document
  • I have added or edited unit tests.
  • I have run the unit tests successfully.
  • I have run the e2e tests successfully.
  • I have tested this change on my own device.
  • I have tested this change on other devices (Using Browserstack is recommended).
  • I have tested my changes using the WAVE extension
  • I have tested my changes using keyboard navigation and screen-reading
  • I have added documentation where necessary.
  • Is there an existing issue linked to this PR?
  • I have cleaned up the commit history and checked the commits follow the guidelines

kaljarv and others added 30 commits September 30, 2025 13:57
Add component for displaying `@openvaa/data: Image` objects, which may
have different formats (sizes) of the image as well as variants to use
in dark mode.

Use the component in `Avatar`.
Add `hero` property to `Question`s’  and `QuestionCategory`s’
`CustomData` type, replacing the latters `emoji` property.

The property is of type `HeroContent` which may contain either an
`Emoji` or an `Image` (from `@openvaa/data`).

Add a `Hero` component for displaying the content.

Apply the component on the question and question category routes.

Add and extend existing api utilities for parsing the `hero` property.
Remove the `localPathToUrl` utility which would render urls invalid
under some circumstances.

Also move the `API_ROOT` const to `universalApiRoutes.ts`.
Add `get`, `post`, `put` and `delete` methods to `UniversalAdapter` to
handle common tasks, such as, authentication and response parsing in one
place.

Remove thus deprecated parts from adapters and other classes  extending it.

Also:
- use common response formats on the `api/oidc/token` route.
And remove duplicate implementation.
It was earlier contained in `/opt/frontend/data` but `/var` is a more
realistic location for it in production.
Extend OpenVAA Admin Tools import data function by adding a special
`answersByExternalId` property can be used to update `answers` using
`Question`s’ externalId`s instead of `documentId`s.
Use flex layout with wrapping if there are more than 6 categories
instead of the vertical grid.
Filter questions inside `CandidateContext` to show only the ones
applicable to candidates.

Note that all questions are still fetched from the backend by the
`DataProvider`, which currently does not support filtering by entity
type.
If specified in `customData` show the same `hero` content in the
Candidate App as in the Voter App.

Also, make the max height of the hero image smaller.
Prompt the user to login if the registration key is incorrect, which
happens most often when the user is already registered.

Also show the link as a secondary action button.
Fetch and parse `Alliance` data from Strapi when getting nominations.

Also, remove unused `parsePartialNominations` utility.
Implement different user roles for admins and candidates.

Turn the Candidates’ login server action into a generic login api route.

Use the new api route in the candidate/login server action and also
check for correct user role.

These changes are in preparation for the Admin App.
Move content related to logging in and out, and editing the password to
a new context used by both the Candidate and upcoming Admin Apps.
Also convert the build in both to follow the standard, non-dual build
paradigm.
Add a scaffold for the Admin App on the `/admin` route.

Add `AdminContext` for use with the app.

Reorganize common translations used in both Candidate and Admin Apps.

Within the Admin App, add an incomplete draft of the argument
condensation function.

Add preliminary translations for some parts of the Admin App, which are
not yet available.
- add mock admin user
- utility for filtering questions based on supported types
- add translation updates for argument condensation
- temp fix: get api key using process.env.apiKey
- IMPORTANT FIX: copy prompts to argument condensation package build
  - they are crucial but not inherently in the build
- create a map store for jobs
- create a pastJobs map store to see finished/failed jobs
- logger instance that needs to be improved later
- update logger to handle sub-ops for added granularity
- integrate llm and arg-cond packages to use send progress updates
- live progress integration to admin app with info and warning messages
- improve warning logs and remove futile ones
- fix: add llm openaikey to docker, use getRoute for admin app link
- remove POST endpoint, use update functions via logger
- restore docker configurations after failed attempt to hot-reload packages
- update this store with ad hoc 1-per-second GET calls only when there is an active job
- remove system health store from the admin app
- replace system health store with subscription to the job store (nActive, nFailed, nCompleted)
- also create a utility function to load election data
- add some translations for question info
- add route to save custom data
- add controller to handle saving custom data
- add service to process saving custom data
- add argument condensation type to shared data package (avoid circular dependency)
- update frontend to use new API for saving custom data
- fails with authentication error
@kaljarv kaljarv force-pushed the feat-new-admin-ui branch 3 times, most recently from a9c28f7 to f4ae82d Compare December 14, 2025 09:55
Base automatically changed from feat-new-admin-ui to main January 4, 2026 19:13
@kaljarv kaljarv changed the title Tmp: messy chatbot dev 🚧 wip: chatbot Jan 25, 2026
@kaljarv
Copy link
Contributor Author

kaljarv commented Jan 25, 2026

Superseded by #848

@kaljarv kaljarv closed this Jan 25, 2026
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