Skip to content
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

build: release candidate #36

Merged
merged 43 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
1a80404
fix: doppler project name
simonrose121 Aug 28, 2024
06b6ac2
fix: remove workspace colour overrides (#15)
stefl Aug 28, 2024
c158f3d
feat: Detect and upgrade users with lissing metadata
codeincontext Aug 21, 2024
07fc896
fix: address sonarcloud warnings
codeincontext Aug 28, 2024
19e5854
feat: add users to hubspot on creation
codeincontext Aug 15, 2024
174e8a7
Merge branch 'main' into feat/hubspot-backend-creation
codeincontext Aug 28, 2024
7629ac9
feat: prompt versioning (#19)
stefl Aug 28, 2024
6b0839c
feat: aila categoriser feature with chat ID and user ID (#12)
stefl Aug 28, 2024
128badf
Fix not found detection
codeincontext Aug 29, 2024
4a6e42f
Merge remote-tracking branch 'new/feat/hubspot-backend-creation' into…
codeincontext Aug 29, 2024
78a9a59
feat: pass a mocked LLM Service to Aila via the new services object (…
stefl Aug 29, 2024
ac54789
chore: update Typescript to 5.3.3 (#24)
stefl Aug 29, 2024
44c3860
Merge branch 'main' into feat/hubspot-backend-creation
codeincontext Aug 29, 2024
cb65f9c
feat: update prompt with distractor, practice task and grammar improv…
stefl Aug 29, 2024
43168e1
Add reason to redirect
codeincontext Aug 29, 2024
21bd6cb
Merge remote-tracking branch 'origin/production'
actions-user Aug 29, 2024
763d6ac
Tweaks from PRm review
codeincontext Aug 29, 2024
99411b7
Merge pull request #21 from oaknational/feat/hubspot-backend-creation
codeincontext Aug 29, 2024
b6d12ff
Merge remote-tracking branch 'origin/main' into feat/onboarding-metad…
codeincontext Aug 29, 2024
2a15947
fix: prompt version hash (#27)
stefl Aug 29, 2024
7a797ac
feat: add Prisma Accelerate caching to some of our queries (#22)
stefl Aug 29, 2024
20bb5c5
Merge branch 'main' into feat/onboarding-metadata-upgrades
codeincontext Aug 29, 2024
c4a0a3e
feat: detect and upgrade users with missing metadata (#18)
codeincontext Aug 29, 2024
523fd31
chore: skip Github workflows that depend on PR ID when PR doesn't exi…
codeincontext Aug 29, 2024
d22c28a
feat: remove feedback message from header
codeincontext Aug 29, 2024
2944c0f
fix: Continue missing closing stars
stefl Aug 29, 2024
deaa279
remove old prompt
stefl Aug 29, 2024
8dcf77a
Merge branch 'main' into feat/remove-header-feedback
codeincontext Aug 29, 2024
4f55547
feat: updates to download resources page (#17)
mantagen Aug 29, 2024
fd4095e
Merge remote-tracking branch 'origin/main' into fix/continue_md
stefl Aug 29, 2024
936641a
feat: add telemetry to the chat API route (#26)
stefl Aug 29, 2024
dcb577a
chore(sec): fix broken link
johnrobeds Aug 30, 2024
bc100dc
Merge pull request #33 from oaknational/origin/chore/security-md
johnrobeds Aug 30, 2024
6a33897
Merge branch 'main' into fix/continue_md
johnrobeds Aug 30, 2024
9b529b0
Merge branch 'main' into feat/remove-header-feedback
johnrobeds Aug 30, 2024
79df249
fix: update terms and conditions link (#32)
codeincontext Aug 30, 2024
756354b
Merge branch 'main' into feat/remove-header-feedback
codeincontext Aug 30, 2024
92accd7
Merge branch 'main' into fix/continue_md
johnrobeds Aug 30, 2024
a541e90
Merge pull request #29 from oaknational/feat/remove-header-feedback
johnrobeds Aug 30, 2024
c9f080f
Merge branch 'main' into fix/continue_md
johnrobeds Aug 30, 2024
49c87c3
Merge pull request #30 from oaknational/fix/continue_md
johnrobeds Aug 30, 2024
8c44fdd
Merge remote-tracking branch 'origin/production'
actions-user Sep 2, 2024
f0c6899
fix: aila chat e2e test to handle 10 sections instead of 12
simonrose121 Sep 2, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
retention-days: 30
- name: Comment PR with playwright report
uses: thollander/actions-comment-pull-request@v2
if: ${{ !cancelled() }}
if: ${{ !cancelled() && steps.ref_from_sha.outputs.pr_number }}
with:
pr_number: ${{ steps.ref_from_sha.outputs.pr_number }}
message: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/post_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}

- uses: mcky/[email protected]
if: ${{ steps.ref_from_sha.outputs.pr_number }}
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
prNumber: ${{ steps.ref_from_sha.outputs.pr_number }}
Expand Down
34 changes: 14 additions & 20 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
"cloudinary",
"compat",
"contrib",
"cuid",
"dashify",
"datadoghq",
"dialog",
"Dialogs",
"distractor",
Expand All @@ -36,9 +38,13 @@
"dopplerhq",
"EASS",
"EHRC",
"estree",
"estruyf",
"eyfs",
"firstname",
"fkey",
"fontsource",
"gdrive",
"Geist",
"gleap",
"Hardman",
Expand All @@ -63,6 +69,7 @@
"keyv",
"langchain",
"languagedetect",
"lastname",
"Lewandowski",
"Lexend",
"likert",
Expand All @@ -74,13 +81,16 @@
"NDJSON",
"nextjs",
"nocheck",
"Nullability",
"oakai",
"oaknational",
"oaknationalacademy",
"oclif",
"Onboarded",
"openai",
"openapi",
"opentelemetry",
"otlp",
"paragraphise",
"pgvector",
"Pinecone",
Expand All @@ -93,10 +103,12 @@
"posttest",
"pptxgen",
"pptxgenjs",
"Preloadable",
"PSED",
"PSHE",
"psql",
"ratelimit",
"Regen",
"remeda",
"Rerank",
"Retriable",
Expand All @@ -105,6 +117,7 @@
"Sedar",
"slidedeck",
"sslmode",
"SUBJ",
"superjson",
"tailwindcss",
"tanstack",
Expand Down Expand Up @@ -162,28 +175,9 @@
"--color"
]
},
"workbench.colorCustomizations": {
"activityBar.activeBackground": "#b2bfe1",
"activityBar.background": "#b2bfe1",
"activityBar.foreground": "#15202b",
"activityBar.inactiveForeground": "#15202b99",
"activityBarBadge.background": "#c05e7a",
"activityBarBadge.foreground": "#e7e7e7",
"commandCenter.border": "#15202b99",
"sash.hoverBorder": "#b2bfe1",
"statusBar.background": "#8da0d3",
"statusBar.foreground": "#15202b",
"statusBarItem.hoverBackground": "#6881c5",
"statusBarItem.remoteBackground": "#8da0d3",
"statusBarItem.remoteForeground": "#15202b",
"titleBar.activeBackground": "#8da0d3",
"titleBar.activeForeground": "#15202b",
"titleBar.inactiveBackground": "#8da0d399",
"titleBar.inactiveForeground": "#15202b99"
},
"peacock.color": "8DA0D3",
"yaml.schemas": {
"file:///c%3A/Users/Simon/.vscode/extensions/atlassian.atlascode-2.8.6/resources/schemas/pipelines-schema.json": "bitbucket-pipelines.yml",
"https://www.artillery.io/schema.json": []
}
}
}
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ We continously update and improve Oak National Academy's product and codebase in

## Reporting a Vulnerability

To report any vulnerability please see our [security.txt](public/.well-known/security.txt) file
To report any vulnerability please see our [security.txt](https://www.thenational.academy/.well-known/security.txt) file
17 changes: 16 additions & 1 deletion apps/nextjs/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const getConfig = async (phase) => {
BRANCH: process.env.BRANCH,
DEPLOY_CONTEXT: process.env.CONTEXT,
},
webpack: (config, { dev }) => {
webpack: (config, { dev, isServer }) => {
if (!dev && isProductionBuild && isNextjsProductionBuildPhase) {
config.devtool = "source-map";
config.plugins.push(
Expand All @@ -114,6 +114,21 @@ const getConfig = async (phase) => {
);
}

// dd-trace outputs the following warning in the browser console:
// Critical dependency: the request of a dependency is an expression
// This is due to the use of `require` in the dd-trace codebase.
// This can be safely ignored.
// Start of dd-trace fix
if (!isServer) {
config.resolve.fallback = {
...config.resolve.fallback,
"dd-trace": false,
};
}
config.module = config.module || {};
config.module.exprContextCritical = false;
// End of dd-trace fix

return config;
},
};
Expand Down
5 changes: 5 additions & 0 deletions apps/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"clean": "rm -rf .next .turbo node_modules",
"dev": "concurrently \"pnpm dev-server\" \"node scripts/local-dev.mjs\"",
"dev-server": "pnpm with-env next dev --port 2525 | pino-pretty -C",
"dev-trace-deprecation": "NODE_OPTIONS=\"--trace-deprecation\" next dev --port 2525 | pino-pretty -C",
"lint": "next lint",
"lint-fix": "next lint --fix",
"start": "next start",
Expand All @@ -27,6 +28,8 @@
"@clerk/testing": "^1.1.5",
"@cloudinary/react": "^1.11.2",
"@cloudinary/url-gen": "^1.14.0",
"@datadog/browser-rum": "^5.24.0",
"@datadog/datadog-api-client": "^1.27.0",
"@fontsource/lexend": "^5.0.12",
"@headlessui/react": "^1.7.17",
"@langchain/community": "^0.0.26",
Expand Down Expand Up @@ -62,6 +65,7 @@
"class-variance-authority": "^0.7.0",
"cloudinary": "^1.41.1",
"cohere-ai": "^7.8.0",
"dd-trace": "^5.21.0",
"deep-equal": "^2.2.3",
"deep-object-diff": "^1.1.9",
"docx": "^8.2.3",
Expand Down Expand Up @@ -95,6 +99,7 @@
"superjson": "^1.9.1",
"tailwind-merge": "^2.2.1",
"tailwindcss-animate": "^1.0.7",
"tiny-invariant": "^1.3.1",
"trpc-openapi": "^1.2.0",
"ts-node": "^10.9.2",
"tsx": "^4.16.0",
Expand Down
7 changes: 6 additions & 1 deletion apps/nextjs/scripts/local-dev.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ const routesToPreBuild = [
"/aila",
];

const headers = {
"x-dev-preload": "true",
};

const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));

const preBuildRoutes = async (
Expand All @@ -29,7 +33,7 @@ const preBuildRoutes = async (
return limit(() => {
if (typeof route === "string") {
return axios
.get(`http://localhost:2525${route}`)
.get(`http://localhost:2525${route}`, { headers })
.then(() => console.log(`Pre-built route: ${route}`))
.catch((error) => {
console.log(`Error pre-building route: ${route}`, error.message);
Expand All @@ -39,6 +43,7 @@ const preBuildRoutes = async (
return axios({
method: route.method,
url: `http://localhost:2525${route.url}`,
headers,
})
.then(() =>
console.log(
Expand Down
16 changes: 8 additions & 8 deletions apps/nextjs/src/ai-apps/lesson-planner/lessonSection.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
export const lessonSections = [
"Title",
"Subject",
"Key Stage",
"Learning Outcome",
"Learning Cycles",
"Prior Knowledge",
"Key Learning Points",
"Key stage",
"Learning outcome",
"Learning cycles",
"Prior knowledge",
"Key learning points",
"Misconceptions",
"Keywords",
"Starter Quiz",
"Cycle 1",
"Exit Quiz",
"Starter quiz",
"Learning cycle 1",
"Exit quiz",
];
44 changes: 22 additions & 22 deletions apps/nextjs/src/ai-apps/lesson-planner/state/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,36 +21,36 @@ import {
* which isn't very useful
*/

const enum LessonPlannerAppActions {
CreateSession = "CREATE_SESSION",
Begin = "BEGIN",
enum LessonPlannerAppActions {
AddKeyLearningPoint = "ADD_KEY_LEARNING_POINT",
AddKeyword = "ADD_KEYWORD",
AddMisconception = "ADD_MISCONCEPTION",
BackToEditSubjectAndKS = "BACK_TO_EDIT_SUBJ_KS",
Begin = "BEGIN",
CreateSession = "CREATE_SESSION",
EncounteredNonRecoverableError = "ENCOUNTERED_NON_RECOVERABLE_ERROR",
ExtendedQuiz = "EXTENDED_QUIZ",
GeneratedLessonPlan = "GENERATED_LESSON_PLAN",
RegeneratedKeyLearningPoints = "REGENERATED_KEY_LEARNING_POINTS",
RegeneratedKeywords = "REGENERATED_KEYWORDS",
RegeneratedMisconceptions = "REGENERATED_MISCONCEPTIONS",
RemoveKeyLearningPoint = "REMOVE_KEY_LEARNING_POINT",
RemoveKeyword = "REMOVE_KEYWORD",
RemoveMisconception = "REMOVE_MISCONCEPTION",
RequestReset = "REQUEST_RESET",
RestoreExitQuizFromLocalStorage = "RESTORE_EXIT_QUIZ_FROM_LOCAL_STORAGE",
RestoreSession = "RESTORE_SESSION",
RestoreStarterQuizFromLocalStorage = "RESTORE_STARTER_QUIZ_FROM_LOCAL_STORAGE",
SetKeyStage = "SET_KEY_STAGE",
SetLessonTitle = "SET_LESSON_TITLE",
SetSubject = "SET_SUBJECT",
SetTopic = "SET_TOPIC",
SetLessonTitle = "SET_LESSON_TITLE",
TweakedKeyLearningPoint = "TWEAK_KEY_LEARNING_POINT",
TweakedKeyLearningPoints = "TWEAK_KEY_LEARNING_POINTS",
TweakedKeyword = "TWEAK_KEYWORD",
TweakedMisconception = "TWEAK_MISCONCEPTION",
TweakedKeyLearningPoints = "TWEAK_KEY_LEARNING_POINTS",
AddKeyword = "ADD_KEYWORD",
RemoveKeyword = "REMOVE_KEYWORD",
RemoveMisconception = "REMOVE_MISCONCEPTION",
AddMisconception = "ADD_MISCONCEPTION",
TweakedKeyLearningPoint = "TWEAK_KEY_LEARNING_POINT",
AddKeyLearningPoint = "ADD_KEY_LEARNING_POINT",
RemoveKeyLearningPoint = "REMOVE_KEY_LEARNING_POINT",
UpdateGenerationRateLimit = "UPDATE_GENERATION_RATE_LIMIT",
UpdatePartialLessonPlan = "UPDATE_PARTIAL_LESSON_PLAN",
GeneratedLessonPlan = "GENERATED_LESSON_PLAN",
RegeneratedKeyLearningPoints = "REGENERATED_KEY_LEARNING_POINTS",
RegeneratedMisconceptions = "REGENERATED_MISCONCEPTIONS",
RegeneratedKeywords = "REGENERATED_KEYWORDS",
ExtendedQuiz = "EXTENDED_QUIZ",
RestoreStarterQuizFromLocalStorage = "RESTORE_STARTER_QUIZ_FROM_LOCAL_STORAGE",
RestoreExitQuizFromLocalStorage = "RESTORE_EXIT_QUIZ_FROM_LOCAL_STORAGE",
RestoreSession = "RESTORE_SESSION",
RequestReset = "REQUEST_RESET",
EncounteredNonRecoverableError = "ENCOUNTERED_NON_RECOVERABLE_ERROR",
}

export type LessonPlannerAppAction =
Expand Down
Loading
Loading