Skip to content

Adds Versioning#492

Merged
cubap merged 296 commits intomainfrom
development
Mar 26, 2026
Merged

Adds Versioning#492
cubap merged 296 commits intomainfrom
development

Conversation

@cubap
Copy link
Copy Markdown
Member

@cubap cubap commented Mar 26, 2026

No description provided.

cubap and others added 30 commits April 7, 2025 14:06
* Removing fileSystem from Github API

* Update ProjectFactory.mjs

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>
* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?
* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml
* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* explicitly adding CORS
* API call to Update Profile

* existingEmail and existingName

* Changes to comments

* Update User.mjs
* saveCollection to RERUM

* Adding Tinypen to Create RERUM Object

* Update exists.test.mjs

* Update exists.test.mjs

* Update Page.mjs

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* starting some adjustments

* better the tests

* headed home

* multiple ways to extract the data

* retest with suggestions

* layer/page halos

* percolating deletes

* setting up routes

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>
* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs
* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* cleanup missing properties, changed method names

* just this route

* id shouldn't be optional here.

out of date test files dropped

* This should never break. What's up?

* bad merge

* Update exists_unit.test.mjs

* test is ugly

The page router needs a projectId as well to actually work

* Update end_to_end_unit.test.mjs

These two cannot work without a corresponding project, so it will need to be rewritten

* nested in router now

* Update exists.test.mjs
* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Refactor all .mjs files to .js and update imports. Closes #194

* un-mjs

* npm update

* Hey I heard you like tests, so I put tests in your tests

* mjs > js

* no mjs, bad mjs

* fine

* habesroxx

* how bout now

* hide, Jest is coming

* runner love

* Update package-lock.json

* jest no like to run

* null != undefined

* default not defaulting

* fixes "id is not defined"

shoulda wrote test for this

* out of scope, out of effs

---------

Co-authored-by: Priyal Patel <mepripri0712@gmail.com>
thehabes and others added 27 commits December 1, 2025 14:40
* dang this needs to go to development as a hotfix

* Let a logged in user leave a project they are a part of (same business rules apply as for removing a user)

* refactor a bit.  Send users an email when they are removed from a project by admins, or when they leave a group voluntarily

* cleanup

* polish

* Apply suggestion from @Copilot

whitespace in email

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Move stuff around based on review.  Allow removal of the only leader.

* unused

* rename for separation of actions

* changes from testing

* Move stuff around

* changes from testing

* indentation

* id instead of projectid for consistency

* id instead of projectid for consistency

* id instead of projectid for consistency

* id instead of projectid for consistency

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Create a New Column

* Delete classes/Column/__tests__/Column.test.js

This was all skipped, so let's just avoid it

* Implement code review recommendations for Column feature

This commit addresses all the critical and recommended improvements from the code review:

- Added TPENCOLUMNS environment variable to config.env
- Fixed variable scope errors in checkAndCreateUnorderedColumn function
- Added null safety checks for page.columns in line/index.js (lines 135, 184, 238)
- Added comprehensive error handling to all Column class methods
- Added JSDoc documentation for Column class and helper functions
- Added input validation to createNewColumn method
- Refactored checkAndCreateUnorderedColumn into smaller, more maintainable helper functions:
  - getRemainingAnnotations()
  - createUnorderedColumn()
  - deleteUnorderedColumn()
  - updateUnorderedColumn()
- Updated CLAUDE.md and copilot-instructions.md with TPENCOLUMNS documentation

These changes improve code reliability, maintainability, and documentation quality.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Patrick Cuba <cubap@users.noreply.github.com>

* Merge and Extend endpoints

* Prev and Next addition, sus check

* dup labels

* headers issue resolved

* code cleanup

* existingUnorderedColumn guard

* true

* suggested changes

* Self review

* No comments

* whitespace check

* remove UnorderedColumn totally

* PrevNext Fix

* docs

* fixes

* 400 projectID pageId

* space

* label col fix

* delete column if empty

* cols in index

* variable name change

* line fix

* column guards

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Patrick Cuba <cubap@users.noreply.github.com>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>
* Columns Update on Annotator

