your variables get evaluated only the first time , you must put them inside the ps1 to be treated literally ffirst time and get evaluated after command execution .
PS1='|me::\W| $( mytest=$PWD;mynext="${PWD##*/}"; mylength=$((${#mytest}+${#mynext})) ; length=$(($mylength+6)) ; printf "\\u2500%.0s" $(seq $length $(tput cols))) \w\n\$'
you can change only 6 if you added stuff to ps1