diff --git a/dealspace b/dealspace
index cd1e136..4f9d471 100755
Binary files a/dealspace and b/dealspace differ
diff --git a/portal/templates/app/project.html b/portal/templates/app/project.html
index f833084..be9b683 100644
--- a/portal/templates/app/project.html
+++ b/portal/templates/app/project.html
@@ -450,12 +450,22 @@
if (detailMode) {
titleHtml = `${escHtml(title)}`;
if (d.description) {
- const descTrunc = d.description.length > 120 ? d.description.substring(0, 120) + '\u2026' : d.description;
- titleHtml += `
${escHtml(descTrunc)}
`;
+ titleHtml += `${escHtml(d.description)}
`;
}
} else {
- const titleTrunc = title.length > 80 ? title.substring(0, 80) + '\u2026' : title;
- titleHtml = `${escHtml(titleTrunc)}`;
+ // Show first complete sentence, or full title if short — no arbitrary mid-word cut-off
+ let displayTitle = title;
+ if (title.length > 120) {
+ const sentenceEnd = title.search(/[.!?]\s/);
+ if (sentenceEnd > 20 && sentenceEnd < 160) {
+ displayTitle = title.substring(0, sentenceEnd + 1);
+ } else {
+ // Break at last word boundary before 120
+ const cut = title.lastIndexOf(' ', 120);
+ displayTitle = title.substring(0, cut > 40 ? cut : 120);
+ }
+ }
+ titleHtml = `${escHtml(displayTitle)}`;
}
// Priority select
@@ -549,13 +559,15 @@
const titleCell = row.querySelector('.req-title-cell');
if (!titleCell) return;
row.dataset.originalTitleHtml = titleCell.innerHTML;
- titleCell.innerHTML = `
-
-
-
+ titleCell.innerHTML = `
`;
const input = document.getElementById('edit-title-' + id);
- if (input) { input.value = title; input.focus(); input.select(); }
+ if (input) { input.value = title; input.focus(); input.setSelectionRange(input.value.length, input.value.length); }
}
function cancelEditRequest(id) {