Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions capacitor.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import { CapacitorConfig } from '@capacitor/cli';

const config: CapacitorConfig = {
appId: 'co.studenthub.staff',
appName: 'Studenthub Staff',
appId: 'com.bawes.studenthubstaff',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Changing appId breaks automatic updates for existing users.

Changing the application identifier from 'co.studenthub.staff' to 'com.bawes.studenthubstaff' creates a completely different app identity on both Android and iOS. Existing users will not receive this as an update—they will need to manually uninstall the old app and install the new one, which typically results in local data loss unless an explicit migration strategy is in place.

Recommended actions:

  • Confirm this appId change is intentional and document the migration strategy
  • Communicate to users that they must reinstall the app
  • Consider implementing cloud backup/restore if user data must be preserved
  • Update app store listings accordingly (this will be a new app entry, not an update)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@capacitor.config.ts` at line 4, The appId value in capacitor.config.ts was
changed to 'com.bawes.studenthubstaff', which will create a new app identity and
prevent automatic updates for existing users; either revert appId back to the
original 'co.studenthub.staff' in capacitor.config.ts to preserve upgrade path,
or if the change is intentional, document the migration plan (backup/restore,
user communication, app store as new app) and update all build configs and store
metadata to reflect the new appId; locate the appId entry in capacitor.config.ts
to make the change and ensure corresponding Android packageId/iOS bundle
identifier and any CI/release scripts are updated consistently.

appName: 'StudentHub Staff',
webDir: 'www',
bundledWebRuntime: false
// CRITICAL: Explicitly set androidScheme to 'https' to prevent WebView origin
// change that would wipe local storage data when upgrading from Capacitor 4 to 7.
// In Capacitor 4, the default scheme was 'http'; in Capacitor 6+, it changed to 'https'.
// Setting this explicitly preserves existing user data.
server: {
androidScheme: 'https',
},
};

export default config;
133 changes: 48 additions & 85 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,103 +1,66 @@
{
"name": "studenthub-staff",
"version": "0.0.1",
"author": "BAWES",
"homepage": "http://bawes.net/",
"author": "Ionic Framework",
"homepage": "https://ionicframework.com/",
Comment on lines +4 to +5

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Metadata reverted to Ionic starter defaults — likely unintended.

author and homepage were changed from BAWES-owned values to Ionic Framework / https://ionicframework.com/. This project is studenthub-staff owned by BAWES, so these values look like artifacts from an Ionic starter template that leaked into the upgrade patch. Restore the original BAWES metadata (or the organization's current values) before merging — these end up in published package metadata and CI/audit reports.

🛠️ Suggested fix
-  "author": "Ionic Framework",
-  "homepage": "https://ionicframework.com/",
+  "author": "BAWES",
+  "homepage": "http://bawes.net/",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"author": "Ionic Framework",
"homepage": "https://ionicframework.com/",
"author": "BAWES",
"homepage": "http://bawes.net/",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` around lines 4 - 5, The package.json metadata was reverted to
Ionic starter defaults; restore the BAWES-owned values by updating the "author"
and "homepage" fields back to the project's correct values (e.g., the
organization's display name and the studenthub-staff homepage/URL) so published
package metadata and CI/audit reports reflect BAWES ownership; locate and edit
the "author" and "homepage" properties in package.json (ensure formatting and
any associated contributors or repository fields remain valid).

"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"lint": "ng lint",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Confirm angular.json still declares a lint target (which would require the eslint builder).
fd -t f 'angular.json' --exec sh -c 'echo "=== {} ==="; cat {}'
# Confirm no eslint config remains orphaned.
fd -t f -H -E node_modules '(^|/)(\.eslintrc(\.json|\.js|\.cjs|\.yml|\.yaml)?|eslint\.config\.(js|cjs|mjs|ts))$'

Repository: BAWES-Universe/studenthub-staff

Length of output: 9344


🏁 Script executed:

#!/bin/bash
# Check package.json content, specifically around the mentioned lines
head -70 package.json | tail -65

Repository: BAWES-Universe/studenthub-staff

Length of output: 2113


🏁 Script executed:

#!/bin/bash
# Check if .eslintrc.json exists and view its content
if [ -f .eslintrc.json ]; then
  echo "=== .eslintrc.json exists ==="
  cat .eslintrc.json
else
  echo ".eslintrc.json does not exist"
fi

Repository: BAWES-Universe/studenthub-staff

Length of output: 1165


🏁 Script executed:

#!/bin/bash
# Search for any ESLint-related dependencies in package.json
rg '@angular-eslint|@typescript-eslint|"eslint"' package.json

Repository: BAWES-Universe/studenthub-staff

Length of output: 57


Remove lint script and lint target from angular.json — ESLint dependencies were removed.

"lint": "ng lint" (package.json line 11) and the lint target in angular.json are still configured, but @angular-eslint/*, eslint, and @typescript-eslint/* have been removed from devDependencies. Running npm run lint will fail with "Cannot find builder" since @angular-eslint/builder is not installed. The .eslintrc.json configuration file is also orphaned.

Either re-add the Angular ESLint stack compatible with Angular 19 (@angular-eslint/builder, @angular-eslint/eslint-plugin, @angular-eslint/eslint-plugin-template, @angular-eslint/schematics, @angular-eslint/template-parser at ^19.x, plus eslint and @typescript-eslint/*), or remove the lint script from package.json and the lint target from angular.json.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` at line 11, Remove the stale ESLint configuration by deleting
the "lint" script entry from package.json (the "lint": "ng lint" script),
removing the "lint" target from angular.json (the project-level
architect/targets entry that references `@angular-eslint/builder`), and deleting
the orphaned .eslintrc.json file; alternatively, if you prefer to keep linting,
restore the Angular ESLint stack for Angular 19 by adding `@angular-eslint/`*
packages, eslint, and `@typescript-eslint/`* devDependencies and ensuring the
angular.json lint target uses the correct builder and .eslintrc.json is
valid—pick one approach and apply it consistently.

"serve-kk": "ionic serve --configuration=krushn",
"build:devserver": "ng build --configuration=dev --service-worker",
"build:production": "ng build --configuration=production --service-worker ",
"ionic:serve:khalid": "ionic serve --configuration=khalid",
"sentry:sourcemaps": "sentry-cli sourcemaps inject --org pogi --project sh-staff-app ./www && sentry-cli sourcemaps upload --org pogi --project sh-staff-app ./www"
"e2e": "ng e2e",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check whether any e2e folder/config is present in the repo that this script would target.
fd -t d -H -E node_modules '^(e2e|cypress|playwright|tests-e2e)$'
fd -t f -H -E node_modules '^(cypress\.config\.(t|j)s|playwright\.config\.(t|j)s|protractor\.conf\.(t|j)s)$'
# Check angular.json for an e2e builder.
rg -nP '"e2e"\s*:\s*\{' --type=json

Repository: BAWES-Universe/studenthub-staff

Length of output: 57


🏁 Script executed:

cat -n package.json | head -70

Repository: BAWES-Universe/studenthub-staff

Length of output: 2577


🏁 Script executed:

rg -n "devDependencies" -A 20 package.json

Repository: BAWES-Universe/studenthub-staff

Length of output: 806


🏁 Script executed:

cat -n angular.json 2>/dev/null | head -100

Repository: BAWES-Universe/studenthub-staff

Length of output: 3993


e2e script added without an e2e runner.

"e2e": "ng e2e" was added at line 12, but no e2e framework (Cypress, Playwright, WebdriverIO, Protractor, etc.) is in devDependencies (lines 46–65). Running ng e2e on a fresh install will prompt for a builder and fail in non-interactive (CI) environments.

Either install and configure one of the supported runners (e.g., @cypress/schematic + cypress, or @playwright/test), or remove the e2e script until the runner is added.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` at line 12, The package.json contains an "e2e" npm script
("e2e": "ng e2e") but no e2e runner in devDependencies, so either remove the
"e2e" script or add and configure a supported runner; to fix, either delete the
"e2e" entry from the scripts section or install and configure a runner (for
example add devDependencies "cypress" and "@cypress/schematic" and run the
schematic to update angular.json/builders, or add Playwright/@playwright/test
and its Angular builder), then ensure the "e2e" script points to the chosen
runner and that angular.json has the corresponding e2e builder.

"cap:sync": "npx cap sync",
"cap:open:ios": "npx cap open ios",
"cap:open:android": "npx cap open android"
},
"private": true,
"dependencies": {
"@angular/common": "^15.0.0",
"@angular/core": "^15.0.0",
"@angular/forms": "^15.0.0",
"@angular/platform-browser": "^15.0.0",
"@angular/platform-browser-dynamic": "^15.0.0",
"@angular/router": "^15.0.0",
"@angular/service-worker": "^15.2.3",
"@auth0/auth0-angular": "^1.11.1",
"@awesome-cordova-plugins/core": "^6.6.0",
"@awesome-cordova-plugins/file": "^6.2.0",
"@capacitor/android": "^4.6.1",
"@capacitor/app": "^4.1.1",
"@capacitor/camera": "^4.1.4",
"@capacitor/core": "^4.7.1",
"@capacitor/filesystem": "^4.1.4",
"@capacitor/geolocation": "^4.1.0",
"@capacitor/haptics": "4.1.0",
"@capacitor/keyboard": "4.1.0",
"@capacitor/splash-screen": "^4.1.2",
"@capacitor/status-bar": "^4.1.1",
"@ckeditor/ckeditor5-angular": "^4.0.0",
"@ckeditor/ckeditor5-build-classic": "^35.4.0",
"@codetrix-studio/capacitor-google-auth": "^3.4.0-rc.0",
"@ionic/angular": "^6.1.9",
"@ionic/storage-angular": "^3.0.6",
"@ngx-translate/core": "^14.0.0",
"@ngx-translate/http-loader": "^7.0.0",
"@sentry/browser": "^7.92.0",
"@sentry/cli": "^2.24.1",
"@tinymce/tinymce-angular": "^7.0.0",
"algoliasearch": "^4.23.3",
"angular-instantsearch": "^4.4.0",
"aws-sdk": "^2.1279.0",
"chart.js": "^4.1.1",
"cordova-plugin-file": "^7.0.0",
"cordova-plugin-nativestorage": "^2.3.2",
"date-fns": "^2.29.3",
"file-saver": "^2.0.5",
"ion2-calendar": "^3.5.0",
"ionicons": "^6.0.3",
"mixpanel-browser": "^2.45.0",
"moment": "^2.30.1",
"ng5-slider": "^1.2.6",
"rxjs": "~7.5.0",
"@angular/common": "^19.0.0",
"@angular/core": "^19.0.0",
"@angular/forms": "^19.0.0",
"@angular/platform-browser": "^19.0.0",
"@angular/platform-browser-dynamic": "^19.0.0",
"@angular/router": "^19.0.0",
"@capacitor/android": "^7.0.0",
"@capacitor/app": "^7.0.0",
"@capacitor/browser": "^7.0.0",
"@capacitor/camera": "^7.0.0",
"@capacitor/core": "^7.0.0",
"@capacitor/filesystem": "^7.0.0",
"@capacitor/haptics": "^7.0.0",
"@capacitor/ios": "^7.0.0",
"@capacitor/keyboard": "^7.0.0",
"@capacitor/network": "^7.0.0",
"@capacitor/preferences": "^7.0.0",
"@capacitor/push-notifications": "^7.0.0",
"@capacitor/share": "^7.0.0",
"@capacitor/splash-screen": "^7.0.0",
"@capacitor/status-bar": "^7.0.0",
"@ionic/angular": "^8.0.0",
"@ionic/angular-toolkit": "^11.0.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
"zone.js": "~0.15.0"
},
Comment on lines 18 to 45

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Surface any source imports of packages dropped in this PR.
patterns=(
  '@auth0/'
  '@sentry/'
  '@ckeditor/'
  'tinymce'
  'aws-sdk'
  'cordova-'
  '@ionic-native/'
  '@angular/service-worker'
  '@angular/animations'
  'tailwindcss'
)
for p in "${patterns[@]}"; do
  echo "=== imports of: $p ==="
  rg -nP --type=ts --type=html -g '!**/node_modules/**' -g '!**/dist/**' "from\s+['\"][^'\"]*${p}[^'\"]*['\"]|import\s+['\"][^'\"]*${p}[^'\"]*['\"]|require\(\s*['\"][^'\"]*${p}[^'\"]*['\"]\s*\)"
done
# Also list any *.module.ts that still imports HttpClientModule/ServiceWorkerModule etc. that may rely on removed deps.
rg -nP --type=ts -g '!**/node_modules/**' 'ServiceWorkerModule|BrowserAnimationsModule|NoopAnimationsModule'

Repository: BAWES-Universe/studenthub-staff

Length of output: 5344


Remove unresolved imports before merging; packages were deleted but source still references them.

The PR removes runtime dependencies but leaves active imports in the source tree that will cause TypeScript compilation to fail:

  • @auth0/auth0-angular imported in 5 files (app.module.ts, app.component.ts, auth.service.ts, login.page.ts, interview-evaluation.component.ts)
  • @sentry/browser imported in sentry.errorhandler.service.ts
  • @ckeditor/ckeditor5-angular imported across 18+ files and modules throughout the codebase
  • @tinymce/tinymce-angular imported in app.module.ts and email-campaign-form.module.ts
  • aws-sdk imported in aws.service.ts
  • @awesome-cordova-plugins/file imported in aws.service.ts and app.module.ts
  • @angular/service-worker imported in app.component.ts and app.module.ts (SwUpdate, ServiceWorkerModule active)

Either re-add these packages to dependencies with Capacitor 7 equivalents where applicable, or remove the corresponding source imports and module registrations before merging.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` around lines 18 - 45, The code still imports removed packages
causing TypeScript build failures; either restore the packages or delete/replace
their imports and module registrations: remove `@auth0/auth0-angular`
imports/usages in AppModule, AppComponent, AuthService, LoginPage,
InterviewEvaluationComponent; remove `@sentry/browser` usage in
SentryErrorHandlerService; remove CKEditor imports/usages across
modules/components (CKEditorModule/Editor components); remove
`@tinymce/tinymce-angular` imports in AppModule and EmailCampaignFormModule;
remove aws-sdk and `@awesome-cordova-plugins/file` imports/usages from AwsService
and AppModule; and remove ServiceWorkerModule and SwUpdate usages from AppModule
and AppComponent — update DI, providers, and template references accordingly so
the project compiles if you choose not to re-add the packages.

"devDependencies": {
"@angular-devkit/build-angular": "^15.0.0",
"@angular-eslint/builder": "^14.0.0",
"@angular-eslint/eslint-plugin": "^14.0.0",
"@angular-eslint/eslint-plugin-template": "^14.0.0",
"@angular-eslint/template-parser": "^14.0.0",
"@angular/cli": "^15.0.4",
"@angular/compiler": "^15.0.0",
"@angular/compiler-cli": "^15.0.0",
"@angular/language-service": "^15.0.0",
"@capacitor/cli": "4.6.1",
"@ionic/angular-toolkit": "^6.0.0",
"@types/jasmine": "~4.0.0",
"@types/node": "^12.11.1",
"@typescript-eslint/eslint-plugin": "5.3.0",
"@typescript-eslint/parser": "5.3.0",
"autoprefixer": "^10.4.20",
"eslint": "^7.6.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jsdoc": "30.7.6",
"eslint-plugin-prefer-arrow": "1.2.2",
"jasmine-core": "~4.3.0",
"jasmine-spec-reporter": "~5.0.0",
"@angular-devkit/build-angular": "^19.0.0",
"@angular/cli": "^19.0.0",
"@angular/compiler": "^19.0.0",
"@angular/compiler-cli": "^19.0.0",
"@angular/language-service": "^19.0.0",
"@capacitor/cli": "^7.0.0",
"@types/jasmine": "~5.1.0",
"@types/jasminewd2": "~2.0.13",
"@types/node": "^22.0.0",
"jasmine-core": "~5.1.0",
"jasmine-spec-reporter": "~7.0.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.2.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-chrome-launcher": "~3.2.0",
"karma-coverage-istanbul-reporter": "~3.0.3",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"postcss": "^8.4.49",
"tailwindcss": "^3.4.16",
"ts-node": "~8.3.0",
"typescript": "~4.8.4"
},
"description": "Staff portal of studenthub"
"karma-jasmine-html-reporter": "^2.1.0",
"ts-node": "~10.9.0",
"typescript": "~5.6.0"
}
}