* remove update

* back to start

* Column Update on Line Parsing Change

* deletes

* bounds and post line

* bounds fix

* logs

* itemsProvided

* line fix

* delete fix

* remove comment
#428)

* Initial plan

* Fix my/projects endpoint to return 200 with empty array for users with no projects

Co-authored-by: cubap <1119165+cubap@users.noreply.github.com>

* Update API documentation to reflect new empty projects response

* Revert unintended package-lock.json changes

Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: cubap <1119165+cubap@users.noreply.github.com>
Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com>
* Runtime improvement on the /text amd /bounds routes

* remove debug logging

* whitespace

* whitespace

* one user fetch

* not a diff

* Change from standup, catch errors from the page and project update

* Change from standup, catch errors from the page and project update

* fix for copilot comment
* Error catching and logging

* touchup

* small tweak from testing and reviewing

* Stop this unhandled 500

* Stop this 500

* 500s from other routes

* Error handler as a middleware util

* stop this 500

* Stop that 500

* returns

* returns

* use respondWithError in app.js too

* touchup

* touchup

* touchup

* touchup from copilot review

* touchup from copilot review

* touchup from copilot review

* oof too much of a logic change, this is what we actually wanted.
* 'pixel' in fragment selector hotfix

* Changes from testing
* Update packages, npm versions, and node versions

* changes from testing

* oh boy

* undo localhost

* undo localhost

* the force

