Skip to content

Merge leo - #39

Merged
neatzzy merged 6 commits into
mainfrom
merge-leo
Jul 2, 2026
Merged

Merge leo#39
neatzzy merged 6 commits into
mainfrom
merge-leo

Conversation

@neatzzy

@neatzzy neatzzy commented Jul 2, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings July 2, 2026 20:29
@neatzzy
neatzzy merged commit 2b8b1a1 into main Jul 2, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces real authentication and database-backed profile functionality, replacing several placeholder flows and adding a new landing page to funnel unauthenticated users into login/registration.

Changes:

  • Added real login/cadastro/logout routes, plus login_required protection across most authenticated pages.
  • Implemented DB-backed “meu perfil”, edição de perfil (incl. curso por instituto/departamento) e exclusão de conta.
  • Updated multiple templates to link avatars/names to connection profiles and added a new landing page.

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
seed.py Updates seed data to add new institutes/departments/courses (but currently creates inconsistent academic relations).
routes.py Adds authentication routes/queries integration and login protection; updates profile routes to use real DB data.
app/templates/profile/partials/edit_feedback.html Adds partial for edit-profile feedback rendering.
app/templates/profile/my_profile.html Adds real “deletar perfil” POST form with confirmation.
app/templates/profile/edit_profile.html Reworks edit profile UI to use institute/department/course selection and password change fields.
app/templates/profile/connection_profile.html Simplifies connection profile rendering and conditionally shows actions only when logged in.
app/templates/main/partials/feed_post.html Adds links from post header (avatar/name) to the author’s connection profile.
app/templates/main/partials/explore_results.html Reformats results and adds profile link behavior for students (currently conflicts with HTMX behavior).
app/templates/main/index.html Refactors feed UI and adds links from connection requests to profiles (but currently breaks image upload UI).
app/templates/main/explore.html Adds links from highlight posts to author profiles.
app/templates/landing.html Adds a new landing page with CTA buttons to login/cadastro.
app/templates/chat/direct_messages.html Adds profile links in conversation list (currently conflicts with HTMX open-conversation click).
app/templates/chat/direct_messages_content.html Adds profile links on message avatars.
app/templates/base.html Updates base layout formatting and adds a “Olá, ” greeting in the sidebar.
app/templates/auth/register.html Updates cadastro page UI and adds institute/department/course selection via fetch.
app/templates/auth/partials/departamento_options.html Adds options partial for departments (HTMX/fetch response).
app/templates/auth/partials/curso_options.html Adds options partial for courses (HTMX/fetch response).
app/templates/auth/login.html Updates login page UI and adds server-side error display.
app/static/css/style.css Adds sidebar greeting styles and minor formatting change.
app/queries/conexoes.py Extends pending connection requests query to include user_id for profile linking.
app/queries/auth.py Adds auth/profile DB queries (create user, authenticate, profile CRUD, password change).
app/queries/academico.py Adds academic listing queries for institutes/departments/courses to support cadastro/edição.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread seed.py
bcc = inserir_curso('BCC', 'Bacharelado em Ciência da Computação', dcc['idDepartamento'], ie['idInstituto'])
bma = inserir_curso('BMA', 'Bacharelado em Matemática', dma['idDepartamento'], ie['idInstituto'])
bfis = inserir_curso('BFIS', 'Bacharelado em Física', dfis['idDepartamento'], ie['idInstituto'])
bfis = inserir_curso('BFIS', 'Bacharelado em Física', fu['idDepartamento'], ifis['idInstituto'])
Comment thread routes.py
Comment on lines +33 to +37
@functools.wraps(f)
def decorated_function(*args, **kwargs):
if 'user_id' not in session:
return redirect(url_for('auth.acesso_restrito'))
return f(*args, **kwargs)
Comment thread routes.py
"""

from flask import Blueprint, render_template, request, redirect, url_for, session, abort, make_response, Response, send_file
from flask import Blueprint, render_template, request, redirect, url_for, session, abort, make_response, Response, send_file, flash
Comment thread routes.py
Comment on lines +316 to +320
status_info = conexoes_queries.get_status_conexao(current_user_id, user_id)

posts_raw = auth_queries.get_publicacoes_do_usuario(user_id)
groups_raw = auth_queries.get_grupos_do_usuario(user_id)

Comment on lines +22 to +29
<section class="card">
<h3>Publicações</h3>
<ul class="profile-list">
{% for post in student.posts %}
<li>{{ post }}</li>
{% endfor %}
</ul>
</section>
Comment on lines +31 to +38
<section class="card">
<h3>Grupos de Estudos</h3>
<ul class="profile-list">
{% for group in student.groups %}
<li>{{ group }}</li>
{% endfor %}
</ul>
</section>
Comment on lines +23 to +32
<a
href="{{ url_for('main.perfil_conexao', user_id=student.id) }}"
style="text-decoration: none; color: inherit"
>
<div
class="result-row"
hx-get="{{ url_for('main.resumo_aluno', user_id=student.id) }}"
hx-target="#explore-right-panel"
hx-swap="innerHTML"
style="cursor: pointer"
Comment on lines +13 to +33
<a
href="{{ url_for('main.perfil_conexao', user_id=conversation.user_id) }}"
style="
text-decoration: none;
color: inherit;
display: flex;
align-items: center;
gap: 12px;
flex: 1;
"
>
<div class="conversation-avatar">
<div class="avatar">{{ conversation.initials }}</div>
</div>
<div class="conversation-info">
<div class="conversation-name">{{ conversation.name }}</div>
<div class="conversation-preview">
{{ conversation.last_message }}
</div>
</div>
</a>
Comment on lines +6 to +10
<form
hx-post="{{ url_for('main.criar_publicacao') }}"
hx-target="#feed-posts"
hx-swap="afterbegin"
hx-on="htmx:afterRequest: if(event.detail.successful){ this.reset() }"
@neatzzy
neatzzy deleted the merge-leo branch July 4, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants