Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
a0c0467
template changes
MiggySmallz Nov 14, 2025
7f6599e
Merge branch 'main' of https://github.com/effectai/engine into conten…
MiggySmallz Nov 18, 2025
59fb43c
added new template for lyric transcription task
MiggySmallz Dec 15, 2025
58f4c6f
Merge branch 'main' of https://github.com/effectai/engine into conten…
MiggySmallz Dec 21, 2025
9cb7f5f
phase 5 template changes + additions
MiggySmallz Dec 29, 2025
93d0d92
Merge branch 'main' of https://github.com/effectai/engine into conten…
MiggySmallz Dec 29, 2025
9644b55
Merge branch 'main' of https://github.com/effectai/engine into conten…
MiggySmallz Dec 30, 2025
3deed52
minor template change
MiggySmallz Jan 5, 2026
5f14dc1
Merge branch 'main' of https://github.com/effectai/engine into conten…
MiggySmallz Jan 5, 2026
951a722
Merge branch 'main' of https://github.com/effectai/engine into conten…
MiggySmallz Jan 6, 2026
5fd24fc
Small changes to spontaneous questions templates
MiggySmallz Jan 6, 2026
4731f74
fix: small template fix
MiggySmallz Jan 9, 2026
6404f71
Merge branch 'main' of https://github.com/effectai/engine into conten…
MiggySmallz Jan 9, 2026
cb316a4
tempalte changes and fixes
MiggySmallz Jan 15, 2026
3765b36
Merge branch 'main' of https://github.com/effectai/engine into conten…
MiggySmallz Jan 23, 2026
01528a9
song validation task rework
MiggySmallz Jan 28, 2026
7f581f5
Merge branch 'main' of https://github.com/effectai/engine into conten…
MiggySmallz Feb 25, 2026
54d16ba
changes to track-tagger task
MiggySmallz Feb 26, 2026
c78c7ff
Merge branch 'main' of https://github.com/effectai/engine into conten…
MiggySmallz Mar 9, 2026
cf6339c
fixing regex bug
MiggySmallz Mar 11, 2026
9feff61
adding new template
MiggySmallz Mar 16, 2026
eeb3b0d
adding image annotation task + taskposter template preview fix
MiggySmallz Mar 23, 2026
f74981a
Merge branch 'main' of https://github.com/effectai/engine into conten…
MiggySmallz Mar 23, 2026
d7e333b
template name change
MiggySmallz Mar 23, 2026
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
22 changes: 13 additions & 9 deletions apps/task-poster/src/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,16 @@ const findTemplateFields = (html: string) => {
const re = /\$\{([^}]+)\}/g;
const matches: string[][] = [];
let m;
do {
const m = re.exec(html);
if (m) matches.push(m.slice(0, 3));
} while (m);
return matches;
while ((m = re.exec(html))) {
matches.push(m.slice(0, 2));
}
// Deduplicate by field name
const seen = new Set<string>();
return matches.filter(([_, name]) => {
if (seen.has(name)) return false;
seen.add(name);
return true;
});
};

const form = (msg = "", values: Record<string, string> = {}): string => `
Expand Down Expand Up @@ -117,12 +122,11 @@ ${fields.map(
<label for="f${name}">${name}</label>
<input
${values[name] ? `value="${escapeHTML(values[name])}" ` : ""}
id="f${name}" name="${name}" type="text"></input>
id="f${name}" name="${name}" type="text">`,
).join("")}
<textarea style="display: none;" name="html">${escapeHTML(html)}</textarea>
<button type="submit">Preview</button>
</form>
`,
)}
`;

const templatePreviewFrame = async (
Expand Down Expand Up @@ -317,7 +321,7 @@ export const addTemplateRoutes = (app: Express): void => {
width="100%"
srcdoc="${escapeHTML(renderedTemplate)}"></iframe>

${templateDataForm(escapeHTML(html), fields, req.body)}`);
${templateDataForm(html, fields, req.body)}`);
});

app.post("/t/:id", requireAuth, async (req, res) => {
Expand Down
2 changes: 1 addition & 1 deletion apps/worker-app/app/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,4 @@ function prevPage() {
#dashboard {
background: black !important;
}
</style>
</style>
Loading