* the force
…) Audit (#441)

* First pass at auditing permission checks and adding them to the appropriate places

* changes from review and testing

* fix test

* changes from testing and review

* changes from copilot review
* packages

* darnit jsdom
* Better attempt at using a personalized string for usernames in emails instead of the generic 'TPEN User' text.

* Changes while reviewing

* Changes while reviewing

* Changes while reviewing
* First pass at validating the xywh

* changes while reviewing
* caller choses whether to save after

* Add shouldUpdate flag to Group role methods

Introduce an optional shouldUpdate parameter to Group.setMemberRoles and Group.removeMemberRoles to control whether changes are immediately persisted. These methods now skip calling update() when shouldUpdate is false, allowing callers to batch multiple role mutations and perform a single update. Call sites updated: removed a redundant update in Project.removeMember flow and adjusted memberRouter to pass shouldUpdate=false for intermediate role changes, then call group.update() once after all changes. This reduces redundant DB writes and improves efficiency.
* Gave the agent pipeline a try

* Changes while testing and reviewing

* No tests

* Lines section for API.html

* Lines section for API.html

* oo bail on this, it needs to be its own task

* simplify

* Say less in AI assistant files

* Changes while reviewing

* Changes while reviewing

* Remove this section

* clean this up a little

* clean this up a little

* Ah I see this was trying to help how it fails through, but we need these to throw their errors like usual.

* Now it fails through how it is supposed to

* Now it fails through how it is supposed to

* white space lint stuff

* How about a redo for reasons

* clean up function documentation

* changes while reviewing

* touchup for function documentation

* const

* changes during review

* changes during review

* shape of the refactor

* Gotta fix this now then

* Gotta fix this now then

* Remove the fallback conditionals, the Class will handle it

* Remove imported Line function.  It is no longer required here

* changes from getting demo to run

* changes from getting demo to run

* Working demo

* Changes during review

* Changes during review

* Gimme those sweet sweet rerum errors

* Gimme those sweet sweet rerum errors

* Changes during review

* changes while testing

* oops bad docs

* Really take the body from RERUM even if falsey

* Changes during standup

* Touchups during final review step

* Touchups during final review step

* Touchups during final review step
* caller choses whether to save after

* Add shouldUpdate flag to Group role methods

Introduce an optional shouldUpdate parameter to Group.setMemberRoles and Group.removeMemberRoles to control whether changes are immediately persisted. These methods now skip calling update() when shouldUpdate is false, allowing callers to batch multiple role mutations and perform a single update. Call sites updated: removed a redundant update in Project.removeMember flow and adjusted memberRouter to pass shouldUpdate=false for intermediate role changes, then call group.update() once after all changes. This reduces redundant DB writes and improves efficiency.

* auditfix

* whitespace

* No updated packages yet

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>
* First pass at utilizing the Page and Line classes in the page routes

* changes while reviewing

* changes while reviewing

* changes while reviewing

* changes while reviewing

* clean up and align error throughput

* clean up and align error throughput

* changes from testing

* Really connect the wires after closer inspection

* Really connect the wires after closer inspection

* Really connect the wires after closer inspection

* changes while revewing

* changes while revewing

* Changes while testing and reviewing

* Changes while testing and reviewing

* Changes while testing and reviewing

* Changes while testing and reviewing

* Changes while testing and reviewing

* Changes while testing and reviewing

* Changes while testing and reviewing

* Changes while testing and reviewing

* Changes while testing and reviewing

* Changes while testing and reviewing

* Changes while testing and reviewing

* Changes from standup

* Changes from standup

* Changes from standup

* Changes during review

* Changes during review
* First push at refactoring for the Layer

* First push at refactoring for the Layer

* Changes during readthrough and testing

* Changes during readthrough and testing

* Changes during readthrough and testing

* Changes during readthrough and testing

* Changes during readthrough and testing

* Changes during readthrough and testing

* Changes during readthrough and testing

* Changes during readthrough and testing

* Changes during readthrough and testing

* Changes during readthrough and testing

* Changes during review and testing

* move this back

* changes during testing and review

* changes during testing and review

* changes during testing and review

* changes during testing and review

* changes during testing and review

* Changes from cubap review

* Changes from cubap review

* Make sure Layer references in the Pages are upgraded when Layer is upgraded
* start with ALL and work backwards

* reset

* try iiif/helpers

* try cors

* try dompurify

* try dotenv and jwt

* try marked and mongo

* try jest

* nodemon and sinon

* try maria, which seems like it breaks

* try maria again with this minor refactor

* try jsdom, which we are pretty sure breaks.

* ah ok, no refactor for that, so we have to lock it in at 27

* try latest node and npm lts

* ah I see!  Let's try the version bundled with nvm

* Now how about after telling the server it's ok to use the latest version instead of the bundled version in nvm.

* mkay how about a new package-lock.json built around that?

* Yeah I was afraid of that

* jsdom is locked down now.  refactor complete.

* update nodemailer
* Fix smoke test for development.  Fix issue with bad usage of databaseTiny.find().

* Changes during review
* Initial plan

* Remove API.md and jsdom/dompurify/marked packages

Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com>

* changes during review

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>
* Initial plan

* initial plan: eliminate redundant project data queries

Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com>

* eliminate redundant project data queries across route handlers

- Add optional `project` param to `findPageById()` and `findLayerById()` in shared.js
  so callers with a pre-loaded project can skip the redundant DB fetch
- Pass pre-loaded `project` to `findLayerById()` and `findPageById()` in layer/index.js
- Pass pre-loaded `project` to `findPageById()` in page/index.js PUT /:pageId
- Pass pre-loaded `project` to `findPageById()` in line/index.js (POST, PUT, PATCH×2)
- Use `project.data` directly in customMetadataRouter.js GET/POST/PUT /:id/custom
  instead of calling `database.findOne()` again after `checkUserAccess()` already loaded it
- Restructure projectReadRouter.js GET /:id to call `loadAsUser()` once and derive the
  access check from its result via new `userHasAccess()` helper (saves project+group load)
- Remove redundant `loadAsUser()` call in projectReadRouter.js GET /:id/manifest;
  use `project.data` from `checkUserAccess()` for the existence check instead
- Add optional `preloadedProjectData` param to `ProjectFactory.exportManifest()` so
  callers with already-loaded data skip the internal `loadAsUser()` fetch

Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com>

* address code review: add Array.isArray guard in userHasAccess, add comment on loadAsUser error pattern

Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com>

* no package lock changes

* changes during review

* changes during review

* Changes during review

* Changes during review

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@cubap cubap self-assigned this Mar 26, 2026
@cubap cubap requested a review from thehabes as a code owner March 26, 2026 16:08
@cubap cubap merged commit 4007b66 into main Mar 26, 2026
3 checks passed
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.

5 participants