Add Samibookkonsole frontend prototype (HTML/CSS/JS) with AI view and navigation#2
Add Samibookkonsole frontend prototype (HTML/CSS/JS) with AI view and navigation#2Sami20178 wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0c8f4e98a7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| function addAiMessage(author, text) { | ||
| if (!aiMessages) return; | ||
| const msg = document.createElement('p'); | ||
| msg.innerHTML = `<strong>${author}:</strong> ${text}`; |
There was a problem hiding this comment.
Escape chat text before inserting into DOM
Using innerHTML with raw text lets any user-supplied chat input be interpreted as HTML/JS, so entering payloads like <img onerror=...> will execute script in the page context. This is a client-side XSS issue in the AI chat flow because addAiMessage('Du', question) passes untrusted input directly to this sink; render with textContent (or sanitize) instead.
Useful? React with 👍 / 👎.
Motivation
Description
README.mdto describe the new Samibookkonsole frontend, list features, and give a quick start instruction.index.htmlwhich implements the app shell, left sidebar navigation, multipleviewsections (Home, Spiele, Apps, KI/Modu, Start, Lernen, Einstellungen, Account, Abmelden), a quick-tile grid, AI chat UI, search input and theme toggle.script.jswhich handles view routing (setActiveView), quick-tile jumps, theme toggling, a simple intent-based respondersmartAnswer, AI message rendering withaddAiMessage, and search-to-view mapping.styles.cssimplementing dark/light theming, responsive layout, sidebar and content visuals, quick-tile grid and chat/message styling.Testing
Codex Task